/
usr
/
src
/
linux-headers-5.15.0-181
/
arch
/
nds32
/
include
/
asm
/
/usr/src/linux-headers-5.15.0-181/arch/nds32/include/asm
mkdir
upload
Name
Size
Mode
Actions
assembler.h
598
0644
edit
dl
rm
barrier.h
431
0644
edit
dl
rm
bitfield.h
47127
0644
edit
dl
rm
cache.h
276
0644
edit
dl
rm
cacheflush.h
1986
0644
edit
dl
rm
cache_info.h
315
0644
edit
dl
rm
current.h
304
0644
edit
dl
rm
delay.h
938
0644
edit
dl
rm
elf.h
6021
0644
edit
dl
rm
fixmap.h
831
0644
edit
dl
rm
fpu.h
3195
0644
edit
dl
rm
fpuemu.h
1272
0644
edit
dl
rm
ftrace.h
1161
0644
edit
dl
rm
futex.h
2483
0644
edit
dl
rm
highmem.h
1624
0644
edit
dl
rm
io.h
2474
0644
edit
dl
rm
irqflags.h
848
0644
edit
dl
rm
Kbuild
194
0644
edit
dl
rm
l2_cache.h
4791
0644
edit
dl
rm
linkage.h
264
0644
edit
dl
rm
memory.h
2713
0644
edit
dl
rm
mmu.h
213
0644
edit
dl
rm
mmu_context.h
1409
0644
edit
dl
rm
nds32.h
2018
0644
edit
dl
rm
nds32_fpu_inst.h
2510
0644
edit
dl
rm
page.h
1591
0644
edit
dl
rm
perf_event.h
445
0644
edit
dl
rm
pgalloc.h
1419
0644
edit
dl
rm
pgtable.h
11676
0644
edit
dl
rm
pmu.h
13350
0644
edit
dl
rm
proc-fns.h
1668
0644
edit
dl
rm
processor.h
2405
0644
edit
dl
rm
ptrace.h
1686
0644
edit
dl
rm
sfp-machine.h
4463
0644
edit
dl
rm
shmparam.h
462
0644
edit
dl
rm
stacktrace.h
884
0644
edit
dl
rm
string.h
471
0644
edit
dl
rm
suspend.h
258
0644
edit
dl
rm
swab.h
810
0644
edit
dl
rm
syscall.h
5496
0644
edit
dl
rm
syscalls.h
510
0644
edit
dl
rm
thread_info.h
2390
0644
edit
dl
rm
tlb.h
249
0644
edit
dl
rm
tlbflush.h
1144
0644
edit
dl
rm
uaccess.h
8272
0644
edit
dl
rm
unistd.h
156
0644
edit
dl
rm
vdso.h
429
0644
edit
dl
rm
vdso_datapage.h
1104
0644
edit
dl
rm
vdso_timer_info.h
357
0644
edit
dl
rm
vermagic.h
214
0644
edit
dl
rm
vmalloc.h
93
0644
edit
dl
rm
Edit:
/usr/src/linux-headers-5.15.0-181/arch/nds32/include/asm/syscall.h
(5496B)
/* SPDX-License-Identifier: GPL-2.0 */ // Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. // Copyright (C) 2005-2017 Andes Technology Corporation #ifndef _ASM_NDS32_SYSCALL_H #define _ASM_NDS32_SYSCALL_H 1 #include <uapi/linux/audit.h> #include <linux/err.h> struct task_struct; struct pt_regs; /** * syscall_get_nr - find what system call a task is executing * @task: task of interest, must be blocked * @regs: task_pt_regs() of @task * * If @task is executing a system call or is at system call * tracing about to attempt one, returns the system call number. * If @task is not executing a system call, i.e. it's blocked * inside the kernel for a fault or signal, returns -1. * * Note this returns int even on 64-bit machines. Only 32 bits of * system call number can be meaningful. If the actual arch value * is 64 bits, this truncates to 32 bits so 0xffffffff means -1. * * It's only valid to call this when @task is known to be blocked. */ static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { return regs->syscallno; } /** * syscall_rollback - roll back registers after an aborted system call * @task: task of interest, must be in system call exit tracing * @regs: task_pt_regs() of @task * * It's only valid to call this when @task is stopped for system * call exit tracing (due to TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT), * after tracehook_report_syscall_entry() returned nonzero to prevent * the system call from taking place. * * This rolls back the register state in @regs so it's as if the * system call instruction was a no-op. The registers containing * the system call number and arguments are as they were before the * system call instruction. This may not be the same as what the * register state looked like at system call entry tracing. */ static inline void syscall_rollback(struct task_struct *task, struct pt_regs *regs) { regs->uregs[0] = regs->orig_r0; } /** * syscall_get_error - check result of traced system call * @task: task of interest, must be blocked * @regs: task_pt_regs() of @task * * Returns 0 if the system call succeeded, or -ERRORCODE if it failed. * * It's only valid to call this when @task is stopped for tracing on exit * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ static inline long syscall_get_error(struct task_struct *task, struct pt_regs *regs) { unsigned long error = regs->uregs[0]; return IS_ERR_VALUE(error) ? error : 0; } /** * syscall_get_return_value - get the return value of a traced system call * @task: task of interest, must be blocked * @regs: task_pt_regs() of @task * * Returns the return value of the successful system call. * This value is meaningless if syscall_get_error() returned nonzero. * * It's only valid to call this when @task is stopped for tracing on exit * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ static inline long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) { return regs->uregs[0]; } /** * syscall_set_return_value - change the return value of a traced system call * @task: task of interest, must be blocked * @regs: task_pt_regs() of @task * @error: negative error code, or zero to indicate success * @val: user return value if @error is zero * * This changes the results of the system call that user mode will see. * If @error is zero, the user sees a successful system call with a * return value of @val. If @error is nonzero, it's a negated errno * code; the user sees a failed system call with this errno code. * * It's only valid to call this when @task is stopped for tracing on exit * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ static inline void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) { regs->uregs[0] = (long)error ? error : val; } /** * syscall_get_arguments - extract system call parameter values * @task: task of interest, must be blocked * @regs: task_pt_regs() of @task * @args: array filled with argument values * * Fetches 6 arguments to the system call (from 0 through 5). The first * argument is stored in @args[0], and so on. * * It's only valid to call this when @task is stopped for tracing on * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ #define SYSCALL_MAX_ARGS 6 static inline void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned long *args) { args[0] = regs->orig_r0; args++; memcpy(args, ®s->uregs[0] + 1, 5 * sizeof(args[0])); } /** * syscall_set_arguments - change system call parameter value * @task: task of interest, must be in system call entry tracing * @regs: task_pt_regs() of @task * @args: array of argument values to store * * Changes 6 arguments to the system call. The first argument gets value * @args[0], and so on. * * It's only valid to call this when @task is stopped for tracing on * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ static inline void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, const unsigned long *args) { regs->orig_r0 = args[0]; args++; memcpy(®s->uregs[0] + 1, args, 5 * sizeof(args[0])); } static inline int syscall_get_arch(struct task_struct *task) { return IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) ? AUDIT_ARCH_NDS32BE : AUDIT_ARCH_NDS32; } #endif /* _ASM_NDS32_SYSCALL_H */
Save
cmd:
run