[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211091218.79009F93@keescook>
Date: Wed, 9 Nov 2022 12:26:57 -0800
From: Kees Cook <keescook@...omium.org>
To: stable@...r.kernel.org
Cc: kernel test robot <lkp@...el.com>,
Akira Kawata <akirakawata1@...il.com>,
linux-hardening@...r.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)
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@...el.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
Powered by blists - more mailing lists