lkml.org 
[lkml]   [2001]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 2.4 and 2GB swap partition limit
Date
Andi Kleen writes:
> On Mon, Apr 30, 2001 at 12:07:44PM -0700, David S. Miller wrote:
> But something must have been not working with it for mmaps/shlibs
> (not executables); at least historically.
> At least I remember that all hell broke lose when you tried to update
> libc by cp'ing a new one to /lib/libc.so in the 1.2 days. cp should create a
> new inode (it uses O_CREAT) so in theory it should be coherent by the inode
> reference; but somehow it didn't use to work and random already running
> programs started to segfault. This was long ago. I wonder if old
> GNU cp used O_TRUNC instead of O_CREAT, or was there some other kernel bug
> with mappings (hopefully long since fixed). Anybody remembers?

No, "cp" is still not a safe way to update libc, and I doubt it ever will be.
cp does _not_ create a new inode (unlike mv), so you are writing "garbage"
into the currently running executables.

NB: my open(2) says for O_CREAT "If the file does not exist it will be
created". This is _not_ the same as O_EXCL, which will only mean that
open(2) will fail when it tries to create a new file.

Cheers, Andreas
--
Andreas Dilger Turbolinux filesystem development
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site