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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202403221640.27DC5CB09@keescook>
Date: Fri, 22 Mar 2024 16:41:48 -0700
From: Kees Cook <keescook@...omium.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: tglx@...utronix.de, Guixiong Wei <weiguixiong@...edance.com>,
	jgross@...e.com, mingo@...hat.com, bp@...en8.de,
	dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
	peterz@...radead.org, gregkh@...uxfoundation.org,
	tony.luck@...el.com, adobriyan@...il.com,
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] x86, relocs: Ignore relocations in .notes section on
 walk_relocs

On Fri, Mar 22, 2024 at 09:45:12AM +0100, Ingo Molnar wrote:
> 
> * Kees Cook <keescook@...omium.org> wrote:
> 
> > On Sun, 17 Mar 2024 23:05:47 +0800, Guixiong Wei wrote:
> > > The commit aaa8736370db ("x86, relocs: Ignore relocations in
> > > .notes section") only ignore .note section on print_absolute_relocs,
> > > but it also need to add on walk_relocs to avoid relocations in .note
> > > section.
> > > 
> > > 
> > 
> > Applied to for-next/hardening, thanks!
> > 
> > [1/1] x86, relocs: Ignore relocations in .notes section on walk_relocs
> >       https://git.kernel.org/kees/c/6ba438a29b5d
> 
> Please don't - these are x86 patches, plus it contains an eyesore - see 
> below ...

Dropped.

> 
> Thanks,
> 
> 	Ingo
> 
>  relocs.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> Index: tip/arch/x86/tools/relocs.c
> ===================================================================
> --- tip.orig/arch/x86/tools/relocs.c
> +++ tip/arch/x86/tools/relocs.c
> @@ -752,9 +752,8 @@ static void walk_relocs(int (*process)(s
>  		 * values there are meant for pre-boot consumption (e.g.
>  		 * startup_xen).
>  		 */
> -		if (sec_applies->shdr.sh_type == SHT_NOTE) {
> +		if (sec_applies->shdr.sh_type == SHT_NOTE)
>  			continue;
> -		}

I think the patch was trying to follow the existing code style in the
file. See line 733, for example:

 		if (sec->shdr.sh_type != SHT_REL_TYPE) {
 			continue;
 		}

But yes, agreed, your change is good. :)

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ