Messages in this thread |  | | | Date | Mon, 10 Mar 2008 15:35:41 +1100 | | From | Paul Mackerras <> | | Subject | Re: bisected boot regression post 2.6.25-rc3.. please revert | |
Linus Torvalds writes:
> But even for PAGE_MASK, we literally have code like this:
>
> if ((size_avail & PAGE_MASK) < rg.size) {
>
> where it so _happens_ that "size_avail" is unsigned, but what if it
> wasn't? It could turn a unsigned comparison into a signed one, and
> introduce any number of security bugs etc.
We have had PAGE_MASK being signed on powerpc for ages, so if you do
find any such bugs, please let me know. :) I'm not aware of any at
present, though.
The expression you quoted will be ok as long as either size_avail or
rg.size is unsigned, as far as I can see.
Our PAGE_SIZE is unsigned long.
Paul.
|  |