Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-06 Thread Roman Zippel
Hi, On Thu, 4 Jan 2007, Al Viro wrote: > PS: what would be the sane strategy for timer series merge, BTW? PPS: I still don't like it. It fixes a rather theoretical problem with absolutely no practical relevance. PPPS: type safety is also possible with container_of(), the prototype patch below

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-06 Thread Roman Zippel
Hi, On Thu, 4 Jan 2007, Al Viro wrote: PS: what would be the sane strategy for timer series merge, BTW? PPS: I still don't like it. It fixes a rather theoretical problem with absolutely no practical relevance. PPPS: type safety is also possible with container_of(), the prototype patch below

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-05 Thread Bodo Eggert
Eric Sandeen <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: >> +++ a/fs/bad_inode.c >> -static int return_EIO(void) >> +static long return_EIO(void) > What about ops that return loff_t (64 bits) on 32-bit arches and stuff > it into 2 registers *If* it uses an additional register for the

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-05 Thread Arjan van de Ven
On Thu, 2007-01-04 at 23:52 +, Al Viro wrote: > On Thu, Jan 04, 2007 at 03:21:06PM -0800, Mitchell Blank Jr wrote: > > Linus Torvalds wrote: > > > Well, that probably would work, but it's also true that returning a > > > 64-bit > > > value on a 32-bit platform really _does_ depend on more

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-05 Thread Arjan van de Ven
On Thu, 2007-01-04 at 23:52 +, Al Viro wrote: On Thu, Jan 04, 2007 at 03:21:06PM -0800, Mitchell Blank Jr wrote: Linus Torvalds wrote: Well, that probably would work, but it's also true that returning a 64-bit value on a 32-bit platform really _does_ depend on more than the size.

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-05 Thread Bodo Eggert
Eric Sandeen [EMAIL PROTECTED] wrote: Andrew Morton wrote: +++ a/fs/bad_inode.c -static int return_EIO(void) +static long return_EIO(void) What about ops that return loff_t (64 bits) on 32-bit arches and stuff it into 2 registers *If* it uses an additional register for the high bits,

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 03:21:06PM -0800, Mitchell Blank Jr wrote: > Linus Torvalds wrote: > > Well, that probably would work, but it's also true that returning a 64-bit > > value on a 32-bit platform really _does_ depend on more than the size. > > Yeah, obviously this is restricted to the

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Linus Torvalds wrote: > On Thu, 4 Jan 2007, Andrew Morton wrote: > >> That's what I currently have queued. It increases bad_inode.o text from >> 200-odd bytes to 700-odd :( >> > Then I think we're ok. We do care about bytes, but we care more about > bytes that actually ever hit the

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Andrew Morton wrote: > > That's what I currently have queued. It increases bad_inode.o text from > 200-odd bytes to 700-odd :( Then I think we're ok. We do care about bytes, but we care more about bytes that actually ever hit the icache or dcache, and this will

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 4 Jan 2007 14:35:09 -0800 (PST) Linus Torvalds <[EMAIL PROTECTED]> wrote: > Anybody want to send in the patch that just generates separate versions > for > > loff_t eio_llseek(struct file *file, loff_t offset, int origin) > { > return -EIO; > } > >

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Mitchell Blank Jr
Linus Torvalds wrote: > Well, that probably would work, but it's also true that returning a 64-bit > value on a 32-bit platform really _does_ depend on more than the size. Yeah, obviously this is restricted to the signed-integer case. My point was just that you could have the compiler figure

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Linus Torvalds wrote: > Anybody want to send in the patch that just generates separate versions > for > > loff_t eio_llseek(struct file *file, loff_t offset, int origin) > { > return -EIO; > } > > int eio_readdir(struct file *filp, void *dirent, filldir_t

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Mitchell Blank Jr wrote: > > I don't think you need to do fancy #ifdef's: > > static s32 return_eio_32(void) { return -EIO; } > static s64 return_eio_64(void) { return -EIO; } > extern void return_eio_unknown(void); /* Doesn't exist */ > #define return_eio(type)

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Mitchell Blank Jr
Al Viro wrote: > At least 3 versions, unless you want to mess with ifdefs to reduce them to > two. I don't think you need to do fancy #ifdef's: static s32 return_eio_32(void) { return -EIO; } static s64 return_eio_64(void) { return -EIO; } extern void return_eio_unknown(void); /* Doesn't exist

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 01:30:47PM -0800, Linus Torvalds wrote: > I'll happily cast away arguments that aren't used, but I'm not sure that > we ever should cast different return values (not "int" vs "long", but also > not "loff_t" etc). > > On 32-bit architectures, 64-bit entities may be

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Linus Torvalds wrote: > > On Thu, 4 Jan 2007, Eric Sandeen wrote: >> Andrew Morton wrote: >> >>> btw, couldn't we fix this bug with a simple old >>> >>> --- a/fs/bad_inode.c~a >>> +++ a/fs/bad_inode.c >>> @@ -15,7 +15,7 @@ >>> #include >>> #include >>> >>> -static int return_EIO(void) >>>

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Eric Sandeen wrote: > Andrew Morton wrote: > > > btw, couldn't we fix this bug with a simple old > > > > --- a/fs/bad_inode.c~a > > +++ a/fs/bad_inode.c > > @@ -15,7 +15,7 @@ > > #include > > #include > > > > -static int return_EIO(void) > > +static long

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Andrew Morton wrote: > On Thu, 04 Jan 2007 15:04:17 -0600 > Eric Sandeen <[EMAIL PROTECTED]> wrote: > >> Andrew Morton wrote: >>> On Thu, 4 Jan 2007 20:24:12 + >>> Al Viro <[EMAIL PROTECTED]> wrote: >>> So my main issue with fs/bad_inode.c is not even cast per se; it's that cast is

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 04 Jan 2007 15:04:17 -0600 Eric Sandeen <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: > > On Thu, 4 Jan 2007 20:24:12 + > > Al Viro <[EMAIL PROTECTED]> wrote: > > > >> So my main issue with fs/bad_inode.c is not even cast per se; it's that > >> cast is to void *. > > > > But

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Andrew Morton wrote: > On Thu, 4 Jan 2007 20:24:12 + > Al Viro <[EMAIL PROTECTED]> wrote: > >> So my main issue with fs/bad_inode.c is not even cast per se; it's that >> cast is to void *. > > But Eric's latest patch is OK in that regard, isn't it? It might confuse > parsers (in fixable

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 4 Jan 2007 20:24:12 + Al Viro <[EMAIL PROTECTED]> wrote: > So my main issue with fs/bad_inode.c is not even cast per se; it's that > cast is to void *. But Eric's latest patch is OK in that regard, isn't it? It might confuse parsers (in fixable ways), but it is type-correct and has

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 11:30:22AM -0800, Linus Torvalds wrote: > > > On Thu, 4 Jan 2007, Al Viro wrote: > > > > How about "makes call graph analysis easier"? ;-) In principle, I have > > no problem with force-casting, but it'd better be cast to the right > > type... > > Do we really care in

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Al Viro wrote: > > PS: what would be the sane strategy for timer series merge, BTW? I think Andrew may care more. I just care about it happening after 2.6.20. Whether we can do it really early after that, or whether we should do it as the last thing just before releasing

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Al Viro wrote: > > How about "makes call graph analysis easier"? ;-) In principle, I have > no problem with force-casting, but it'd better be cast to the right > type... Do we really care in the kernel? We simply never use function pointer casts like this for anything

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Mikael Pettersson
On Thu, 04 Jan 2007 11:51:10 -0600, Eric Sandeen wrote: >Also - is it ok to alias a function with one signature to a function with >another signature? NO! Specific cases of type mismatches may work on many machines (say different pointer types as long as they aren't accessed), but in general

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 07:14:51PM +, Al Viro wrote: > On Thu, Jan 04, 2007 at 11:09:31AM -0800, Linus Torvalds wrote: > > > But I'd argue we should only do it if there is an actual > > honest-to-goodness reason to do so. > > How about "makes call graph analysis easier"? ;-) In principle,

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 11:09:31AM -0800, Linus Torvalds wrote: > But I'd argue we should only do it if there is an actual > honest-to-goodness reason to do so. How about "makes call graph analysis easier"? ;-) In principle, I have no problem with force-casting, but it'd better be cast to the

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Andrew Morton wrote: > On Thu, 04 Jan 2007 12:33:59 -0600 > Eric Sandeen <[EMAIL PROTECTED]> wrote: > > > Andrew Morton wrote: > > > On Thu, 04 Jan 2007 11:51:10 -0600 > > > Eric Sandeen <[EMAIL PROTECTED]> wrote: > > > > >> Also - is it ok to alias a function with one

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 04 Jan 2007 12:33:59 -0600 Eric Sandeen <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: > > On Thu, 04 Jan 2007 11:51:10 -0600 > > Eric Sandeen <[EMAIL PROTECTED]> wrote: > > >> Also - is it ok to alias a function with one signature to a function with > >> another signature? > > > >

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Andrew Morton wrote: > On Thu, 04 Jan 2007 11:51:10 -0600 > Eric Sandeen <[EMAIL PROTECTED]> wrote: >> Also - is it ok to alias a function with one signature to a function with >> another signature? > > Ordinarily I'd say no wucking fay, but that's effectively what we've been > doing in there

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 04 Jan 2007 11:51:10 -0600 Eric Sandeen <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: > > > Al is correct, of course. But the patch takes bad_inode.o from 280 up to > > 703 > > bytes, which is a bit sad for some cosmetic thing which nobody ever looks > > at or modifies. > > > >

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Andrew Morton wrote: > Al is correct, of course. But the patch takes bad_inode.o from 280 up to 703 > bytes, which is a bit sad for some cosmetic thing which nobody ever looks > at or modifies. > > Perhaps you can do > > static int return_EIO_int(void) > { > return -EIO; > } > > static int

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Andrew Morton wrote: Al is correct, of course. But the patch takes bad_inode.o from 280 up to 703 bytes, which is a bit sad for some cosmetic thing which nobody ever looks at or modifies. Perhaps you can do static int return_EIO_int(void) { return -EIO; } static int

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 04 Jan 2007 11:51:10 -0600 Eric Sandeen [EMAIL PROTECTED] wrote: Andrew Morton wrote: Al is correct, of course. But the patch takes bad_inode.o from 280 up to 703 bytes, which is a bit sad for some cosmetic thing which nobody ever looks at or modifies. Perhaps you can do

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Andrew Morton wrote: On Thu, 04 Jan 2007 11:51:10 -0600 Eric Sandeen [EMAIL PROTECTED] wrote: Also - is it ok to alias a function with one signature to a function with another signature? Ordinarily I'd say no wucking fay, but that's effectively what we've been doing in there for ages, and

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 04 Jan 2007 12:33:59 -0600 Eric Sandeen [EMAIL PROTECTED] wrote: Andrew Morton wrote: On Thu, 04 Jan 2007 11:51:10 -0600 Eric Sandeen [EMAIL PROTECTED] wrote: Also - is it ok to alias a function with one signature to a function with another signature? Ordinarily I'd say no

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Andrew Morton wrote: On Thu, 04 Jan 2007 12:33:59 -0600 Eric Sandeen [EMAIL PROTECTED] wrote: Andrew Morton wrote: On Thu, 04 Jan 2007 11:51:10 -0600 Eric Sandeen [EMAIL PROTECTED] wrote: Also - is it ok to alias a function with one signature to a function

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 11:09:31AM -0800, Linus Torvalds wrote: But I'd argue we should only do it if there is an actual honest-to-goodness reason to do so. How about makes call graph analysis easier? ;-) In principle, I have no problem with force-casting, but it'd better be cast to the

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 07:14:51PM +, Al Viro wrote: On Thu, Jan 04, 2007 at 11:09:31AM -0800, Linus Torvalds wrote: But I'd argue we should only do it if there is an actual honest-to-goodness reason to do so. How about makes call graph analysis easier? ;-) In principle, I have

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Mikael Pettersson
On Thu, 04 Jan 2007 11:51:10 -0600, Eric Sandeen wrote: Also - is it ok to alias a function with one signature to a function with another signature? NO! Specific cases of type mismatches may work on many machines (say different pointer types as long as they aren't accessed), but in general this

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Al Viro wrote: How about makes call graph analysis easier? ;-) In principle, I have no problem with force-casting, but it'd better be cast to the right type... Do we really care in the kernel? We simply never use function pointer casts like this for anything

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Al Viro wrote: PS: what would be the sane strategy for timer series merge, BTW? I think Andrew may care more. I just care about it happening after 2.6.20. Whether we can do it really early after that, or whether we should do it as the last thing just before releasing

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 11:30:22AM -0800, Linus Torvalds wrote: On Thu, 4 Jan 2007, Al Viro wrote: How about makes call graph analysis easier? ;-) In principle, I have no problem with force-casting, but it'd better be cast to the right type... Do we really care in the kernel? We

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 4 Jan 2007 20:24:12 + Al Viro [EMAIL PROTECTED] wrote: So my main issue with fs/bad_inode.c is not even cast per se; it's that cast is to void *. But Eric's latest patch is OK in that regard, isn't it? It might confuse parsers (in fixable ways), but it is type-correct and has no

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Andrew Morton wrote: On Thu, 4 Jan 2007 20:24:12 + Al Viro [EMAIL PROTECTED] wrote: So my main issue with fs/bad_inode.c is not even cast per se; it's that cast is to void *. But Eric's latest patch is OK in that regard, isn't it? It might confuse parsers (in fixable ways), but it

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 04 Jan 2007 15:04:17 -0600 Eric Sandeen [EMAIL PROTECTED] wrote: Andrew Morton wrote: On Thu, 4 Jan 2007 20:24:12 + Al Viro [EMAIL PROTECTED] wrote: So my main issue with fs/bad_inode.c is not even cast per se; it's that cast is to void *. But Eric's latest patch is

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Andrew Morton wrote: On Thu, 04 Jan 2007 15:04:17 -0600 Eric Sandeen [EMAIL PROTECTED] wrote: Andrew Morton wrote: On Thu, 4 Jan 2007 20:24:12 + Al Viro [EMAIL PROTECTED] wrote: So my main issue with fs/bad_inode.c is not even cast per se; it's that cast is to void *. But Eric's

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Eric Sandeen wrote: Andrew Morton wrote: btw, couldn't we fix this bug with a simple old --- a/fs/bad_inode.c~a +++ a/fs/bad_inode.c @@ -15,7 +15,7 @@ #include linux/smp_lock.h #include linux/namei.h -static int return_EIO(void) +static long

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Linus Torvalds wrote: On Thu, 4 Jan 2007, Eric Sandeen wrote: Andrew Morton wrote: btw, couldn't we fix this bug with a simple old --- a/fs/bad_inode.c~a +++ a/fs/bad_inode.c @@ -15,7 +15,7 @@ #include linux/smp_lock.h #include linux/namei.h -static int return_EIO(void) +static

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 01:30:47PM -0800, Linus Torvalds wrote: I'll happily cast away arguments that aren't used, but I'm not sure that we ever should cast different return values (not int vs long, but also not loff_t etc). On 32-bit architectures, 64-bit entities may be returned

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Mitchell Blank Jr
Al Viro wrote: At least 3 versions, unless you want to mess with ifdefs to reduce them to two. I don't think you need to do fancy #ifdef's: static s32 return_eio_32(void) { return -EIO; } static s64 return_eio_64(void) { return -EIO; } extern void return_eio_unknown(void); /* Doesn't exist

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Mitchell Blank Jr wrote: I don't think you need to do fancy #ifdef's: static s32 return_eio_32(void) { return -EIO; } static s64 return_eio_64(void) { return -EIO; } extern void return_eio_unknown(void); /* Doesn't exist */ #define return_eio(type)

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Linus Torvalds wrote: Anybody want to send in the patch that just generates separate versions for loff_t eio_llseek(struct file *file, loff_t offset, int origin) { return -EIO; } int eio_readdir(struct file *filp, void *dirent, filldir_t filldir)

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Mitchell Blank Jr
Linus Torvalds wrote: Well, that probably would work, but it's also true that returning a 64-bit value on a 32-bit platform really _does_ depend on more than the size. Yeah, obviously this is restricted to the signed-integer case. My point was just that you could have the compiler figure out

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Andrew Morton
On Thu, 4 Jan 2007 14:35:09 -0800 (PST) Linus Torvalds [EMAIL PROTECTED] wrote: Anybody want to send in the patch that just generates separate versions for loff_t eio_llseek(struct file *file, loff_t offset, int origin) { return -EIO; } int

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Linus Torvalds
On Thu, 4 Jan 2007, Andrew Morton wrote: That's what I currently have queued. It increases bad_inode.o text from 200-odd bytes to 700-odd :( Then I think we're ok. We do care about bytes, but we care more about bytes that actually ever hit the icache or dcache, and this will effectively

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Eric Sandeen
Linus Torvalds wrote: On Thu, 4 Jan 2007, Andrew Morton wrote: That's what I currently have queued. It increases bad_inode.o text from 200-odd bytes to 700-odd :( Then I think we're ok. We do care about bytes, but we care more about bytes that actually ever hit the icache or

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-04 Thread Al Viro
On Thu, Jan 04, 2007 at 03:21:06PM -0800, Mitchell Blank Jr wrote: Linus Torvalds wrote: Well, that probably would work, but it's also true that returning a 64-bit value on a 32-bit platform really _does_ depend on more than the size. Yeah, obviously this is restricted to the

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-03 Thread Andrew Morton
On Wed, 03 Jan 2007 17:46:00 -0600 Eric Sandeen <[EMAIL PROTECTED]> wrote: > Take 2... all in one file. I suppose I really did know better than > to create that new header. ;-) > > Better? > > --- > > CVE-2006-5753 is for a case where an inode can be marked bad, switching > the ops to

[UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-03 Thread Eric Sandeen
Take 2... all in one file. I suppose I really did know better than to create that new header. ;-) Better? --- CVE-2006-5753 is for a case where an inode can be marked bad, switching the ops to bad_inode_ops, which are all connected as: static int return_EIO(void) { return -EIO; }

[UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-03 Thread Eric Sandeen
Take 2... all in one file. I suppose I really did know better than to create that new header. ;-) Better? --- CVE-2006-5753 is for a case where an inode can be marked bad, switching the ops to bad_inode_ops, which are all connected as: static int return_EIO(void) { return -EIO; }

Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values

2007-01-03 Thread Andrew Morton
On Wed, 03 Jan 2007 17:46:00 -0600 Eric Sandeen [EMAIL PROTECTED] wrote: Take 2... all in one file. I suppose I really did know better than to create that new header. ;-) Better? --- CVE-2006-5753 is for a case where an inode can be marked bad, switching the ops to