lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 30 Jan 2007 21:02:08 -0500
From:	Jeff Layton <jlayton@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	Bodo Eggert <7eggert@....de>, akpm@...l.org, dev@...ru,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	torvalds@...l.org
Subject: Re: [PATCH] pipefs unique inode numbers

Linus Torvalds wrote:
 >
 > On Tue, 30 Jan 2007, Jeff Layton wrote:
 >> Also, that patch would break many 32-bit programs not compiled with large
 >> offsets when run in compatibility mode on a 64-bit kernel. If they were to
 >> do a stat on this inode, it would likely generate an EOVERFLOW error since
 >> the pointer address would probably not fit in a 32 bit field.
 >>
 >> That problem was the whole impetus for this set of patches.
 >
 > Well, we have that problem with the slowly incrementing "last_ino" too.
 >
 > Should we make "last_ino" be "static unsigned int" instead of "long"?
 >
 > Does anybody actually even use the old stat() with 32-bit interfaces? We
 > warn for it, and we've done so for a long time.. I dont' remember people
 > even complaining about the warning, so..
 >
 > 		Linus

I've actually sent Andrew a patch that does that and the same thing to
the counter in iunique as well. It's in -mm now, but I think it's pretty
safe and can probably go into your tree any time you're ready for it.

It's been quite a while since I looked at the original problem, but I
believe glibc actually uses stat64 to make the call, so it doesn't
throw the warning. The EOVERFLOW comes from glibc when it gets back an
st_ino value that won't fit in the 32 bit buffer provided by the program.

Obviously, we can't do anything for filesystems with permanent inodes larger
than 32 bits, but when generating them on the fly via new_inode or iunique,
we ought to try and have them fit in 32 bits if possible (at least as long
as we can).

-- Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ