18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci#include <linux/linkage.h>
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci/*
68c2ecf20Sopenharmony_ci * insn_page is a special 4k aligned dummy function for kprobes.
78c2ecf20Sopenharmony_ci * It will contain all kprobed instructions that are out-of-line executed.
88c2ecf20Sopenharmony_ci * The page must be within the kernel image to guarantee that the
98c2ecf20Sopenharmony_ci * out-of-line instructions are within 2GB distance of their original
108c2ecf20Sopenharmony_ci * location. Using a dummy function ensures that the insn_page is within
118c2ecf20Sopenharmony_ci * the text section of the kernel and mapped read-only/executable from
128c2ecf20Sopenharmony_ci * the beginning on, thus avoiding to split large mappings if the page
138c2ecf20Sopenharmony_ci * would be in the data section instead.
148c2ecf20Sopenharmony_ci */
158c2ecf20Sopenharmony_ci	.section .kprobes.text, "ax"
168c2ecf20Sopenharmony_ci	.align 4096
178c2ecf20Sopenharmony_ciENTRY(kprobes_insn_page)
188c2ecf20Sopenharmony_ci	.rept 2048
198c2ecf20Sopenharmony_ci	.word 0x07fe
208c2ecf20Sopenharmony_ci	.endr
218c2ecf20Sopenharmony_ciENDPROC(kprobes_insn_page)
228c2ecf20Sopenharmony_ci	.previous
23