Hello!
On Tue, Jan 21, 2003 at 11:51:01AM -0800, Andrew Morton wrote:
> > I think vmtruncate() should preserve that pages.
> That would make sense. But we'd have to go and create zillions
> of copies of pages inside truncate, and given that the behaviour
> is unspecified, it is questionable whether anyone should be
> relying on the behaviour anyway..
It is way too easy to truncate some library and all executables (that are loaded
right now) will go nuts (Just did echo >/lib/libncurses.so.5.2 and expected
everything will get SIGBUS, but all the bashes and mutt went crazy consuming
memory until oom-killer killed them. Kind of surprising behaviour, I'd say.
Test was done on 2.4.19).
Also *BSD systems seems to return -ETXTBSY not only when you try to write-open
running executables, but also all of shared libs used (and this is probably
even more logical ).
Bye,
Oleg
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
References:
- [RFC] vmtruncate releases pages of MAP_PRIVATE vmaAlex Tomas
- Re: [RFC] vmtruncate releases pages of MAP_PRIVATE vmaAndrew Morton
- Prev by Date: Re: Killing off the boot sector (was: [STATUS 2.5] January 8, 2002)
- Next by Date: Re: SIOCGSTAMP does not work ?
- Previous by thread: Re: [RFC] vmtruncate releases pages of MAP_PRIVATE vma
- Next by thread: 32bit dev_t
- Indexes:[Main][Thread]