android_kernel_xiaomi_sdm845/arch/i386
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
..
boot [PATCH] vesafb: Fix incorrect logo colors in x86_64 2006-04-11 06:18:54 -07:00
crypto [CRYPTO] aes-i586: Remove unused variable ls_tab 2006-01-09 14:15:53 -08:00
kernel [PATCH] x86: kernel irq balance doesn't work 2006-06-23 07:42:57 -07:00
lib [PATCH] x86: cache pollution aware __copy_from_user_ll() 2006-06-23 07:42:56 -07:00
mach-default [PATCH] Fix topology.c location 2006-02-24 14:31:39 -08:00
mach-es7000 [PATCH] Compilation fix for ES7000 when no ACPI is specified in config (i386) 2006-03-23 07:38:04 -08:00
mach-generic [PATCH] i386: apic= command line option should always be 2006-05-30 20:31:05 -07:00
mach-visws [PATCH] kill include/linux/platform.h, default_idle() cleanup 2006-03-24 07:33:21 -08:00
mach-voyager [PATCH] voyager: no need to define BITS_PER_BYTE when it's already in types.h 2006-04-19 09:13:51 -07:00
math-emu [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
mm [PATCH] i386: let usermode execute the "enter" instruction 2006-06-23 07:42:57 -07:00
oprofile [PATCH] Add Core Solo and Core Duo support to oprofile 2006-05-15 11:20:56 -07:00
pci [PATCH] x86: call eisa_set_level_irq() in pbibios_lookup_irq() 2006-06-23 07:42:56 -07:00
power [PATCH] Don't trigger full rebuild via CONFIG_X86_MCE 2006-06-23 07:42:56 -07:00
defconfig update the i386 defconfig 2006-03-20 20:14:06 +01:00
Kconfig [PATCH] Unify pxm_to_node() and node_to_pxm() 2006-06-23 07:42:48 -07:00
Kconfig.cpu [PATCH] Enable TSC for AMD Geode GX/LX 2006-04-11 06:18:34 -07:00
Kconfig.debug [PATCH] i386: Move CONFIG_DOUBLEFAULT into arch/i386 where it belongs. 2006-04-18 10:39:20 -07:00
Makefile [PATCH] x86: "make isoimage" support; FDINITRD= support; minor cleanups 2006-03-26 08:56:53 -08:00
Makefile.cpu [PATCH] x86-64: Use -mtune=generic for generic kernels 2006-03-25 09:10:52 -08:00