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]
Date:   Mon, 22 May 2023 01:12:29 +0000
From:   JeeHeng Sia <jeeheng.sia@...rfivetech.com>
To:     Song Shuai <suagrfillet@...il.com>,
        "paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
        "palmer@...belt.com" <palmer@...belt.com>,
        "aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
        Mason Huo <mason.huo@...rfivetech.com>,
        "conor.dooley@...rochip.com" <conor.dooley@...rochip.com>
CC:     "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] riscv: hibernation: Replace jalr with jr before
 suspend_restore_regs



> -----Original Message-----
> From: JeeHeng Sia
> Sent: Friday, May 19, 2023 6:45 PM
> To: 'Song Shuai' <suagrfillet@...il.com>; paul.walmsley@...ive.com; palmer@...belt.com; aou@...s.berkeley.edu; Mason Huo
> <mason.huo@...rfivetech.com>; conor.dooley@...rochip.com
> Cc: linux-riscv@...ts.infradead.org; linux-kernel@...r.kernel.org
> Subject: RE: [PATCH] riscv: hibernation: Replace jalr with jr before suspend_restore_regs
> 
> looks good to me.
> 
> Thanks
> Regards
> Jee Heng
> > -----Original Message-----
> > From: Song Shuai <suagrfillet@...il.com>
> > Sent: Friday, May 19, 2023 2:09 PM
> > To: paul.walmsley@...ive.com; palmer@...belt.com; aou@...s.berkeley.edu; JeeHeng Sia <jeeheng.sia@...rfivetech.com>;
> Mason
> > Huo <mason.huo@...rfivetech.com>; conor.dooley@...rochip.com
> > Cc: linux-riscv@...ts.infradead.org; linux-kernel@...r.kernel.org; Song Shuai <suagrfillet@...il.com>
> > Subject: [PATCH] riscv: hibernation: Replace jalr with jr before suspend_restore_regs
> >
> > No need to link the x1/ra reg via jalr before suspend_restore_regs
> > So it's better to replace jalr with jr.
> >
> > Signed-off-by: Song Shuai <suagrfillet@...il.com>
> > ---
> >  arch/riscv/kernel/hibernate-asm.S | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/riscv/kernel/hibernate-asm.S b/arch/riscv/kernel/hibernate-asm.S
> > index effaf5ca5da0..5c76671c7e15 100644
> > --- a/arch/riscv/kernel/hibernate-asm.S
> > +++ b/arch/riscv/kernel/hibernate-asm.S
> > @@ -50,7 +50,7 @@ ENTRY(hibernate_restore_image)
> >  	REG_L	s4, restore_pblist
> >  	REG_L	a1, relocated_restore_code
> >
> > -	jalr	a1
> > +	jr	a1
> >  END(hibernate_restore_image)
> >
> >  /*
> > @@ -73,5 +73,5 @@ ENTRY(hibernate_core_restore_code)
> >  	REG_L	s4, HIBERN_PBE_NEXT(s4)
> >  	bnez	s4, .Lcopy
> >
> > -	jalr	s2
> > +	jr	s2
> I am content with these changes, as they do not involve a return after the jump
Reviewed-by: JeeHeng Sia <jeeheng.sia@...rfivetech.com >

Thanks
Regards
Jee Heng
> >  END(hibernate_core_restore_code)
> > --
> > 2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ