fault.c (6456a2a69ee16ad402f26d272d0b67ce1d25061f) fault.c (66fcd98883816dba3b66da20b5fc86fa410638b5)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 1995 Linus Torvalds
4 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs.
5 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar
6 */
7#include <linux/sched.h> /* test_thread_flag(), ... */
8#include <linux/sched/task_stack.h> /* task_stack_*(), ... */

--- 1236 unchanged lines hidden (view full) ---

1245 mm = tsk->mm;
1246
1247 if (unlikely((error_code & (X86_PF_USER | X86_PF_INSTR)) == X86_PF_INSTR)) {
1248 /*
1249 * Whoops, this is kernel mode code trying to execute from
1250 * user memory. Unless this is AMD erratum #93, which
1251 * corrupts RIP such that it looks like a user address,
1252 * this is unrecoverable. Don't even try to look up the
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 1995 Linus Torvalds
4 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs.
5 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar
6 */
7#include <linux/sched.h> /* test_thread_flag(), ... */
8#include <linux/sched/task_stack.h> /* task_stack_*(), ... */

--- 1236 unchanged lines hidden (view full) ---

1245 mm = tsk->mm;
1246
1247 if (unlikely((error_code & (X86_PF_USER | X86_PF_INSTR)) == X86_PF_INSTR)) {
1248 /*
1249 * Whoops, this is kernel mode code trying to execute from
1250 * user memory. Unless this is AMD erratum #93, which
1251 * corrupts RIP such that it looks like a user address,
1252 * this is unrecoverable. Don't even try to look up the
1253 * VMA.
1253 * VMA or look for extable entries.
1254 */
1255 if (is_errata93(regs, address))
1256 return;
1257
1254 */
1255 if (is_errata93(regs, address))
1256 return;
1257
1258 bad_area_nosemaphore(regs, error_code, address);
1258 page_fault_oops(regs, error_code, address);
1259 return;
1260 }
1261
1262 /* kprobes don't want to hook the spurious faults: */
1263 if (unlikely(kprobe_page_fault(regs, X86_TRAP_PF)))
1264 return;
1265
1266 /*

--- 289 unchanged lines hidden ---
1259 return;
1260 }
1261
1262 /* kprobes don't want to hook the spurious faults: */
1263 if (unlikely(kprobe_page_fault(regs, X86_TRAP_PF)))
1264 return;
1265
1266 /*

--- 289 unchanged lines hidden ---