summaryrefslogtreecommitdiff
path: root/fs/binfmt_misc.c
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@kernel.org>2023-09-27 16:29:33 +0300
committerKees Cook <keescook@chromium.org>2023-10-04 05:48:44 +0300
commit553e41d1bc95a09e32b6beb0a2b1c20dc4ea9b19 (patch)
tree121f370cf94496d67df7f7ceb22b18261a78bf2a /fs/binfmt_misc.c
parent2632bb84d1d53cfd6cf65261064273ded4f759d5 (diff)
downloadlinux-553e41d1bc95a09e32b6beb0a2b1c20dc4ea9b19.tar.xz
binfmt_elf_fdpic: clean up debug warnings
The binfmt_elf_fdpic loader has some debug trace that can be enabled at build time. The recent 64-bit additions cause some warnings if that debug is enabled, such as: fs/binfmt_elf_fdpic.c: In function ‘elf_fdpic_map_file’: fs/binfmt_elf_fdpic.c:46:33: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘Elf64_Addr’ {aka ‘long long unsigned int’} [-Wformat=] 46 | #define kdebug(fmt, ...) printk("FDPIC "fmt"\n" ,##__VA_ARGS__ ) | ^~~~~~~~ ./include/linux/printk.h:427:25: note: in definition of macro ‘printk_index_wrap’ 427 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~ Cast values to the largest possible type (which is equivilent to unsigned long long in this case) and use appropriate format specifiers to match. Fixes: b922bf04d2c1 ("binfmt_elf_fdpic: support 64-bit systems") Signed-off-by: Greg Ungerer <gerg@kernel.org> Link: https://lore.kernel.org/r/20230927132933.3290734-1-gerg@kernel.org Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/binfmt_misc.c')
0 files changed, 0 insertions, 0 deletions