lkml.org 
[lkml]   [2008]   [Mar]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 10 Mar 2008 15:35:41 +1100
FromPaul Mackerras <>
SubjectRe: 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.


\
 
 \ /
  Last update: 2008-03-10 06:01    [from the cache]
©2003-2008