Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
ebb067d
Documentation
arch
alpha
arc
arm
arm64
avr32
blackfin
c6x
cris
frv
hexagon
ia64
m32r
m68k
metag
microblaze
mips
mn10300
openrisc
parisc
powerpc
s390
appldata
boot
configs
crypto
hypfs
include
asm
Kbuild
airq.h
appldata.h
asm-offsets.h
atomic.h
barrier.h
bitops.h
bug.h
bugs.h
cache.h
cacheflush.h
ccwdev.h
ccwgroup.h
checksum.h
chpid.h
cio.h
clp.h
cmb.h
cmpxchg.h
compat.h
cpcmd.h
cpu.h
cpu_mf.h
cputime.h
crw.h
css_chars.h
ctl_reg.h
current.h
debug.h
delay.h
device.h
diag.h
dis.h
div64.h
dma-mapping.h
dma.h
eadm.h
ebcdic.h
elf.h
emergency-restart.h
etr.h
exec.h
extmem.h
facility.h
fb.h
fcx.h
ftrace.h
futex.h
hardirq.h
hugetlb.h
hw_irq.h
idals.h
io.h
ipl.h
irq.h
irq_regs.h
irqflags.h
isc.h
itcw.h
jump_label.h
kdebug.h
kexec.h
kmap_types.h
kprobes.h
kvm_host.h
kvm_para.h
linkage.h
local.h
local64.h
lowcore.h
mathemu.h
mman.h
mmu.h
mmu_context.h
module.h
mutex.h
nmi.h
os_info.h
page.h
pci.h
pci_clp.h
pci_debug.h
pci_dma.h
pci_insn.h
pci_io.h
percpu.h
perf_event.h
pgalloc.h
pgtable.h
processor.h
ptrace.h
qdio.h
reset.h
runtime_instr.h
rwsem.h
scatterlist.h
schid.h
sclp.h
scsw.h
seccomp.h
sections.h
segment.h
serial.h
setup.h
sfp-machine.h
sfp-util.h
shmparam.h
signal.h
sigp.h
smp.h
sparsemem.h
spinlock.h
spinlock_types.h
string.h
switch_to.h
syscall.h
sysinfo.h
termios.h
thread_info.h
timex.h
tlb.h
tlbflush.h
topology.h
types.h
uaccess.h
unaligned.h
unistd.h
user.h
vdso.h
vga.h
vtime.h
vtimer.h
xor.h
uapi
kernel
kvm
lib
math-emu
mm
net
oprofile
pci
Kbuild
Kconfig
Kconfig.debug
Makefile
defconfig
score
sh
sparc
tile
um
unicore32
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
s390
/
include
/
asm
/
syscall.h
Copy path
Blame
Blame
Latest commit
History
History
100 lines (88 loc) · 2.5 KB
Breadcrumbs
linux
/
arch
/
s390
/
include
/
asm
/
syscall.h
Top
File metadata and controls
Code
Blame
100 lines (88 loc) · 2.5 KB
Raw
/* * Access to user system call parameters and results * * Copyright IBM Corp. 2008 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2 only) * as published by the Free Software Foundation. */ #ifndef _ASM_SYSCALL_H #define _ASM_SYSCALL_H 1 #include <uapi/linux/audit.h> #include <linux/sched.h> #include <linux/err.h> #include <asm/ptrace.h> /* * The syscall table always contains 32 bit pointers since we know that the * address of the function to be called is (way) below 4GB. So the "int" * type here is what we want [need] for both 32 bit and 64 bit systems. */ extern const unsigned int sys_call_table[]; extern const unsigned int sys_call_table_emu[]; static inline long syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { return test_pt_regs_flag(regs, PIF_SYSCALL) ? (regs->int_code & 0xffff) : -1; } static inline void syscall_rollback(struct task_struct *task, struct pt_regs *regs) { regs->gprs[2] = regs->orig_gpr2; } static inline long syscall_get_error(struct task_struct *task, struct pt_regs *regs) { return IS_ERR_VALUE(regs->gprs[2]) ? regs->gprs[2] : 0; } static inline long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) { return regs->gprs[2]; } static inline void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) { regs->gprs[2] = error ? error : val; } static inline void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) { unsigned long mask = -1UL; BUG_ON(i + n > 6); #ifdef CONFIG_COMPAT if (test_tsk_thread_flag(task, TIF_31BIT)) mask = 0xffffffff; #endif while (n-- > 0) if (i + n > 0) args[n] = regs->gprs[2 + i + n] & mask; if (i == 0) args[0] = regs->orig_gpr2 & mask; } static inline void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) { BUG_ON(i + n > 6); while (n-- > 0) if (i + n > 0) regs->gprs[2 + i + n] = args[n]; if (i == 0) regs->orig_gpr2 = args[0]; } static inline int syscall_get_arch(void) { #ifdef CONFIG_COMPAT if (test_tsk_thread_flag(current, TIF_31BIT)) return AUDIT_ARCH_S390; #endif return sizeof(long) == 8 ? AUDIT_ARCH_S390X : AUDIT_ARCH_S390; } #endif /* _ASM_SYSCALL_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
You can’t perform that action at this time.