Commit | Line | Data |
---|---|---|
b61e1f32 HC |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | ||
3 | #include <linux/linkage.h> | |
4 | ||
5 | /* | |
6 | * insn_page is a special 4k aligned dummy function for kprobes. | |
7 | * It will contain all kprobed instructions that are out-of-line executed. | |
8 | * The page must be within the kernel image to guarantee that the | |
9 | * out-of-line instructions are within 2GB distance of their original | |
10 | * location. Using a dummy function ensures that the insn_page is within | |
11 | * the text section of the kernel and mapped read-only/executable from | |
12 | * the beginning on, thus avoiding to split large mappings if the page | |
13 | * would be in the data section instead. | |
14 | */ | |
15 | .section .kprobes.text, "ax" | |
16 | .align 4096 | |
17 | ENTRY(kprobes_insn_page) | |
18 | .rept 2048 | |
19 | .word 0x07fe | |
20 | .endr | |
21 | ENDPROC(kprobes_insn_page) | |
22 | .previous |