linux_dsm_epyc7002/arch/m68k
Greg Ungerer e95c3f7a09 m68knommu: fix trap on execing /bin/init
As of commit fea82210 ("m68k: switch to saner kernel_execve() semantics")
the non-mmu m68k targets have trapped on booting. The execing of /bin/init
causes the exec path to try and return through a 0x0 return address - thus
trapping or otherwise hanging or crashing.

The problem isn't in the exec path as such though, but rather in the
m68knommu start_thread() macro. It is trying to clear the a6 register that
it assumes is part of a struct switch_stack below the thread registers on
our stack. But that is not what the stack frames look like when this is run.
So it ends up corrupting our call stack and zeroing out a function return
address that is sitting there.

The clearing of a6 was introduced many years ago in commit 7bf9a37d8d
("m68knommu: force stack alignment on ColdFire"). It used to work because
the kernel init exec code path had a short cut back to the exception return
code, and it didn't need to return through the calls on the stack.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2013-02-06 11:13:23 +10:00
..
amiga m68k/amiga: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR 2012-08-18 15:15:57 +02:00
apollo m68k/apollo: Rename "timer" to "apollo_timer" 2012-07-22 16:55:49 +02:00
atari m68k/atari: Change VME irq numbers from unsigned long to unsigned int 2012-04-22 20:16:49 +02:00
bvme6000 Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
configs netfilter: remove xt_NOTRACK 2012-09-03 13:36:40 +02:00
emu ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
fpsp040 Fix common misspellings 2011-03-31 11:26:23 -03:00
hp300 Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
ifpsp060 Fix common misspellings 2011-03-31 11:26:23 -03:00
include m68knommu: fix trap on execing /bin/init 2013-02-06 11:13:23 +10:00
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2013-01-23 13:31:15 -08:00
lib m68k: fix unused variable warning in mempcy.c 2012-12-05 10:51:23 +10:00
mac m68k/mac: Add missing platform check before registering platform devices 2012-04-01 22:57:51 +02:00
math-emu Fix misspellings of "whether" in comments. 2012-11-19 14:31:35 +01:00
mm m68k: fix conditional use of init_pointer_table 2013-01-07 16:13:04 +10:00
mvme16x Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
mvme147 Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
platform m68knommu: modify clock code so it can be used by all ColdFire CPU types 2012-12-05 10:51:35 +10:00
q40 m68k/q40: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR 2012-08-18 15:15:58 +02:00
sun3 m68k/sun3: Get interrupts working again 2012-11-14 08:50:57 +01:00
sun3x Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
tools/amiga Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
install.sh kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
Kconfig Bury the conditionals from kernel_thread/kernel_execve series 2012-12-19 18:07:38 -05:00
Kconfig.bus arch/m68k: remove CONFIG_EXPERIMENTAL 2012-11-14 08:50:54 +01:00
Kconfig.cpu Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2012-12-16 17:42:21 -08:00
Kconfig.debug arch/m68k: remove CONFIG_EXPERIMENTAL 2012-11-14 08:50:54 +01:00
Kconfig.devices arch/m68k: remove CONFIG_EXPERIMENTAL 2012-11-14 08:50:54 +01:00
Kconfig.machine m68k/Kconfig: Separate classic m68k and coldfire early 2011-12-30 10:20:49 +10:00
Makefile m68knommu: platform code merge for 68000 core cpus 2012-12-05 10:48:47 +10:00