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
91481c9
Documentation
LICENSES
arch
alpha
arc
arm
arm64
csky
hexagon
loongarch
m68k
microblaze
mips
nios2
openrisc
parisc
boot
configs
include
asm
Kbuild
alternative.h
asm-offsets.h
asmregs.h
assembly.h
atomic.h
barrier.h
bitops.h
bug.h
cache.h
cacheflush.h
checksum.h
cmpxchg.h
compat.h
compat_ucontext.h
current.h
delay.h
dma-mapping.h
dma.h
dwarf.h
eisa_bus.h
eisa_eeprom.h
elf.h
extable.h
fb.h
fixmap.h
floppy.h
ftrace.h
futex.h
grfioctl.h
hardirq.h
hardware.h
hash.h
hugetlb.h
io.h
irq.h
irqflags.h
jump_label.h
kbdleds.h
kexec.h
kfence.h
kgdb.h
kprobes.h
ldcw.h
led.h
linkage.h
mmu.h
mmu_context.h
mmzone.h
module.h
page.h
parisc-device.h
parport.h
patch.h
pci.h
pdc.h
pdc_chassis.h
pdcpat.h
perf.h
perf_event.h
pgalloc.h
pgtable.h
prefetch.h
processor.h
psw.h
ptrace.h
ropes.h
rt_sigframe.h
runway.h
seccomp.h
sections.h
serial.h
shmparam.h
signal.h
smp.h
socket.h
sparsemem.h
special_insns.h
spinlock.h
spinlock_types.h
string.h
superio.h
switch_to.h
syscall.h
thread_info.h
timex.h
tlb.h
tlbflush.h
topology.h
traps.h
uaccess.h
ucontext.h
unaligned.h
unistd.h
unwind.h
vdso.h
vmalloc.h
uapi
kernel
lib
math-emu
mm
net
video
Kbuild
Kconfig
Kconfig.debug
Makefile
defpalo.conf
install.sh
powerpc
riscv
s390
sh
sparc
um
x86
xtensa
.gitignore
Kconfig
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
rust
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
arch
/
parisc
/
include
/
asm
/
extable.h
Copy path
Blame
Blame
Latest commit
History
History
64 lines (56 loc) · 2.17 KB
Breadcrumbs
linux
/
arch
/
parisc
/
include
/
asm
/
extable.h
Top
File metadata and controls
Code
Blame
64 lines (56 loc) · 2.17 KB
Raw
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __PARISC_EXTABLE_H #define __PARISC_EXTABLE_H #include <asm/ptrace.h> #include <linux/compiler.h> /* * The exception table consists of three addresses: * * - A relative address to the instruction that is allowed to fault. * - A relative address at which the program should continue (fixup routine) * - An asm statement which specifies which CPU register will * receive -EFAULT when an exception happens if the lowest bit in * the fixup address is set. * * Note: The register specified in the err_opcode instruction will be * modified at runtime if a fault happens. Register %r0 will be ignored. * * Since relative addresses are used, 32bit values are sufficient even on * 64bit kernel. */ struct pt_regs; int fixup_exception(struct pt_regs *regs); #define ARCH_HAS_RELATIVE_EXTABLE struct exception_table_entry { int insn; /* relative address of insn that is allowed to fault. */ int fixup; /* relative address of fixup routine */ int err_opcode; /* sample opcode with register which holds error code */ }; #define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr, opcode )\ ".section __ex_table,\"aw\"\n" \ ".align 4\n" \ ".word (" #fault_addr " - .), (" #except_addr " - .)\n" \ opcode "\n" \ ".previous\n" /* * ASM_EXCEPTIONTABLE_ENTRY_EFAULT() creates a special exception table entry * (with lowest bit set) for which the fault handler in fixup_exception() will * load -EFAULT on fault into the register specified by the err_opcode instruction, * and zeroes the target register in case of a read fault in get_user(). */ #define ASM_EXCEPTIONTABLE_VAR(__err_var) \ int __err_var = 0 #define ASM_EXCEPTIONTABLE_ENTRY_EFAULT( fault_addr, except_addr, register )\ ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr + 1, "or %%r0,%%r0," register) static inline void swap_ex_entry_fixup(struct exception_table_entry *a, struct exception_table_entry *b, struct exception_table_entry tmp, int delta) { a->fixup = b->fixup + delta; b->fixup = tmp.fixup - delta; a->err_opcode = b->err_opcode; b->err_opcode = tmp.err_opcode; } #define swap_ex_entry_fixup swap_ex_entry_fixup #endif
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
You can’t perform that action at this time.