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
7cc09c2
Documentation
arch
alpha
arm
boot
common
configs
kernel
Makefile
armksyms.c
arthur.c
asm-offsets.c
atags.c
atags.h
bios32.c
calls.S
compat.c
compat.h
crunch-bits.S
crunch.c
debug.S
dma-isa.c
dma.c
ecard.c
ecard.h
entry-armv.S
entry-common.S
entry-header.S
fiq.c
head-common.S
head-nommu.S
head.S
init_task.c
io.c
irq.c
isa.c
iwmmxt.S
kprobes-decode.c
kprobes.c
machine_kexec.c
module.c
process.c
ptrace.c
ptrace.h
relocate_kernel.S
setup.c
signal.c
signal.h
smp.c
stacktrace.c
stacktrace.h
sys_arm.c
sys_oabi-compat.c
thumbee.c
time.c
traps.c
vmlinux.lds.S
xscale-cp0.c
lib
mach-aaec2000
mach-at91
mach-clps711x
mach-clps7500
mach-davinci
mach-ebsa110
mach-ep93xx
mach-footbridge
mach-h720x
mach-imx
mach-integrator
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp2000
mach-ixp23xx
mach-ixp4xx
mach-ks8695
mach-l7200
mach-lh7a40x
mach-msm
mach-mx3
mach-netx
mach-ns9xxx
mach-omap1
mach-omap2
mach-orion5x
mach-pnx4008
mach-pxa
mach-realview
mach-rpc
mach-s3c2400
mach-s3c2410
mach-s3c2412
mach-s3c2440
mach-s3c2442
mach-s3c2443
mach-sa1100
mach-shark
mach-versatile
mm
nwfpe
oprofile
plat-iop
plat-mxc
plat-omap
plat-orion
plat-s3c
plat-s3c24xx
tools
vfp
Kconfig
Kconfig-nommu
Kconfig.debug
Makefile
avr32
blackfin
cris
frv
h8300
ia64
m32r
m68k
m68knommu
mips
mn10300
parisc
powerpc
ppc
s390
sh
sparc
sparc64
um
v850
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
arm
/
kernel
/
arthur.c
Copy path
Blame
Blame
Latest commit
History
History
94 lines (80 loc) · 2.22 KB
Breadcrumbs
linux
/
arch
/
arm
/
kernel
/
arthur.c
Top
File metadata and controls
Code
Blame
94 lines (80 loc) · 2.22 KB
Raw
/* * linux/arch/arm/kernel/arthur.c * * Copyright (C) 1998, 1999, 2000, 2001 Philip Blundell * * Arthur personality */ /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include <linux/module.h> #include <linux/personality.h> #include <linux/stddef.h> #include <linux/signal.h> #include <linux/init.h> #include <linux/sched.h> #include <asm/ptrace.h> /* Arthur doesn't have many signals, and a lot of those that it does have don't map easily to any Linux equivalent. Never mind. */ #define ARTHUR_SIGABRT 1 #define ARTHUR_SIGFPE 2 #define ARTHUR_SIGILL 3 #define ARTHUR_SIGINT 4 #define ARTHUR_SIGSEGV 5 #define ARTHUR_SIGTERM 6 #define ARTHUR_SIGSTAK 7 #define ARTHUR_SIGUSR1 8 #define ARTHUR_SIGUSR2 9 #define ARTHUR_SIGOSERROR 10 static unsigned long arthur_to_linux_signals[32] = { 0, 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 }; static unsigned long linux_to_arthur_signals[32] = { 0, -1, ARTHUR_SIGINT, -1, ARTHUR_SIGILL, 5, ARTHUR_SIGABRT, 7, ARTHUR_SIGFPE, 9, ARTHUR_SIGUSR1, ARTHUR_SIGSEGV, ARTHUR_SIGUSR2, 13, 14, ARTHUR_SIGTERM, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; static void arthur_lcall7(int nr, struct pt_regs *regs) { struct siginfo info; info.si_signo = SIGSWI; info.si_errno = nr; /* Bounce it to the emulator */ send_sig_info(SIGSWI, &info, current); } static struct exec_domain arthur_exec_domain = { .name = "Arthur", .handler = arthur_lcall7, .pers_low = PER_RISCOS, .pers_high = PER_RISCOS, .signal_map = arthur_to_linux_signals, .signal_invmap = linux_to_arthur_signals, .module = THIS_MODULE, }; /* * We could do with some locking to stop Arthur being removed while * processes are using it. */ static int __init arthur_init(void) { return register_exec_domain(&arthur_exec_domain); } static void __exit arthur_exit(void) { unregister_exec_domain(&arthur_exec_domain); } module_init(arthur_init); module_exit(arthur_exit); MODULE_LICENSE("GPL");
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
You can’t perform that action at this time.