Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Don't leak 64-bit kernel register values to 32-bit processes x86, SLUB: Remove unused CONFIG FAST_CMPXCHG_LOCAL x86: earlyprintk: Fix regression to handle serial,ttySn as 1 arg x86: Don't generate cmpxchg8b_emu if CONFIG_X86_CMPXCHG64=y x86: Fix csum_ipv6_magic asm memory clobber x86: Optimize cmpxchg64() at build-time some more
This commit is contained in:
@@ -671,6 +671,7 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
earlyprintk= [X86,SH,BLACKFIN]
|
earlyprintk= [X86,SH,BLACKFIN]
|
||||||
earlyprintk=vga
|
earlyprintk=vga
|
||||||
earlyprintk=serial[,ttySn[,baudrate]]
|
earlyprintk=serial[,ttySn[,baudrate]]
|
||||||
|
earlyprintk=ttySn[,baudrate]
|
||||||
earlyprintk=dbgp[debugController#]
|
earlyprintk=dbgp[debugController#]
|
||||||
|
|
||||||
Append ",keep" to not disable it when the real console
|
Append ",keep" to not disable it when the real console
|
||||||
|
@@ -86,10 +86,6 @@ config STACKTRACE_SUPPORT
|
|||||||
config HAVE_LATENCYTOP_SUPPORT
|
config HAVE_LATENCYTOP_SUPPORT
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
config FAST_CMPXCHG_LOCAL
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
config MMU
|
config MMU
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
@@ -400,7 +400,7 @@ config X86_TSC
|
|||||||
|
|
||||||
config X86_CMPXCHG64
|
config X86_CMPXCHG64
|
||||||
def_bool y
|
def_bool y
|
||||||
depends on X86_PAE || X86_64
|
depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM
|
||||||
|
|
||||||
# this should be set for all -march=.. options where the compiler
|
# this should be set for all -march=.. options where the compiler
|
||||||
# generates cmov.
|
# generates cmov.
|
||||||
@@ -412,6 +412,7 @@ config X86_MINIMUM_CPU_FAMILY
|
|||||||
int
|
int
|
||||||
default "64" if X86_64
|
default "64" if X86_64
|
||||||
default "6" if X86_32 && X86_P6_NOP
|
default "6" if X86_32 && X86_P6_NOP
|
||||||
|
default "5" if X86_32 && X86_CMPXCHG64
|
||||||
default "4" if X86_32 && (X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK)
|
default "4" if X86_32 && (X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK)
|
||||||
default "3"
|
default "3"
|
||||||
|
|
||||||
|
@@ -21,8 +21,8 @@
|
|||||||
#define __AUDIT_ARCH_LE 0x40000000
|
#define __AUDIT_ARCH_LE 0x40000000
|
||||||
|
|
||||||
#ifndef CONFIG_AUDITSYSCALL
|
#ifndef CONFIG_AUDITSYSCALL
|
||||||
#define sysexit_audit int_ret_from_sys_call
|
#define sysexit_audit ia32_ret_from_sys_call
|
||||||
#define sysretl_audit int_ret_from_sys_call
|
#define sysretl_audit ia32_ret_from_sys_call
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8)
|
#define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8)
|
||||||
@@ -39,12 +39,12 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
/* clobbers %eax */
|
/* clobbers %eax */
|
||||||
.macro CLEAR_RREGS _r9=rax
|
.macro CLEAR_RREGS offset=0, _r9=rax
|
||||||
xorl %eax,%eax
|
xorl %eax,%eax
|
||||||
movq %rax,R11(%rsp)
|
movq %rax,\offset+R11(%rsp)
|
||||||
movq %rax,R10(%rsp)
|
movq %rax,\offset+R10(%rsp)
|
||||||
movq %\_r9,R9(%rsp)
|
movq %\_r9,\offset+R9(%rsp)
|
||||||
movq %rax,R8(%rsp)
|
movq %rax,\offset+R8(%rsp)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -172,6 +172,10 @@ sysexit_from_sys_call:
|
|||||||
movl RIP-R11(%rsp),%edx /* User %eip */
|
movl RIP-R11(%rsp),%edx /* User %eip */
|
||||||
CFI_REGISTER rip,rdx
|
CFI_REGISTER rip,rdx
|
||||||
RESTORE_ARGS 1,24,1,1,1,1
|
RESTORE_ARGS 1,24,1,1,1,1
|
||||||
|
xorq %r8,%r8
|
||||||
|
xorq %r9,%r9
|
||||||
|
xorq %r10,%r10
|
||||||
|
xorq %r11,%r11
|
||||||
popfq
|
popfq
|
||||||
CFI_ADJUST_CFA_OFFSET -8
|
CFI_ADJUST_CFA_OFFSET -8
|
||||||
/*CFI_RESTORE rflags*/
|
/*CFI_RESTORE rflags*/
|
||||||
@@ -202,7 +206,7 @@ sysexit_from_sys_call:
|
|||||||
|
|
||||||
.macro auditsys_exit exit,ebpsave=RBP
|
.macro auditsys_exit exit,ebpsave=RBP
|
||||||
testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
|
testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
|
||||||
jnz int_ret_from_sys_call
|
jnz ia32_ret_from_sys_call
|
||||||
TRACE_IRQS_ON
|
TRACE_IRQS_ON
|
||||||
sti
|
sti
|
||||||
movl %eax,%esi /* second arg, syscall return value */
|
movl %eax,%esi /* second arg, syscall return value */
|
||||||
@@ -218,8 +222,9 @@ sysexit_from_sys_call:
|
|||||||
cli
|
cli
|
||||||
TRACE_IRQS_OFF
|
TRACE_IRQS_OFF
|
||||||
testl %edi,TI_flags(%r10)
|
testl %edi,TI_flags(%r10)
|
||||||
jnz int_with_check
|
jz \exit
|
||||||
jmp \exit
|
CLEAR_RREGS -ARGOFFSET
|
||||||
|
jmp int_with_check
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
sysenter_auditsys:
|
sysenter_auditsys:
|
||||||
@@ -329,6 +334,9 @@ sysretl_from_sys_call:
|
|||||||
CFI_REGISTER rip,rcx
|
CFI_REGISTER rip,rcx
|
||||||
movl EFLAGS-ARGOFFSET(%rsp),%r11d
|
movl EFLAGS-ARGOFFSET(%rsp),%r11d
|
||||||
/*CFI_REGISTER rflags,r11*/
|
/*CFI_REGISTER rflags,r11*/
|
||||||
|
xorq %r10,%r10
|
||||||
|
xorq %r9,%r9
|
||||||
|
xorq %r8,%r8
|
||||||
TRACE_IRQS_ON
|
TRACE_IRQS_ON
|
||||||
movl RSP-ARGOFFSET(%rsp),%esp
|
movl RSP-ARGOFFSET(%rsp),%esp
|
||||||
CFI_RESTORE rsp
|
CFI_RESTORE rsp
|
||||||
@@ -353,7 +361,7 @@ cstar_tracesys:
|
|||||||
#endif
|
#endif
|
||||||
xchgl %r9d,%ebp
|
xchgl %r9d,%ebp
|
||||||
SAVE_REST
|
SAVE_REST
|
||||||
CLEAR_RREGS r9
|
CLEAR_RREGS 0, r9
|
||||||
movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
|
movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
|
||||||
movq %rsp,%rdi /* &pt_regs -> arg1 */
|
movq %rsp,%rdi /* &pt_regs -> arg1 */
|
||||||
call syscall_trace_enter
|
call syscall_trace_enter
|
||||||
@@ -425,6 +433,8 @@ ia32_do_call:
|
|||||||
call *ia32_sys_call_table(,%rax,8) # xxx: rip relative
|
call *ia32_sys_call_table(,%rax,8) # xxx: rip relative
|
||||||
ia32_sysret:
|
ia32_sysret:
|
||||||
movq %rax,RAX-ARGOFFSET(%rsp)
|
movq %rax,RAX-ARGOFFSET(%rsp)
|
||||||
|
ia32_ret_from_sys_call:
|
||||||
|
CLEAR_RREGS -ARGOFFSET
|
||||||
jmp int_ret_from_sys_call
|
jmp int_ret_from_sys_call
|
||||||
|
|
||||||
ia32_tracesys:
|
ia32_tracesys:
|
||||||
@@ -442,8 +452,8 @@ END(ia32_syscall)
|
|||||||
|
|
||||||
ia32_badsys:
|
ia32_badsys:
|
||||||
movq $0,ORIG_RAX-ARGOFFSET(%rsp)
|
movq $0,ORIG_RAX-ARGOFFSET(%rsp)
|
||||||
movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
|
movq $-ENOSYS,%rax
|
||||||
jmp int_ret_from_sys_call
|
jmp ia32_sysret
|
||||||
|
|
||||||
quiet_ni_syscall:
|
quiet_ni_syscall:
|
||||||
movq $-ENOSYS,%rax
|
movq $-ENOSYS,%rax
|
||||||
|
@@ -206,8 +206,11 @@ static int __init setup_early_printk(char *buf)
|
|||||||
|
|
||||||
while (*buf != '\0') {
|
while (*buf != '\0') {
|
||||||
if (!strncmp(buf, "serial", 6)) {
|
if (!strncmp(buf, "serial", 6)) {
|
||||||
early_serial_init(buf + 6);
|
buf += 6;
|
||||||
|
early_serial_init(buf);
|
||||||
early_console_register(&early_serial_console, keep);
|
early_console_register(&early_serial_console, keep);
|
||||||
|
if (!strncmp(buf, ",ttyS", 5))
|
||||||
|
buf += 5;
|
||||||
}
|
}
|
||||||
if (!strncmp(buf, "ttyS", 4)) {
|
if (!strncmp(buf, "ttyS", 4)) {
|
||||||
early_serial_init(buf + 4);
|
early_serial_init(buf + 4);
|
||||||
|
@@ -15,8 +15,10 @@ EXPORT_SYMBOL(mcount);
|
|||||||
* the export, but dont use it from C code, it is used
|
* the export, but dont use it from C code, it is used
|
||||||
* by assembly code and is not using C calling convention!
|
* by assembly code and is not using C calling convention!
|
||||||
*/
|
*/
|
||||||
|
#ifndef CONFIG_X86_CMPXCHG64
|
||||||
extern void cmpxchg8b_emu(void);
|
extern void cmpxchg8b_emu(void);
|
||||||
EXPORT_SYMBOL(cmpxchg8b_emu);
|
EXPORT_SYMBOL(cmpxchg8b_emu);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Networking helper routines. */
|
/* Networking helper routines. */
|
||||||
EXPORT_SYMBOL(csum_partial_copy_generic);
|
EXPORT_SYMBOL(csum_partial_copy_generic);
|
||||||
|
@@ -15,8 +15,10 @@ ifeq ($(CONFIG_X86_32),y)
|
|||||||
obj-y += atomic64_32.o
|
obj-y += atomic64_32.o
|
||||||
lib-y += checksum_32.o
|
lib-y += checksum_32.o
|
||||||
lib-y += strstr_32.o
|
lib-y += strstr_32.o
|
||||||
lib-y += semaphore_32.o string_32.o cmpxchg8b_emu.o
|
lib-y += semaphore_32.o string_32.o
|
||||||
|
ifneq ($(CONFIG_X86_CMPXCHG64),y)
|
||||||
|
lib-y += cmpxchg8b_emu.o
|
||||||
|
endif
|
||||||
lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
|
lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
|
||||||
else
|
else
|
||||||
obj-y += io_64.o iomap_copy_64.o
|
obj-y += io_64.o iomap_copy_64.o
|
||||||
|
Reference in New Issue
Block a user