#include <linux/cpu.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/sched/task.h>
#include <linux/sched/task_stack.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/elfcore.h>
#include <linux/smp.h>
#include <linux/slab.h>
#include <linux/user.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/export.h>
#include <linux/ptrace.h>
#include <linux/notifier.h>
#include <linux/kprobes.h>
#include <linux/kdebug.h>
#include <linux/prctl.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/ftrace.h>
#include <linux/syscalls.h>
#include <linux/iommu.h>
#include <asm/processor.h>
#include <asm/pkru.h>
#include <asm/fpu/sched.h>
#include <asm/mmu_context.h>
#include <asm/prctl.h>
#include <asm/desc.h>
#include <asm/proto.h>
#include <asm/ia32.h>
#include <asm/debugreg.h>
#include <asm/switch_to.h>
#include <asm/xen/hypervisor.h>
#include <asm/vdso.h>
#include <asm/resctrl.h>
#include <asm/unistd.h>
#include <asm/fsgsbase.h>
#include <asm/fred.h>
#ifdef CONFIG_IA32_EMULATION
#include <asm/unistd_32_ia32.h>
#endif
#include "process.h"
void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,
const char *log_lvl)
{ … }
void release_thread(struct task_struct *dead_task)
{ … }
enum which_selector { … };
static noinstr unsigned long __rdgsbase_inactive(void)
{ … }
static noinstr void __wrgsbase_inactive(unsigned long gsbase)
{ … }
static __always_inline void save_base_legacy(struct task_struct *prev_p,
unsigned short selector,
enum which_selector which)
{ … }
static __always_inline void save_fsgs(struct task_struct *task)
{ … }
void current_save_fsgs(void)
{ … }
#if IS_ENABLED(CONFIG_KVM)
EXPORT_SYMBOL_GPL(…);
#endif
static __always_inline void loadseg(enum which_selector which,
unsigned short sel)
{ … }
static __always_inline void load_seg_legacy(unsigned short prev_index,
unsigned long prev_base,
unsigned short next_index,
unsigned long next_base,
enum which_selector which)
{ … }
static __always_inline void x86_pkru_load(struct thread_struct *prev,
struct thread_struct *next)
{ … }
static __always_inline void x86_fsgsbase_load(struct thread_struct *prev,
struct thread_struct *next)
{ … }
unsigned long x86_fsgsbase_read_task(struct task_struct *task,
unsigned short selector)
{ … }
unsigned long x86_gsbase_read_cpu_inactive(void)
{ … }
void x86_gsbase_write_cpu_inactive(unsigned long gsbase)
{ … }
unsigned long x86_fsbase_read_task(struct task_struct *task)
{ … }
unsigned long x86_gsbase_read_task(struct task_struct *task)
{ … }
void x86_fsbase_write_task(struct task_struct *task, unsigned long fsbase)
{ … }
void x86_gsbase_write_task(struct task_struct *task, unsigned long gsbase)
{ … }
static void
start_thread_common(struct pt_regs *regs, unsigned long new_ip,
unsigned long new_sp,
u16 _cs, u16 _ss, u16 _ds)
{ … }
void
start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_COMPAT
void compat_start_thread(struct pt_regs *regs, u32 new_ip, u32 new_sp, bool x32)
{ … }
#endif
__no_kmsan_checks
__visible __notrace_funcgraph struct task_struct *
__switch_to(struct task_struct *prev_p, struct task_struct *next_p)
{ … }
void set_personality_64bit(void)
{ … }
static void __set_personality_x32(void)
{ … }
static void __set_personality_ia32(void)
{ … }
void set_personality_ia32(bool x32)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_CHECKPOINT_RESTORE
static long prctl_map_vdso(const struct vdso_image *image, unsigned long addr)
{ … }
#endif
#ifdef CONFIG_ADDRESS_MASKING
#define LAM_U57_BITS …
static int prctl_enable_tagged_addr(struct mm_struct *mm, unsigned long nr_bits)
{ … }
#endif
long do_arch_prctl_64(struct task_struct *task, int option, unsigned long arg2)
{ … }
SYSCALL_DEFINE2(arch_prctl, int, option, unsigned long, arg2)
{ … }
#ifdef CONFIG_IA32_EMULATION
COMPAT_SYSCALL_DEFINE2(arch_prctl, int, option, unsigned long, arg2)
{ … }
#endif
unsigned long KSTK_ESP(struct task_struct *task)
{ … }