Messages in this thread | | | Date | Mon, 5 Mar 2012 17:31:30 +0100 | From | Oleg Nesterov <> | Subject | Re: [RFC] c/r: prctl: Add ability to set new mm_struct::exe_file |
| |
On 03/05, Cyrill Gorcunov wrote: > > On Mon, Mar 05, 2012 at 04:40:29PM +0100, Oleg Nesterov wrote: > > > > This prctl does cheat the kernel > > > > Yep. Except, well, it cheats the user-space. > > And kernel as well, since this link is not anymore > the same as it was, and memory read from this file > (at execution time) will keep data irrelevant to what > the new symlink points to (but it's exactly by design).
The kernel will never use this file for reading. It is only used as a placeholder for ->f_path shown in proc.
User-space can be confused, yes, this is by design.
Oleg.
| |