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
1
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
7962c2e
Documentation
LICENSES
arch
alpha
arc
arm
arm64
csky
h8300
hexagon
ia64
m68k
microblaze
mips
nds32
nios2
openrisc
parisc
powerpc
riscv
s390
sh
boards
boot
cchips
configs
drivers
include
asm
Kbuild
adc.h
addrspace.h
alignment.h
asm-offsets.h
atomic-grb.h
atomic-irq.h
atomic-llsc.h
atomic.h
barrier.h
bitops-cas.h
bitops-grb.h
bitops-llsc.h
bitops-op32.h
bitops.h
bl_bit.h
bl_bit_32.h
bug.h
bugs.h
cache.h
cache_insns.h
cache_insns_32.h
cacheflush.h
checksum.h
checksum_32.h
clock.h
cmpxchg-cas.h
cmpxchg-grb.h
cmpxchg-irq.h
cmpxchg-llsc.h
cmpxchg-xchg.h
cmpxchg.h
device.h
dma-register.h
dma.h
dmabrg.h
dwarf.h
elf.h
entry-macros.S
extable.h
fb.h
fixmap.h
flat.h
fpu.h
freq.h
ftrace.h
futex-cas.h
futex-irq.h
futex-llsc.h
futex.h
gpio.h
hardirq.h
hd64461.h
heartbeat.h
hugetlb.h
hw_breakpoint.h
hw_irq.h
i2c-sh7760.h
io.h
io_generic.h
io_noioport.h
io_trapped.h
irq.h
irqflags.h
kdebug.h
kexec.h
kgdb.h
kprobes.h
linkage.h
machvec.h
mmiowb.h
mmu.h
mmu_context.h
mmu_context_32.h
mmzone.h
module.h
page.h
pci.h
perf_event.h
pgalloc.h
pgtable-2level.h
pgtable-3level.h
pgtable.h
pgtable_32.h
platform_early.h
posix_types.h
processor.h
processor_32.h
ptrace.h
ptrace_32.h
push-switch.h
reboot.h
romimage-macros.h
rtc.h
seccomp.h
sections.h
segment.h
setup.h
sfp-machine.h
sh7760fb.h
sh_bios.h
shmparam.h
siu.h
smc37c93x.h
smp-ops.h
smp.h
sparsemem.h
spi.h
spinlock-cas.h
spinlock-llsc.h
spinlock.h
spinlock_types.h
sram.h
stackprotector.h
stacktrace.h
string.h
string_32.h
suspend.h
switch_to.h
switch_to_32.h
syscall.h
syscall_32.h
syscalls.h
syscalls_32.h
thread_info.h
timex.h
tlb.h
tlbflush.h
topology.h
traps.h
traps_32.h
types.h
uaccess.h
uaccess_32.h
uncached.h
unistd.h
unwinder.h
user.h
vermagic.h
vga.h
vmalloc.h
vmlinux.lds.h
watchdog.h
word-at-a-time.h
cpu-common
cpu-sh2
cpu-sh2a
cpu-sh3
cpu-sh4
cpu-sh4a
mach-common
mach-dreamcast
mach-ecovec24
mach-kfr2r09
mach-landisk
mach-migor
mach-sdk7786
mach-se
mach-sh03
mach-x3proto
uapi
kernel
lib
math-emu
mm
tools
Kbuild
Kconfig
Kconfig.cpu
Kconfig.debug
Makefile
sparc
um
x86
xtensa
.gitignore
Kconfig
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
arch
/
sh
/
include
/
asm
/
syscall_32.h
Copy path
Blame
Blame
Latest commit
History
History
69 lines (59 loc) · 1.59 KB
Breadcrumbs
linux
/
arch
/
sh
/
include
/
asm
/
syscall_32.h
Top
File metadata and controls
Code
Blame
69 lines (59 loc) · 1.59 KB
Raw
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ASM_SH_SYSCALL_32_H #define __ASM_SH_SYSCALL_32_H #include <uapi/linux/audit.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/err.h> #include <asm/ptrace.h> /* The system call number is given by the user in R3 */ static inline long syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { return (regs->tra >= 0) ? regs->regs[3] : -1L; } static inline void syscall_rollback(struct task_struct *task, struct pt_regs *regs) { /* * XXX: This needs some thought. On SH we don't * save away the original r0 value anywhere. */ } static inline long syscall_get_error(struct task_struct *task, struct pt_regs *regs) { return IS_ERR_VALUE(regs->regs[0]) ? regs->regs[0] : 0; } static inline long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) { return regs->regs[0]; } static inline void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) { regs->regs[0] = (long) error ?: val; } static inline void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned long *args) { /* Argument pattern is: R4, R5, R6, R7, R0, R1 */ args[5] = regs->regs[1]; args[4] = regs->regs[0]; args[3] = regs->regs[7]; args[2] = regs->regs[6]; args[1] = regs->regs[5]; args[0] = regs->regs[4]; } static inline int syscall_get_arch(struct task_struct *task) { int arch = AUDIT_ARCH_SH; #ifdef CONFIG_CPU_LITTLE_ENDIAN arch |= __AUDIT_ARCH_LE; #endif return arch; } #endif /* __ASM_SH_SYSCALL_32_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
You can’t perform that action at this time.