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: <538335b164bf8b84b8a55c5654ed15d849479388.camel@intel.com>
Date:   Thu, 8 Jun 2023 04:41:37 +0000
From:   "Huang, Kai" <kai.huang@...el.com>
To:     "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>
CC:     "hpa@...or.com" <hpa@...or.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "jpoimboe@...nel.org" <jpoimboe@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "Wilk, Konrad" <konrad.wilk@...cle.com>
Subject: Re: [PATCH] x86/kexec: Add a comment to relocate_kernel() for better
 readability

On Wed, 2023-06-07 at 14:19 +0300, kirill.shutemov@...ux.intel.com wrote:
> On Wed, Jun 07, 2023 at 10:39:10PM +1200, Kai Huang wrote:
> > The reason to save %rcx to %r11 before calling swap_pages isn't that
> > obvious w/o looking into the swap_pages itself.  Add a comment to
> > improve the readability.
> > 
> > Signed-off-by: Kai Huang <kai.huang@...el.com>
> > ---
> >  arch/x86/kernel/relocate_kernel_64.S | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
> > index 56cab1bb25f5..97deae3c5e6c 100644
> > --- a/arch/x86/kernel/relocate_kernel_64.S
> > +++ b/arch/x86/kernel/relocate_kernel_64.S
> > @@ -169,6 +169,10 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
> >  	wbinvd
> >  1:
> >  
> > +	/*
> > +	 * Save the preserve_context to %r11 as
> > +	 * swap_pages clobbers %rcx.
> > +	 */
> 
> Line split is not needed. It fits nicely under 80-characters.
> 
> +	/* Save the preserve_context to %r11 as swap_pages clobbers %rcx. */
> 
> Otherwise, LGTM.

Sure.  Will do.

With above change, may I add your Acked-by ? :)

> 
> >  	movq	%rcx, %r11
> >  	call	swap_pages
> >  
> > 
> > base-commit: 409bf2895d71bb68bc5b8589036e5ed1ca30bada
> > -- 
> > 2.40.1
> > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ