diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-16 13:34:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-16 13:34:29 -0700 |
commit | 8a3e4a64849eb9da0e8c7e693978499562581631 (patch) | |
tree | d86acd78af5b72ce4effeef665b387daec9ca655 | |
parent | f61a89ca1182c43aa7a141c40f4063be81bd2562 (diff) | |
parent | 719a937b7003933de1298ffa4b881dd6a234e244 (diff) | |
download | linux-stable-8a3e4a64849eb9da0e8c7e693978499562581631.tar.gz linux-stable-8a3e4a64849eb9da0e8c7e693978499562581631.tar.bz2 linux-stable-8a3e4a64849eb9da0e8c7e693978499562581631.zip |
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
-rw-r--r-- | lib/iov_iter.c | 2 | ||||
-rw-r--r-- | tools/objtool/elf.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index b667b1e2f688..e4dc809d1075 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -1349,7 +1349,7 @@ uaccess_end: return ret; } -static int copy_iovec_from_user(struct iovec *iov, +static __noclone int copy_iovec_from_user(struct iovec *iov, const struct iovec __user *uiov, unsigned long nr_segs) { int ret = -EFAULT; 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); |