From: Kees Cook <keescook@chromium.org>
To: stable@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>,
Akira Kawata <akirakawata1@gmail.com>,
linux-hardening@vger.kernel.org
Subject: v5.10.y (was Re: [linux-stable-rc:linux-5.10.y 4906/9423]) arch/mips/kernel/../../../fs/binfmt_elf.c:823:16: warning: variable 'load_addr' set but not used)
Date: Wed, 9 Nov 2022 12:26:57 -0800 [thread overview]
Message-ID: <202211091218.79009F93@keescook> (raw)
In-Reply-To: <202211100224.TrhZPz0k-lkp@intel.com>
Hi stable maintainers,
Can you please backport commit
2b4bfbe09676 ("fs/binfmt_elf: Refactor load_elf_binary function")
to v5.10.y and v5.15.y?
It seems that commit
0da1d5002745 ("fs/binfmt_elf: Fix AT_PHDR for unusual ELF files")
was backported into v5.10.110 and v5.15.33, but needs the additional
patch for a clean build.
Thanks!
-Kees
On Thu, Nov 10, 2022 at 03:04:25AM +0800, kernel test robot wrote:
> Hi Akira,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> head: 69a0227f6bd671ba8efa071c58d9f127932e25f2
> commit: dd85ed4af8f5cb42990fb5f42c22d268028693a3 [4906/9423] fs/binfmt_elf: Fix AT_PHDR for unusual ELF files
> config: mips-buildonly-randconfig-r001-20221109
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 463da45892e2d2a262277b91b96f5f8c05dc25d0)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install mips cross compiling tool for clang build
> # apt-get install binutils-mips64el-linux-gnuabi64
> # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=dd85ed4af8f5cb42990fb5f42c22d268028693a3
> git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> git fetch --no-tags linux-stable-rc linux-5.10.y
> git checkout dd85ed4af8f5cb42990fb5f42c22d268028693a3
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> In file included from arch/mips/kernel/binfmt_elfn32.c:113:
> >> arch/mips/kernel/../../../fs/binfmt_elf.c:823:16: warning: variable 'load_addr' set but not used [-Wunused-but-set-variable]
> unsigned long load_addr, load_bias = 0, phdr_addr = 0;
> ^
> arch/mips/kernel/binfmt_elfn32.c:86:1: warning: unused function 'jiffies_to_old_timeval32' [-Wunused-function]
> jiffies_to_old_timeval32(unsigned long jiffies, struct old_timeval32 *value)
> ^
> 2 warnings generated.
>
>
> vim +/load_addr +823 arch/mips/kernel/../../../fs/binfmt_elf.c
>
> 819
> 820 static int load_elf_binary(struct linux_binprm *bprm)
> 821 {
> 822 struct file *interpreter = NULL; /* to shut gcc up */
> > 823 unsigned long load_addr, load_bias = 0, phdr_addr = 0;
> 824 int load_addr_set = 0;
> 825 unsigned long error;
> 826 struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
> 827 struct elf_phdr *elf_property_phdata = NULL;
--
Kees Cook
next parent reply other threads:[~2022-11-09 20:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202211100224.TrhZPz0k-lkp@intel.com>
2022-11-09 20:26 ` Kees Cook [this message]
2022-11-11 9:00 ` v5.10.y (was Re: [linux-stable-rc:linux-5.10.y 4906/9423]) arch/mips/kernel/../../../fs/binfmt_elf.c:823:16: warning: variable 'load_addr' set but not used) Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202211091218.79009F93@keescook \
--to=keescook@chromium.org \
--cc=akirakawata1@gmail.com \
--cc=linux-hardening@vger.kernel.org \
--cc=lkp@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox