summaryrefslogtreecommitdiff
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2022-02-13 22:25:20 +0300
committerKees Cook <keescook@chromium.org>2022-03-01 16:16:27 -0800
commitd65bc29be0ae4ca2368df25dc6f6247aefb57f07 (patch)
tree94d129acb51ec8c2b9431b521944c8a600db9b76 /fs/binfmt_elf.c
parent9132c3947b09a6c67372424ff69f867f2cee82f8 (diff)
downloadlwn-d65bc29be0ae4ca2368df25dc6f6247aefb57f07.tar.gz
lwn-d65bc29be0ae4ca2368df25dc6f6247aefb57f07.zip
binfmt: move more stuff undef CONFIG_COREDUMP
struct linux_binfmt::core_dump and struct min_coredump::min_coredump are used under CONFIG_COREDUMP only. Shrink those embedded configs a bit. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/YglbIFyN+OtwVyjW@localhost.localdomain
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 65ea5381c5c7..d0c1703b9576 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -101,8 +101,10 @@ static struct linux_binfmt elf_format = {
.module = THIS_MODULE,
.load_binary = load_elf_binary,
.load_shlib = load_elf_library,
+#ifdef CONFIG_COREDUMP
.core_dump = elf_core_dump,
.min_coredump = ELF_EXEC_PAGESIZE,
+#endif
};
#define BAD_ADDR(x) (unlikely((unsigned long)(x) >= TASK_SIZE))