summaryrefslogtreecommitdiff
path: root/arch/riscv/include/uapi
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@kernel.org>2023-07-11 16:07:54 +0300
committerPalmer Dabbelt <palmer@rivosinc.com>2023-08-24 00:17:43 +0300
commit9549fb354ef1a451ceddfa404ae3e943c5c803d0 (patch)
tree997fbf877b8e35e957479814c29510c767ebc74a /arch/riscv/include/uapi
parentb922bf04d2c1355633bdefbc2ed5fba1f0d4df07 (diff)
downloadlinux-9549fb354ef1a451ceddfa404ae3e943c5c803d0.tar.xz
riscv: support the elf-fdpic binfmt loader
Add support for enabling and using the binfmt_elf_fdpic program loader on RISC-V platforms. The most important change is to setup registers during program load to pass the mapping addresses to the new process. One of the interesting features of the elf-fdpic loader is that it also allows appropriately compiled ELF format binaries to be loaded on nommu systems. Appropriate being those compiled with -pie. Signed-off-by: Greg Ungerer <gerg@kernel.org> Acked-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20230711130754.481209-3-gerg@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/include/uapi')
-rw-r--r--arch/riscv/include/uapi/asm/ptrace.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/include/uapi/asm/ptrace.h b/arch/riscv/include/uapi/asm/ptrace.h
index e17c550986a6..30f6d6537adc 100644
--- a/arch/riscv/include/uapi/asm/ptrace.h
+++ b/arch/riscv/include/uapi/asm/ptrace.h
@@ -10,6 +10,11 @@
#include <linux/types.h>
+#define PTRACE_GETFDPIC 33
+
+#define PTRACE_GETFDPIC_EXEC 0
+#define PTRACE_GETFDPIC_INTERP 1
+
/*
* User-mode register state for core dumps, ptrace, sigcontext
*