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: <cbc0c2d68b950bf984b5cb16ce7fa6d2348940ad.camel@maquefel.me>
Date:   Fri, 28 Jul 2023 13:01:11 +0300
From:   Nikita Shubin <nikita.shubin@...uefel.me>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Andy Shevchenko <andy@...nel.org>,
        Alexander Sverdlin <alexander.sverdlin@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 07/42] soc: Add SoC driver for Cirrus ep93xx

On Fri, 2023-07-28 at 12:46 +0300, Andy Shevchenko wrote:
> On Fri, Jul 28, 2023 at 12:28 PM Nikita Shubin
> <nikita.shubin@...uefel.me> wrote:
> > 
> > Hello Andy!
> > 
> > On Fri, 2023-07-21 at 17:13 +0300, Andy Shevchenko wrote:
> > > On Thu, Jul 20, 2023 at 02:29:07PM +0300, Nikita Shubin via B4
> > > Relay
> > > wrote:
> > > > From: Nikita Shubin <nikita.shubin@...uefel.me>
> > > > +       spin_lock_irqsave(&ep93xx_swlock, flags);
> > > > +
> > > > +       regmap_read(map, EP93XX_SYSCON_DEVCFG, &val);
> > > > +       val &= ~clear_bits;
> > > > +       val |= set_bits;
> > > > +       regmap_write(map, EP93XX_SYSCON_SWLOCK,
> > > > EP93XX_SWLOCK_MAGICK);
> > > > +       regmap_write(map, EP93XX_SYSCON_DEVCFG, val);
> > > 
> > > Is this sequence a must?
> > > I.o.w. can you first supply magic and then update devcfg?
> > > 
> > 
> > Unfortunately it is a must to write EP93XX_SYSCON_SWLOCK and only
> > then
> > the next write to swlocked registers will succeed.
> 
> This doesn't answer my question. Can you first write a magic and then
> _update_ the other register (update means RMW op)?
> 

I see your point now - citing docs:

"Logic safeguards are included to condition the control signals for
power connection to the matrix to prevent part damage. In addition, a
software lock register is included that must be written with 0xAA
before each register write to change the values of the four switch
matrix control registers."

So reading SHOULDN'T affect the lock.

But as we checked reading also breaks the lock, that's why this looks
so odd, it was done for purpose - i'll check it once again anyway.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ