Skip to content

Commit

Permalink
Merge tag 'objtool_urgent_for_v6.5_rc2' of git://git.kernel.org/pub/s…
Browse files Browse the repository at this point in the history
…cm/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
  • Loading branch information
Linus Torvalds committed Jul 16, 2023
2 parents f61a89c + 719a937 commit 8a3e4a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/iov_iter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ static __noclone int copy_compat_iovec_from_user(struct iovec *iov,
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;
Expand Down
2 changes: 1 addition & 1 deletion tools/objtool/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8a3e4a6

Please sign in to comment.