Commit f0895685 authored by Vivek Goyal's avatar Vivek Goyal Committed by Linus Torvalds
Browse files

kexec: new syscall kexec_file_load() declaration

This is the new syscall kexec_file_load() declaration/interface.  I have
reserved the syscall number only for x86_64 so far.  Other architectures
(including i386) can reserve syscall number when they enable the support
for this new syscall.
Signed-off-by: default avatarVivek Goyal <>
Cc: Michael Kerrisk <>
Cc: Borislav Petkov <>
Cc: Yinghai Lu <>
Cc: Eric Biederman <>
Cc: H. Peter Anvin <>
Cc: Matthew Garrett <>
Cc: Greg Kroah-Hartman <>
Cc: Dave Young <>
Cc: WANG Chao <>
Cc: Baoquan He <>
Cc: Andy Lutomirski <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 815d5704
......@@ -326,6 +326,7 @@
317 common seccomp sys_seccomp
318 common getrandom sys_getrandom
319 common memfd_create sys_memfd_create
320 common kexec_file_load sys_kexec_file_load
# x32-specific system call numbers start at 512 to avoid cache impact
......@@ -317,6 +317,10 @@ asmlinkage long sys_restart_syscall(void);
asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
struct kexec_segment __user *segments,
unsigned long flags);
asmlinkage long sys_kexec_file_load(int kernel_fd, int initrd_fd,
unsigned long cmdline_len,
const char __user *cmdline_ptr,
unsigned long flags);
asmlinkage long sys_exit(int error_code);
asmlinkage long sys_exit_group(int error_code);
......@@ -1058,6 +1058,13 @@ COMPAT_SYSCALL_DEFINE4(kexec_load, compat_ulong_t, entry,
SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, initrd_fd,
unsigned long, cmdline_len, const char __user *, cmdline_ptr,
unsigned long, flags)
return -ENOSYS;
void crash_kexec(struct pt_regs *regs)
/* Take the kexec_mutex here to prevent sys_kexec_load
......@@ -25,6 +25,7 @@ cond_syscall(sys_swapon);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment