lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aMlXCODJ4SqS_Bci@smile.fi.intel.com>
Date: Tue, 16 Sep 2025 15:24:40 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Nathan Chancellor <nathan@...nel.org>
Cc: kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
	llvm@...ts.linux.dev, Andrew Morton <akpm@...ux-foundation.org>,
	Baoquan He <bhe@...hat.com>,
	Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>
Subject: Re: [PATCH v1 1/1] kexec: Remove unused code in
 kimage_load_cma_segment()

On Mon, Sep 15, 2025 at 03:14:36PM -0700, Nathan Chancellor wrote:
> Hi Andy,
> 
> On Mon, Sep 15, 2025 at 05:55:43PM +0200, Andy Shevchenko wrote:
> > clang is not happy about set but unused variable:
> > 
> > kernel/kexec_core.c:745:16: error: variable 'maddr' set but not used [-Werror,-Wunused-but-set-variable]
> >   745 |         unsigned long maddr;
> >       |                       ^
> > 1 error generated.
> > 
> > Fix the compilation breakage (`make W=1` build) by removing unused variable.
> > 
> > Fixes: 07d24902977e ("kexec: enable CMA based contiguous allocation")
> 
> I don't think this fixes tag is right. maddr definitely looks used in
> that diff. I think it is a follow up simplification that introduces
> this.
> 
> Fixes: f4fecb50d6e1 ("kexec_core: remove superfluous page offset handling in segment loading")

Oh, you are right!

> Otherwise, this patch looks correct to me and GCC 16 will warn on this
> as well.
> 
>   kernel/kexec_core.c: In function 'kimage_load_cma_segment':
>   kernel/kexec_core.c:745:23: error: variable 'maddr' set but not used [-Werror=unused-but-set-variable=]
>     745 |         unsigned long maddr;
>         |                       ^~~~~

I'll add this as well to the commit message (in shorter form).

> Reviewed-by: Nathan Chancellor <nathan@...nel.org>

Thank you! I'm going to send a v2 soon.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ