Commit 2a53ccbc authored by Ingo Molnar's avatar Ingo Molnar

x86/dumpstack: Rename thread_struct::sig_on_uaccess_error to sig_on_uaccess_err

Rename it to match the thread_struct::uaccess_err pattern and also
because it was too long.

Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent dfa9a942
...@@ -96,7 +96,7 @@ static bool write_ok_or_segv(unsigned long ptr, size_t size) ...@@ -96,7 +96,7 @@ static bool write_ok_or_segv(unsigned long ptr, size_t size)
{ {
/* /*
* XXX: if access_ok, get_user, and put_user handled * XXX: if access_ok, get_user, and put_user handled
* sig_on_uaccess_error, this could go away. * sig_on_uaccess_err, this could go away.
*/ */
if (!access_ok(VERIFY_WRITE, (void __user *)ptr, size)) { if (!access_ok(VERIFY_WRITE, (void __user *)ptr, size)) {
...@@ -125,7 +125,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) ...@@ -125,7 +125,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
struct task_struct *tsk; struct task_struct *tsk;
unsigned long caller; unsigned long caller;
int vsyscall_nr, syscall_nr, tmp; int vsyscall_nr, syscall_nr, tmp;
int prev_sig_on_uaccess_error; int prev_sig_on_uaccess_err;
long ret; long ret;
/* /*
...@@ -221,8 +221,8 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) ...@@ -221,8 +221,8 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
* With a real vsyscall, page faults cause SIGSEGV. We want to * With a real vsyscall, page faults cause SIGSEGV. We want to
* preserve that behavior to make writing exploits harder. * preserve that behavior to make writing exploits harder.
*/ */
prev_sig_on_uaccess_error = current->thread.sig_on_uaccess_error; prev_sig_on_uaccess_err = current->thread.sig_on_uaccess_err;
current->thread.sig_on_uaccess_error = 1; current->thread.sig_on_uaccess_err = 1;
ret = -EFAULT; ret = -EFAULT;
switch (vsyscall_nr) { switch (vsyscall_nr) {
...@@ -243,7 +243,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) ...@@ -243,7 +243,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
break; break;
} }
current->thread.sig_on_uaccess_error = prev_sig_on_uaccess_error; current->thread.sig_on_uaccess_err = prev_sig_on_uaccess_err;
check_fault: check_fault:
if (ret == -EFAULT) { if (ret == -EFAULT) {
......
...@@ -419,7 +419,7 @@ struct thread_struct { ...@@ -419,7 +419,7 @@ struct thread_struct {
/* Max allowed port in the bitmap, in bytes: */ /* Max allowed port in the bitmap, in bytes: */
unsigned io_bitmap_max; unsigned io_bitmap_max;
unsigned int sig_on_uaccess_error:1; unsigned int sig_on_uaccess_err:1;
unsigned int uaccess_err:1; /* uaccess failed */ unsigned int uaccess_err:1; /* uaccess failed */
/* Floating point and extended processor state */ /* Floating point and extended processor state */
......
...@@ -737,7 +737,7 @@ no_context(struct pt_regs *regs, unsigned long error_code, ...@@ -737,7 +737,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,
* In this case we need to make sure we're not recursively * In this case we need to make sure we're not recursively
* faulting through the emulate_vsyscall() logic. * faulting through the emulate_vsyscall() logic.
*/ */
if (current->thread.sig_on_uaccess_error && signal) { if (current->thread.sig_on_uaccess_err && signal) {
tsk->thread.trap_nr = X86_TRAP_PF; tsk->thread.trap_nr = X86_TRAP_PF;
tsk->thread.error_code = error_code | PF_USER; tsk->thread.error_code = error_code | PF_USER;
tsk->thread.cr2 = address; tsk->thread.cr2 = address;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment