Skip to content

Commit

Permalink
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/tip/tip

Pull additional x86 fixes from Peter Anvin:
 - address a long-standing bug related to when a kernel-spawned process
   gets a signal on an i386 kernel compiled without CONFIG_VM86.

 - fix the newly introduced build warning in arch/x86/boot.

 - fix a typo in the i386 system call table which affects building some
   libcs.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-32: Fix endless loop when processing signals for kernel tasks
  x86, boot: Correct CFLAGS for hostprogs
  x86-32: Fix typo for mq_getsetattr in syscall table
  • Loading branch information
Linus Torvalds committed Mar 24, 2012
2 parents 8e3ade2 + 29a2e28 commit 2fb9e96
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions arch/x86/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ setup-y += video-bios.o
targets += $(setup-y)
hostprogs-y := mkcpustr tools/build

HOSTCFLAGS_mkcpustr.o := -I$(srctree)/arch/$(SRCARCH)/include
HOST_EXTRACFLAGS += -I$(objtree)/include -I$(srctree)/tools/include \
-include $(srctree)/include/linux/kconfig.h
HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(LINUXINCLUDE) \
-D__EXPORTED_HEADERS__

$(obj)/cpu.o: $(obj)/cpustr.h

quiet_cmd_cpustr = CPUSTR $@
Expand Down
17 changes: 10 additions & 7 deletions arch/x86/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@
#endif
.endm

#ifdef CONFIG_VM86
#define resume_userspace_sig check_userspace
#else
#define resume_userspace_sig resume_userspace
#endif

/*
* User gs save/restore
*
Expand Down Expand Up @@ -327,10 +321,19 @@ ret_from_exception:
preempt_stop(CLBR_ANY)
ret_from_intr:
GET_THREAD_INFO(%ebp)
check_userspace:
resume_userspace_sig:
#ifdef CONFIG_VM86
movl PT_EFLAGS(%esp), %eax # mix EFLAGS and CS
movb PT_CS(%esp), %al
andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax
#else
/*
* We can be coming here from a syscall done in the kernel space,
* e.g. a failed kernel_execve().
*/
movl PT_CS(%esp), %eax
andl $SEGMENT_RPL_MASK, %eax
#endif
cmpl $USER_RPL, %eax
jb resume_kernel # not returning to v8086 or userspace

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/syscalls/syscall_32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
279 i386 mq_timedsend sys_mq_timedsend compat_sys_mq_timedsend
280 i386 mq_timedreceive sys_mq_timedreceive compat_sys_mq_timedreceive
281 i386 mq_notify sys_mq_notify compat_sys_mq_notify
282 i386 mq_getsetaddr sys_mq_getsetattr compat_sys_mq_getsetattr
282 i386 mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr
283 i386 kexec_load sys_kexec_load compat_sys_kexec_load
284 i386 waitid sys_waitid compat_sys_waitid
# 285 sys_setaltroot
Expand Down

0 comments on commit 2fb9e96

Please sign in to comment.