diff options
-rw-r--r-- | arch/x86/boot/Makefile | 6 | ||||
-rw-r--r-- | arch/x86/kernel/entry_32.S | 17 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_32.tbl | 2 |
3 files changed, 14 insertions, 11 deletions
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 3e02148bb774..5a747dd884db 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -37,9 +37,9 @@ setup-y += video-bios.o | |||
37 | targets += $(setup-y) | 37 | targets += $(setup-y) |
38 | hostprogs-y := mkcpustr tools/build | 38 | hostprogs-y := mkcpustr tools/build |
39 | 39 | ||
40 | HOSTCFLAGS_mkcpustr.o := -I$(srctree)/arch/$(SRCARCH)/include | 40 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(LINUXINCLUDE) \ |
41 | HOST_EXTRACFLAGS += -I$(objtree)/include -I$(srctree)/tools/include \ | 41 | -D__EXPORTED_HEADERS__ |
42 | -include $(srctree)/include/linux/kconfig.h | 42 | |
43 | $(obj)/cpu.o: $(obj)/cpustr.h | 43 | $(obj)/cpu.o: $(obj)/cpustr.h |
44 | 44 | ||
45 | quiet_cmd_cpustr = CPUSTR $@ | 45 | quiet_cmd_cpustr = CPUSTR $@ |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 79d97e68f042..7b784f4ef1e4 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -98,12 +98,6 @@ | |||
98 | #endif | 98 | #endif |
99 | .endm | 99 | .endm |
100 | 100 | ||
101 | #ifdef CONFIG_VM86 | ||
102 | #define resume_userspace_sig check_userspace | ||
103 | #else | ||
104 | #define resume_userspace_sig resume_userspace | ||
105 | #endif | ||
106 | |||
107 | /* | 101 | /* |
108 | * User gs save/restore | 102 | * User gs save/restore |
109 | * | 103 | * |
@@ -327,10 +321,19 @@ ret_from_exception: | |||
327 | preempt_stop(CLBR_ANY) | 321 | preempt_stop(CLBR_ANY) |
328 | ret_from_intr: | 322 | ret_from_intr: |
329 | GET_THREAD_INFO(%ebp) | 323 | GET_THREAD_INFO(%ebp) |
330 | check_userspace: | 324 | resume_userspace_sig: |
325 | #ifdef CONFIG_VM86 | ||
331 | movl PT_EFLAGS(%esp), %eax # mix EFLAGS and CS | 326 | movl PT_EFLAGS(%esp), %eax # mix EFLAGS and CS |
332 | movb PT_CS(%esp), %al | 327 | movb PT_CS(%esp), %al |
333 | andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax | 328 | andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax |
329 | #else | ||
330 | /* | ||
331 | * We can be coming here from a syscall done in the kernel space, | ||
332 | * e.g. a failed kernel_execve(). | ||
333 | */ | ||
334 | movl PT_CS(%esp), %eax | ||
335 | andl $SEGMENT_RPL_MASK, %eax | ||
336 | #endif | ||
334 | cmpl $USER_RPL, %eax | 337 | cmpl $USER_RPL, %eax |
335 | jb resume_kernel # not returning to v8086 or userspace | 338 | jb resume_kernel # not returning to v8086 or userspace |
336 | 339 | ||
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index ce98e287c066..e7e67cc3c14b 100644 --- a/arch/x86/syscalls/syscall_32.tbl +++ b/arch/x86/syscalls/syscall_32.tbl | |||
@@ -288,7 +288,7 @@ | |||
288 | 279 i386 mq_timedsend sys_mq_timedsend compat_sys_mq_timedsend | 288 | 279 i386 mq_timedsend sys_mq_timedsend compat_sys_mq_timedsend |
289 | 280 i386 mq_timedreceive sys_mq_timedreceive compat_sys_mq_timedreceive | 289 | 280 i386 mq_timedreceive sys_mq_timedreceive compat_sys_mq_timedreceive |
290 | 281 i386 mq_notify sys_mq_notify compat_sys_mq_notify | 290 | 281 i386 mq_notify sys_mq_notify compat_sys_mq_notify |
291 | 282 i386 mq_getsetaddr sys_mq_getsetattr compat_sys_mq_getsetattr | 291 | 282 i386 mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr |
292 | 283 i386 kexec_load sys_kexec_load compat_sys_kexec_load | 292 | 283 i386 kexec_load sys_kexec_load compat_sys_kexec_load |
293 | 284 i386 waitid sys_waitid compat_sys_waitid | 293 | 284 i386 waitid sys_waitid compat_sys_waitid |
294 | # 285 sys_setaltroot | 294 | # 285 sys_setaltroot |