arch/parisc/kernel/vdso64/sigtramp.S
Source file repositories/reference/linux-study-clean/arch/parisc/kernel/vdso64/sigtramp.S
File Facts
- System
- Linux kernel
- Corpus path
arch/parisc/kernel/vdso64/sigtramp.S- Extension
.S- Size
- 3879 bytes
- Lines
- 167
- Domain
- Architecture Layer
- Bucket
- arch/parisc
- Inferred role
- Architecture Layer: arch/parisc
- Status
- atlas-only
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/unistd.hlinux/linkage.hgenerated/asm-offsets.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <asm/unistd.h>
#include <linux/linkage.h>
#include <generated/asm-offsets.h>
.text
/* Gdb expects the trampoline is on the stack and the pc is offset from
a 64-byte boundary by 0, 4 or 5 instructions. Since the vdso trampoline
is not on the stack, we need a new variant with different offsets and
data to tell gdb where to find the signal context on the stack.
Here we put the offset to the context data at the start of the trampoline
region and offset the first trampoline by 2 instructions. Please do
not change the trampoline as the code in gdb depends on the following
instruction sequence exactly.
*/
.align 64
.word SIGFRAME_CONTEXT_REGS
/* The nop here is a hack. The dwarf2 unwind routines subtract 1 from
the return address to get an address in the middle of the presumed
call instruction. Since we don't have a call here, we artifically
extend the range covered by the unwind info by adding a nop before
the real start.
*/
nop
.globl __kernel_sigtramp_rt
.type __kernel_sigtramp_rt, @function
__kernel_sigtramp_rt:
.proc
.callinfo FRAME=ASM_SIGFRAME_SIZE,CALLS,SAVE_RP
.entry
.Lsigrt_start = . - 4
0: ldi 0, %r25 /* (in_syscall=0) */
ldi __NR_rt_sigreturn, %r20
ble 0x100(%sr2, %r0)
nop
1: ldi 1, %r25 /* (in_syscall=1) */
ldi __NR_rt_sigreturn, %r20
ble 0x100(%sr2, %r0)
nop
.Lsigrt_end:
.exit
.procend
.size __kernel_sigtramp_rt,.-__kernel_sigtramp_rt
.section .eh_frame,"a",@progbits
/* This is where the mcontext_t struct can be found on the stack. */
#define PTREGS SIGFRAME_CONTEXT_REGS /* 64-bit process offset is -720 */
/* Register REGNO can be found at offset OFS of the mcontext_t structure. */
.macro rsave regno,ofs
.byte 0x05 /* DW_CFA_offset_extended */
.uleb128 \regno; /* regno */
.uleb128 \ofs /* factored offset */
.endm
.Lcie:
.long .Lcie_end - .Lcie_start
.Lcie_start:
.long 0 /* CIE ID */
.byte 1 /* Version number */
.stringz "zRS" /* NUL-terminated augmentation string */
.uleb128 4 /* Code alignment factor */
.sleb128 8 /* Data alignment factor */
.byte 61 /* Return address register column, iaoq[0] */
Annotation
- Immediate include surface: `asm/unistd.h`, `linux/linkage.h`, `generated/asm-offsets.h`.
- Atlas domain: Architecture Layer / arch/parisc.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.