aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-07-16 13:34:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-07-16 13:34:29 -0700
commit8a3e4a64849eb9da0e8c7e693978499562581631 (patch)
treed86acd78af5b72ce4effeef665b387daec9ca655 /tools
parentf61a89ca1182c43aa7a141c40f4063be81bd2562 (diff)
parent719a937b7003933de1298ffa4b881dd6a234e244 (diff)
downloadxfs-lts-backports-8a3e4a64849eb9da0e8c7e693978499562581631.tar.gz
Merge tag 'objtool_urgent_for_v6.5_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull objtool fixes from Borislav Petkov: - Mark copy_iovec_from_user() __noclone in order to prevent gcc from doing an inter-procedural optimization and confuse objtool - Initialize struct elf fully to avoid build failures * tag 'objtool_urgent_for_v6.5_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: iov_iter: Mark copy_iovec_from_user() noclone objtool: initialize all of struct elf
Diffstat (limited to 'tools')
-rw-r--r--tools/objtool/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index d420b5d2e2b675..081befa4674b86 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -1005,7 +1005,7 @@ struct elf *elf_open_read(const char *name, int flags)
perror("malloc");
return NULL;
}
- memset(elf, 0, offsetof(struct elf, sections));
+ memset(elf, 0, sizeof(*elf));
INIT_LIST_HEAD(&elf->sections);