diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-16 23:34:29 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-16 23:34:29 +0300 |
commit | 8a3e4a64849eb9da0e8c7e693978499562581631 (patch) | |
tree | d86acd78af5b72ce4effeef665b387daec9ca655 /tools | |
parent | f61a89ca1182c43aa7a141c40f4063be81bd2562 (diff) | |
parent | 719a937b7003933de1298ffa4b881dd6a234e244 (diff) | |
download | linux-8a3e4a64849eb9da0e8c7e693978499562581631.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index d420b5d2e2b6..081befa4674b 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); |