mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
d5f744f9a2
- Convert the 32bit syscalls to be pt_regs based which removes the requirement to push all 6 potential arguments onto the stack and consolidates the interface with the 64bit variant - The first small portion of the exception and syscall related entry code consolidation which aims to address the recently discovered issues vs. RCU, int3, NMI and some other exceptions which can interrupt any context. The bulk of the changes is still work in progress and aimed for 5.8. - A few lockdep namespace cleanups which have been applied into this branch to keep the prerequisites for the ongoing work confined. -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAl6B/TMTHHRnbHhAbGlu dXRyb25peC5kZQAKCRCmGPVMDXSYoYA6EAC7r/bCMxBelljT3b7LkBbiJcocJ+zK OSzWU9miJGTAvYqn4/ciLKg4dA424b/1rBFlF1hBTCQ0HL5Cv4lajxdKEZCO5WCC WWTCz+MC60aWFaH3VNoywiLGb39H2IbqWbS9yNPd/wBkLHiMAD6NPQntOvcPaD4j 1lyrMtLzfrWlrHxvxdI3kt5ZpFLYNXr2xk61xQjTz0ROFQBhf2sDsuhHhiYVLPj7 JwYktpbBiPeaw2+I18NPymNPY+VfY8LCTgLl5M+rbKyCqebKaedZQJ7QXFhAEqKC Y2f+gJsKWtTDzGP2mk/5kF0uP7cd0vJK35ZCXtLZ9BbcNtFZU6w+ADqRo4pJBHRY QRzo/AWrdkuTJF0CrP6mcneNC7NwWLSdKrE1z77RQCHUPVvhHhRDZsgdLcZ/KKwx y1ji22trwNB+7LmI2fUOU5RRHZBIuNvQT+mPt24febJuHpZKul62dd3cqTGeSTC+ MYVknYDSg/+jk+83DhuZnTyb9lWTbq/0Q1HRDu6l2LrMIH7YMPpY5Ea64ZFYzWXy s0+iHEM4mUzltwNauHIntjbwXi3C0l2k1WQyG0gun2eS6SXfu0lb93V4msFj/N1+ oHavH2n2A4XrRr+Ob87fsl7nfXJibWP7R9xPblrWP2sNdqfjSyGd49rnsvpWqWMK Fj0d7tQ78+/SwA== =tWXS -----END PGP SIGNATURE----- Merge tag 'x86-entry-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 entry code updates from Thomas Gleixner: - Convert the 32bit syscalls to be pt_regs based which removes the requirement to push all 6 potential arguments onto the stack and consolidates the interface with the 64bit variant - The first small portion of the exception and syscall related entry code consolidation which aims to address the recently discovered issues vs. RCU, int3, NMI and some other exceptions which can interrupt any context. The bulk of the changes is still work in progress and aimed for 5.8. - A few lockdep namespace cleanups which have been applied into this branch to keep the prerequisites for the ongoing work confined. * tag 'x86-entry-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits) x86/entry: Fix build error x86 with !CONFIG_POSIX_TIMERS lockdep: Rename trace_{hard,soft}{irq_context,irqs_enabled}() lockdep: Rename trace_softirqs_{on,off}() lockdep: Rename trace_hardirq_{enter,exit}() x86/entry: Rename ___preempt_schedule x86: Remove unneeded includes x86/entry: Drop asmlinkage from syscalls x86/entry/32: Enable pt_regs based syscalls x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments x86/entry/32: Rename 32-bit specific syscalls x86/entry/32: Clean up syscall_32.tbl x86/entry: Remove ABI prefixes from functions in syscall tables x86/entry/64: Add __SYSCALL_COMMON() x86/entry: Remove syscall qualifier support x86/entry/64: Remove ptregs qualifier from syscall table x86/entry: Move max syscall number calculation to syscallhdr.sh x86/entry/64: Split X32 syscall table into its own file x86/entry/64: Move sys_ni_syscall stub to common.c x86/entry/64: Use syscall wrappers for x32_rt_sigreturn x86/entry: Refactor SYS_NI macros ...
63 lines
1.9 KiB
C
63 lines
1.9 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef __LINUX_KBUILD_H
|
|
# error "Please do not build this file directly, build asm-offsets.c instead"
|
|
#endif
|
|
|
|
#include <linux/efi.h>
|
|
|
|
#include <asm/ucontext.h>
|
|
|
|
/* workaround for a warning with -Wmissing-prototypes */
|
|
void foo(void);
|
|
|
|
void foo(void)
|
|
{
|
|
OFFSET(CPUINFO_x86, cpuinfo_x86, x86);
|
|
OFFSET(CPUINFO_x86_vendor, cpuinfo_x86, x86_vendor);
|
|
OFFSET(CPUINFO_x86_model, cpuinfo_x86, x86_model);
|
|
OFFSET(CPUINFO_x86_stepping, cpuinfo_x86, x86_stepping);
|
|
OFFSET(CPUINFO_cpuid_level, cpuinfo_x86, cpuid_level);
|
|
OFFSET(CPUINFO_x86_capability, cpuinfo_x86, x86_capability);
|
|
OFFSET(CPUINFO_x86_vendor_id, cpuinfo_x86, x86_vendor_id);
|
|
BLANK();
|
|
|
|
OFFSET(PT_EBX, pt_regs, bx);
|
|
OFFSET(PT_ECX, pt_regs, cx);
|
|
OFFSET(PT_EDX, pt_regs, dx);
|
|
OFFSET(PT_ESI, pt_regs, si);
|
|
OFFSET(PT_EDI, pt_regs, di);
|
|
OFFSET(PT_EBP, pt_regs, bp);
|
|
OFFSET(PT_EAX, pt_regs, ax);
|
|
OFFSET(PT_DS, pt_regs, ds);
|
|
OFFSET(PT_ES, pt_regs, es);
|
|
OFFSET(PT_FS, pt_regs, fs);
|
|
OFFSET(PT_GS, pt_regs, gs);
|
|
OFFSET(PT_ORIG_EAX, pt_regs, orig_ax);
|
|
OFFSET(PT_EIP, pt_regs, ip);
|
|
OFFSET(PT_CS, pt_regs, cs);
|
|
OFFSET(PT_EFLAGS, pt_regs, flags);
|
|
OFFSET(PT_OLDESP, pt_regs, sp);
|
|
OFFSET(PT_OLDSS, pt_regs, ss);
|
|
BLANK();
|
|
|
|
OFFSET(saved_context_gdt_desc, saved_context, gdt_desc);
|
|
BLANK();
|
|
|
|
/*
|
|
* Offset from the entry stack to task stack stored in TSS. Kernel entry
|
|
* happens on the per-cpu entry-stack, and the asm code switches to the
|
|
* task-stack pointer stored in x86_tss.sp1, which is a copy of
|
|
* task->thread.sp0 where entry code can find it.
|
|
*/
|
|
DEFINE(TSS_entry2task_stack,
|
|
offsetof(struct cpu_entry_area, tss.x86_tss.sp1) -
|
|
offsetofend(struct cpu_entry_area, entry_stack_page.stack));
|
|
|
|
#ifdef CONFIG_STACKPROTECTOR
|
|
BLANK();
|
|
OFFSET(stack_canary_offset, stack_canary, canary);
|
|
#endif
|
|
|
|
BLANK();
|
|
DEFINE(EFI_svam, offsetof(efi_runtime_services_t, set_virtual_address_map));
|
|
}
|