ARM: 7791/1: a.out: remove partial a.out support
a.out support on ARM requires that argc, argv and envp are passed in
r0-r2 respectively, which requires hacking load_aout_binary to
prevent argc being clobbered by the return code. Whilst mainline kernels
do set the registers up in start_thread, the aout loader has never
carried the hack in mainline.

Initialising the registers in this way actually goes against the libc
expectations for ELF binaries, where argc, argv and envp are passed on
the stack, with r0 being used to hold a pointer to an exit function for
cleaning up after the dynamic linker if required. If the pointer is
NULL, then it is ignored. When execing an ELF binary, Linux currently
zeroes r0, then sets it to argc and then finally clobbers it with the
return value of the execve syscall, so we actually end up with:

	r0 = 0
	stack[0] = argc
	r1 = stack[1] = argv
	r2 = stack[2] = envp

libc treats r1 and r2 as undefined. The clobbering of r0 by sys_execve
works for user-spawned threads, but when executing an ELF binary from a
kernel thread (via call_usermodehelper), the execve is performed on the
ret_from_fork path, which restores r0 from the saved pt_regs, resulting
in argc being presented to the C library. This has horrible consequences
when the application exits, since we have an exit function registered
using argc, resulting in a jump to hyperspace.

This patch solves the problem by removing the partial a.out support from
arch/arm/ altogether.

Cc: <stable@vger.kernel.org>
Cc: Ashish Sangwan <ashishsangwan2@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

adapted from Linux 3.11-rc4 by mrg666

Conflicts:
	arch/arm/configs/slim_rhine_togari_row_defconfig
disable MEDIA_TUNER
kgsl: build only 3xx for togari
Massive rollback of slim changes

Revert "cpufreq/cpufreq_intellidemand: intellidemand cpufreq"

This reverts commit 405d21027c7260fba7e1a03a203fe8a37c37a562.

Conflicts:
	arch/arm/mach-msm/cpufreq.c
	drivers/cpufreq/Makefile
	drivers/cpufreq/cpufreq_intellidemand.c

Revert "Honami/Togari: Enable power suspend"

This reverts commit 245ec534951420ba0315494484162312734e46fe.

Revert "kernel/power/powersuspend: LCD screen on/off hooks (Yank555.lu)"

This reverts commit 362cef1c29946621175c60d2645b6d139a2c29b6.

Revert "kernel/power/powersuspend: default to userspace for now"

This reverts commit bc356e881a14a817269e7b5cb9205a4d510f134e.

Revert "kernel/power/powersuspend: add back userpace control w/ default kernel control"

This reverts commit 9b01f23f9261fd8430c90cd4044c28fb37771190.

Revert "kernel/power/powersuspend: remove userspace dependency from powersuspend"

This reverts commit 4d09d6157992d4ce8683bb6709f75ed4ca69e8df.

Revert "powersuspend: new PM kernel driver for Android w/o early_suspend"

This reverts commit 90da309d78b3d377d728915c132109d6d0292cb2.

Revert "Honami/Togari: Enable zram"

This reverts commit 929cfa6cf52778825398b64b8425862dd31ae136.

Revert "clock-krait/cpufreq: custom voltage control v1"

This reverts commit 3d2ed72f0eba44a6610d8a8cf9b3eb2bcd21b2b5.

Revert "block: introduce the BFQ-v6r2 I/O sched for 3.4"

This reverts commit 55f6ea274e1167e3c3e14fdc413e709cb5cc9bcf.

Revert "Squash fiops commits"

This reverts commit 9c4fd5d35db17a48d70c83c3f29f5441210ff725.

Revert "Added SIO based on Stratosk algorithm"

This reverts commit 103ee89b70286da0921e7faf6d016ce677620dec.

Revert "Makefile: adding config variable for Os/O2/O3 compilation"

This reverts commit b9c50a6dadfa59e807112ab1d1e3e4141a4a2325.

Conflicts:
	Makefile