Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner. * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Use correct byte-sized register constraint in __add() x86: Use correct byte-sized register constraint in __xchg_op() x86: vsyscall: Use NULL instead 0 for a pointer argument
This commit is contained in:
commit
4a1d7544fe
@ -43,7 +43,7 @@ extern void __add_wrong_size(void)
|
|||||||
switch (sizeof(*(ptr))) { \
|
switch (sizeof(*(ptr))) { \
|
||||||
case __X86_CASE_B: \
|
case __X86_CASE_B: \
|
||||||
asm volatile (lock #op "b %b0, %1\n" \
|
asm volatile (lock #op "b %b0, %1\n" \
|
||||||
: "+r" (__ret), "+m" (*(ptr)) \
|
: "+q" (__ret), "+m" (*(ptr)) \
|
||||||
: : "memory", "cc"); \
|
: : "memory", "cc"); \
|
||||||
break; \
|
break; \
|
||||||
case __X86_CASE_W: \
|
case __X86_CASE_W: \
|
||||||
@ -173,7 +173,7 @@ extern void __add_wrong_size(void)
|
|||||||
switch (sizeof(*(ptr))) { \
|
switch (sizeof(*(ptr))) { \
|
||||||
case __X86_CASE_B: \
|
case __X86_CASE_B: \
|
||||||
asm volatile (lock "addb %b1, %0\n" \
|
asm volatile (lock "addb %b1, %0\n" \
|
||||||
: "+m" (*(ptr)) : "ri" (inc) \
|
: "+m" (*(ptr)) : "qi" (inc) \
|
||||||
: "memory", "cc"); \
|
: "memory", "cc"); \
|
||||||
break; \
|
break; \
|
||||||
case __X86_CASE_W: \
|
case __X86_CASE_W: \
|
||||||
|
@ -216,9 +216,9 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
|
|||||||
current_thread_info()->sig_on_uaccess_error = 1;
|
current_thread_info()->sig_on_uaccess_error = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 0 is a valid user pointer (in the access_ok sense) on 32-bit and
|
* NULL is a valid user pointer (in the access_ok sense) on 32-bit and
|
||||||
* 64-bit, so we don't need to special-case it here. For all the
|
* 64-bit, so we don't need to special-case it here. For all the
|
||||||
* vsyscalls, 0 means "don't write anything" not "write it at
|
* vsyscalls, NULL means "don't write anything" not "write it at
|
||||||
* address 0".
|
* address 0".
|
||||||
*/
|
*/
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
@ -247,7 +247,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
|
|||||||
|
|
||||||
ret = sys_getcpu((unsigned __user *)regs->di,
|
ret = sys_getcpu((unsigned __user *)regs->di,
|
||||||
(unsigned __user *)regs->si,
|
(unsigned __user *)regs->si,
|
||||||
0);
|
NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user