Skip to content

Commit 2a53ccb

Browse files
committed
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: Ingo Molnar <mingo@kernel.org>
1 parent dfa9a94 commit 2a53ccb

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎arch/x86/entry/vsyscall/vsyscall_64.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static bool write_ok_or_segv(unsigned long ptr, size_t size)
9696
{
9797
/*
9898
* XXX: if access_ok, get_user, and put_user handled
99-
* sig_on_uaccess_error, this could go away.
99+
* sig_on_uaccess_err, this could go away.
100100
*/
101101

102102
if (!access_ok(VERIFY_WRITE, (void __user *)ptr, size)) {
@@ -125,7 +125,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
125125
struct task_struct *tsk;
126126
unsigned long caller;
127127
int vsyscall_nr, syscall_nr, tmp;
128-
int prev_sig_on_uaccess_error;
128+
int prev_sig_on_uaccess_err;
129129
long ret;
130130

131131
/*
@@ -221,8 +221,8 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
221221
* With a real vsyscall, page faults cause SIGSEGV. We want to
222222
* preserve that behavior to make writing exploits harder.
223223
*/
224-
prev_sig_on_uaccess_error = current->thread.sig_on_uaccess_error;
225-
current->thread.sig_on_uaccess_error = 1;
224+
prev_sig_on_uaccess_err = current->thread.sig_on_uaccess_err;
225+
current->thread.sig_on_uaccess_err = 1;
226226

227227
ret = -EFAULT;
228228
switch (vsyscall_nr) {
@@ -243,7 +243,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
243243
break;
244244
}
245245

246-
current->thread.sig_on_uaccess_error = prev_sig_on_uaccess_error;
246+
current->thread.sig_on_uaccess_err = prev_sig_on_uaccess_err;
247247

248248
check_fault:
249249
if (ret == -EFAULT) {

‎arch/x86/include/asm/processor.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ struct thread_struct {
419419
/* Max allowed port in the bitmap, in bytes: */
420420
unsigned io_bitmap_max;
421421

422-
unsigned int sig_on_uaccess_error:1;
422+
unsigned int sig_on_uaccess_err:1;
423423
unsigned int uaccess_err:1; /* uaccess failed */
424424

425425
/* Floating point and extended processor state */

‎arch/x86/mm/fault.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,
737737
* In this case we need to make sure we're not recursively
738738
* faulting through the emulate_vsyscall() logic.
739739
*/
740-
if (current->thread.sig_on_uaccess_error && signal) {
740+
if (current->thread.sig_on_uaccess_err && signal) {
741741
tsk->thread.trap_nr = X86_TRAP_PF;
742742
tsk->thread.error_code = error_code | PF_USER;
743743
tsk->thread.cr2 = address;

0 commit comments

Comments
 (0)