mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 08:36:47 +07:00
d8f8b84456
Add subarchitecture-independent implementation of asm-generic/syscall.h allowing access to user system call parameters and results: * syscall_get_nr() * syscall_rollback() * syscall_get_error() * syscall_get_return_value() * syscall_set_return_value() * syscall_get_arguments() * syscall_set_arguments() * syscall_get_arch() provided by arch/x86/um/asm/syscall.h This provides the necessary syscall helpers needed by HAVE_ARCH_SECCOMP_FILTER plus syscall_get_error(). This is inspired from Meredydd Luff's patch (https://gerrit.chromium.org/gerrit/21425). Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Richard Weinberger <richard@nod.at> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Kees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Will Drewry <wad@chromium.org> Cc: Meredydd Luff <meredydd@senatehouse.org> Cc: David Drysdale <drysdale@google.com> Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Kees Cook <keescook@chromium.org>
21 lines
431 B
C
21 lines
431 B
C
#ifndef __UM_ASM_SYSCALL_H
|
|
#define __UM_ASM_SYSCALL_H
|
|
|
|
#include <asm/syscall-generic.h>
|
|
#include <uapi/linux/audit.h>
|
|
|
|
typedef asmlinkage long (*sys_call_ptr_t)(unsigned long, unsigned long,
|
|
unsigned long, unsigned long,
|
|
unsigned long, unsigned long);
|
|
|
|
static inline int syscall_get_arch(void)
|
|
{
|
|
#ifdef CONFIG_X86_32
|
|
return AUDIT_ARCH_I386;
|
|
#else
|
|
return AUDIT_ARCH_X86_64;
|
|
#endif
|
|
}
|
|
|
|
#endif /* __UM_ASM_SYSCALL_H */
|