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:   Wed, 30 Jan 2019 16:44:43 +0000
From:   Eugeniy Paltsev <eugeniy.paltsev@...opsys.com>
To:     "Eugeniy.Paltsev@...opsys.com" <eugeniy.paltsev@...opsys.com>,
        "Vineet Gupta" <vineet.gupta1@...opsys.com>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Alexey Brodkin" <alexey.brodkin@...opsys.com>
Subject: Re: [PATCH 2/5] ARCv2: introduce unaligned access under a Kconfig
 option

On Tue, 2019-01-29 at 21:44 +0000, Vineet Gupta wrote:
> On 1/29/19 2:49 AM, Eugeniy Paltsev wrote:
> > As of today we enable unaligned access unconditionally on ARCv2.
> > Lets move it under Kconfig option so we can disable it in case of
> > using HW configuration which lacks of it.
> > 
> > Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
> > ---
> >  arch/arc/Kconfig                      | 8 ++++++++
> >  arch/arc/include/asm/irqflags-arcv2.h | 4 ++++
> >  arch/arc/kernel/intc-arcv2.c          | 4 +++-
> >  3 files changed, 15 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arc/include/asm/irqflags-arcv2.h b/arch/arc/include/asm/irqflags-arcv2.h
> > index 8a4f77ea3238..9b911e2c6b31 100644
> > --- a/arch/arc/include/asm/irqflags-arcv2.h
> > +++ b/arch/arc/include/asm/irqflags-arcv2.h
> > @@ -44,8 +44,12 @@
> >  #define ARCV2_IRQ_DEF_PRIO	1
> >  
> >  /* seed value for status register */
> > +#ifdef CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS
> >  #define ISA_INIT_STATUS_BITS	(STATUS_IE_MASK | STATUS_AD_MASK | \
> >  					(ARCV2_IRQ_DEF_PRIO << 1))
> > +#else
> > +#define ISA_INIT_STATUS_BITS	(STATUS_IE_MASK | (ARCV2_IRQ_DEF_PRIO << 1))
> > +#endif /* CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS */
> 
> I'd prefer to change the define of STATUS_AD_MASK itself and keep all of this
> unchanged !
> 

Actually I'd prefer to leave STATUS_AD_MASK untouched. Otherwise we will implicitly assign
wrong value to STATUS_AD_MASK which is quite misleading.

BTW, STATUS_AD_MASK is used in ASM code in v2 patch and it shouldn't be dependent on
CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS.

-- 
 Eugeniy Paltsev

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ