Path: blob/master/arch/um/sys-x86_64/syscall_table.c
10817 views
/*1* System call table for UML/x86-64, copied from arch/x86_64/kernel/syscall.c2* with some changes for UML.3*/45#include <linux/linkage.h>6#include <linux/sys.h>7#include <linux/cache.h>8#include <kern_constants.h>910#define __NO_STUBS1112/*13* Below you can see, in terms of #define's, the differences between the x86-6414* and the UML syscall table.15*/1617/* Not going to be implemented by UML, since we have no hardware. */18#define stub_iopl sys_ni_syscall19#define sys_ioperm sys_ni_syscall2021/*22* The UML TLS problem. Note that x86_64 does not implement this, so the below23* is needed only for the ia32 compatibility.24*/2526/* On UML we call it this way ("old" means it's not mmap2) */27#define sys_mmap old_mmap2829#define stub_clone sys_clone30#define stub_fork sys_fork31#define stub_vfork sys_vfork32#define stub_execve sys_execve33#define stub_rt_sigsuspend sys_rt_sigsuspend34#define stub_sigaltstack sys_sigaltstack35#define stub_rt_sigreturn sys_rt_sigreturn3637#define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;38#undef _ASM_X86_UNISTD_64_H39#include "../../x86/include/asm/unistd_64.h"4041#undef __SYSCALL42#define __SYSCALL(nr, sym) [ nr ] = sym,43#undef _ASM_X86_UNISTD_64_H4445typedef void (*sys_call_ptr_t)(void);4647extern void sys_ni_syscall(void);4849/*50* We used to have a trick here which made sure that holes in the51* x86_64 table were filled in with sys_ni_syscall, but a comment in52* unistd_64.h says that holes aren't allowed, so the trick was53* removed.54* The trick looked like this55* [0 ... UM_NR_syscall_max] = &sys_ni_syscall56* before including unistd_64.h - the later initializations overwrote57* the sys_ni_syscall filler.58*/5960sys_call_ptr_t sys_call_table[] __cacheline_aligned = {61#include "../../x86/include/asm/unistd_64.h"62};6364int syscall_table_size = sizeof(sys_call_table);656667