public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* 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)
       [not found] <202211100224.TrhZPz0k-lkp@intel.com>
@ 2022-11-09 20:26 ` Kees Cook
  2022-11-11  9:00   ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2022-11-09 20:26 UTC (permalink / raw)
  To: stable; +Cc: kernel test robot, Akira Kawata, linux-hardening

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 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)
  2022-11-09 20:26 ` 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) Kees Cook
@ 2022-11-11  9:00   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2022-11-11  9:00 UTC (permalink / raw)
  To: Kees Cook; +Cc: stable, kernel test robot, Akira Kawata, linux-hardening

On Wed, Nov 09, 2022 at 12:26:57PM -0800, Kees Cook wrote:
> 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.

I would love to, but it does not apply cleanly.  Can you provide a
working backport?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-11  9:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202211100224.TrhZPz0k-lkp@intel.com>
2022-11-09 20:26 ` 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) Kees Cook
2022-11-11  9:00   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox