kernel-hacking-2024-linux-s.../arch/x86
Mathias Krause dac853ae89 exec: delay address limit change until point of no return
Unconditionally changing the address limit to USER_DS and not restoring
it to its old value in the error path is wrong because it prevents us
using kernel memory on repeated calls to this function.  This, in fact,
breaks the fallback of hard coded paths to the init program from being
ever successful if the first candidate fails to load.

With this patch applied switching to USER_DS is delayed until the point
of no return is reached which makes it possible to have a multi-arch
rootfs with one arch specific init binary for each of the (hard coded)
probed paths.

Since the address limit is already set to USER_DS when start_thread()
will be invoked, this redundancy can be safely removed.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-09 12:50:05 -07:00
..
boot
configs cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
crypto
ia32 ns: Wire up the setns system call 2011-05-28 10:48:39 -07:00
include/asm Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6 2011-05-29 11:18:09 -07:00
kernel exec: delay address limit change until point of no return 2011-06-09 12:50:05 -07:00
kvm Merge branch 'kvm-updates/3.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2011-06-07 19:06:28 -07:00
lguest lguest: fix timer interrupt setup 2011-05-30 11:14:10 +09:30
lib
math-emu
mm x86: Move do_page_fault()'s error path under unlikely() 2011-05-26 13:54:03 +02:00
net
oprofile Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/urgent 2011-05-27 14:08:09 +02:00
pci Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2011-05-23 15:39:34 -07:00
platform x86, efi: Retain boot service code until after switching to virtual mode 2011-05-25 17:03:53 -07:00
power
tools
vdso x86: vdso: Remove unused variable 2011-05-26 13:17:35 +02:00
video
xen xen: off by one errors in multicalls.c 2011-06-03 16:04:02 -04:00
.gitignore
Kbuild
Kconfig arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT} 2011-05-26 17:12:38 -07:00
Kconfig.cpu
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile
Makefile_32.cpu