Re: [Patch 3/3] elf: use a macro instead of a raw number
From: Roland McGrath
Date: Thu Jul 02 2009 - 05:56:47 EST
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/