kprobes_insn_page.S 746 B

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