kernel-ark/arch
Chuck Ebbert 21528454f6 [PATCH] i386: let usermode execute the "enter" instruction
The i386 page fault handler does not allow enough slack when checking for
userspace access below the current stack pointer.  This prevents use of the
enter instruction by user code.  Fix this by allowing enough slack for
"enter $65535,$31" to execute.

Problem reported by Tomasz Malesinski <tmal@mimuw.edu.pl>

Tested using this program, based on the original from Tomasz:

	.file	"ovflow.S"
	.version	"01.01"
gcc2_compiled.:
.section	.rodata
.LC0:
	.string	"asdf\n"
.text
	.align 4
.globl main
	.type	 main,@function
main:
nest_level=0
.rept 30
	enter $0,$nest_level
nest_level=nest_level+1
.endr
	enter $65535,$30
	enter $65535,$31
	addl $-12,%esp
	pushl $.LC0
	call printf
	addl $16,%esp
.L2:
.rept 32
	leave
.endr
	ret
.Lfe1:
	.size	 main,.Lfe1-main
	.ident	"GCC: (GNU) 2.95.4 20011002 (Debian prerelease)"

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:42:57 -07:00
..
alpha [PATCH] VFS: Permit filesystem to perform statfs with a known root dentry 2006-06-23 07:42:45 -07:00
arm [ARM] 3537/1: Rework DMA-bounce locking for finer granularity 2006-06-22 22:27:14 +01:00
arm26 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
cris [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
frv [PATCH] frv: trivial cleanups in frv_ksyms.c 2006-06-23 07:42:55 -07:00
h8300 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
i386 [PATCH] i386: let usermode execute the "enter" instruction 2006-06-23 07:42:57 -07:00
ia64 [PATCH] page migration: sys_move_pages(): support moving of individual pages 2006-06-23 07:42:53 -07:00
m32r [PATCH] m32r: update switch_to macro for tuning 2006-04-19 09:13:51 -07:00
m68k [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
m68knommu [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
mips [PATCH] mips: fix number of mremap arguments 2006-06-23 07:42:56 -07:00
parisc [PATCH] VFS: Permit filesystem to perform statfs with a known root dentry 2006-06-23 07:42:45 -07:00
powerpc [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
ppc Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
s390 [PATCH] s390: fix typo in stop_hz_timer. 2006-05-25 12:09:55 -07:00
sh [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
sh64 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
sparc [PATCH] sparc build breakage 2006-06-22 15:05:55 -07:00
sparc64 [PATCH] VFS: Permit filesystem to perform statfs with a known root dentry 2006-06-23 07:42:45 -07:00
um Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
v850 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
x86_64 [PATCH] sys_move_pages: 32bit support (i386, x86_64) 2006-06-23 07:42:53 -07:00
xtensa [PATCH] zlib_inflate: Upgrade library code to a recent version 2006-06-22 15:05:58 -07:00