common.c (dfe64506c01e57159a4c550fe537c13a317ff01b) common.c (fa697140f9a20119a9ec8fd7460cc4314fbdaff3)
1/*
2 * common.c - C code for kernel entry and exit
3 * Copyright (c) 2015 Andrew Lutomirski
4 * GPL v2
5 *
6 * Based on asm and ptrace code by many authors. The code here originated
7 * in ptrace.c and signal.c.
8 */

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

279 /*
280 * NB: Native and x32 syscalls are dispatched from the same
281 * table. The only functional difference is the x32 bit in
282 * regs->orig_ax, which changes the behavior of some syscalls.
283 */
284 nr &= __SYSCALL_MASK;
285 if (likely(nr < NR_syscalls)) {
286 nr = array_index_nospec(nr, NR_syscalls);
1/*
2 * common.c - C code for kernel entry and exit
3 * Copyright (c) 2015 Andrew Lutomirski
4 * GPL v2
5 *
6 * Based on asm and ptrace code by many authors. The code here originated
7 * in ptrace.c and signal.c.
8 */

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

279 /*
280 * NB: Native and x32 syscalls are dispatched from the same
281 * table. The only functional difference is the x32 bit in
282 * regs->orig_ax, which changes the behavior of some syscalls.
283 */
284 nr &= __SYSCALL_MASK;
285 if (likely(nr < NR_syscalls)) {
286 nr = array_index_nospec(nr, NR_syscalls);
287#ifdef CONFIG_SYSCALL_PTREGS
288 regs->ax = sys_call_table[nr](regs);
289#else
287 regs->ax = sys_call_table[nr](
288 regs->di, regs->si, regs->dx,
289 regs->r10, regs->r8, regs->r9);
290 regs->ax = sys_call_table[nr](
291 regs->di, regs->si, regs->dx,
292 regs->r10, regs->r8, regs->r9);
293#endif
290 }
291
292 syscall_return_slowpath(regs);
293}
294#endif
295
296#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
297/*

--- 127 unchanged lines hidden ---
294 }
295
296 syscall_return_slowpath(regs);
297}
298#endif
299
300#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
301/*

--- 127 unchanged lines hidden ---