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  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]
Date:   Sun, 9 Aug 2020 17:37:29 +0900
From:   Stafford Horne <shorne@...il.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Jonas Bonn <jonas@...thpole.se>,
        Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
        openrisc@...ts.librecores.org
Subject: Re: [PATCH v2 5/6] openrisc: signal: Fix sparse address space
 warnings

On Sun, Aug 09, 2020 at 01:08:42AM +0200, Luc Van Oostenryck wrote:
> On Sun, Aug 09, 2020 at 07:48:22AM +0900, Stafford Horne wrote:
> > On Thu, Aug 06, 2020 at 09:04:49PM +0200, Luc Van Oostenryck wrote:
> > > On Thu, Aug 06, 2020 at 06:07:24AM +0900, Stafford Horne wrote:
> > > > ---
> > > >  arch/openrisc/kernel/signal.c | 14 +++++++-------
> > > >  1 file changed, 7 insertions(+), 7 deletions(-)
> > > > 
> > > > diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c
> > > > index 4f0754874d78..7ce0728412f6 100644
> > > > --- a/arch/openrisc/kernel/signal.c
> > > > +++ b/arch/openrisc/kernel/signal.c
> > > > @@ -76,7 +76,7 @@ asmlinkage long _sys_rt_sigreturn(struct pt_regs *regs)
> > > >  	 * then frame should be dword aligned here.  If it's
> > > >  	 * not, then the user is trying to mess with us.
> > > >  	 */
> > > > -	if (((long)frame) & 3)
> > > > +	if (((__force unsigned long)frame) & 3)
> > > >  		goto badframe;
> > > 
> > > Same as patch 6, the __force is not needed.
> > 
> > Thanks,  I thought this was complaining before, I tested now and there is no
> > problem so I must have been mixed up with something else.
> 
> Sparse should have complained with with the cast to long but
> purposely doesn't with unsigned long (or uintptr_t).
> So, no mix up, I think.

You are right, I noticed that right after I sent that email.  Thanks a lot.

-Stafford

Powered by blists - more mailing lists