Re: [Patch 3/3] elf: use a macro instead of a raw number

Roland McGrath
2009-07-02T09:56:42Z

> But in the kernel code, pr_fname is copied from ->comm, they should
> be equal, shouldn't they?

The point is that we are not at liberty to change the size of pr_fname.
Its size and layout are known to userland and thus set in stone. To
have a larger size, we would have to invent a new NT_* type code with a
new layout that would also be known to userland. It's not worth the
bother.

Nowadays a debugger can see AT_EXECFN in auxv (NT_AUXV in core files,
/proc/pid/auxv live), and look at that address in the user memory (core
file or process). That's clobberable on the user-mode stack, but it can
be of unbounded size.

Thanks,
Roland