|
From: John R. <jr...@bi...> - 2012-02-23 01:41:36
|
> Perhaps according to the rationale: >> by the time execution reaches those parts of the application >> program a user cares about, glibc will have populated the registers >> with some defined values anyhow? So why bother here? > > For the actual answer, which is highly platform-dependent, see > <linux>/fs/binfmt_elf.h and the macro call: > ELF_PLAT_INIT(regs, reloc_func_desc); > On some $ARCH, execve() actually defines quite a few registers. As a matter of information security (not leaking any data from anywhere else), the kernel must set all user-visible registers to something, probably zero (before ELF_PLAT_INIT chooses something else.) -- |