Re: bisected boot regression post 2.6.25-rc3.. please revert

From: Paul Mackerras
Date: Mon Mar 10 2008 - 00:35:59 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/