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: <CAHp75VcumcH_9-2P2iayGWwD3Y87A7CZyO9vxqvbaUptS1FeQw@mail.gmail.com>
Date: Mon, 14 Apr 2025 16:55:41 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Ivan Vecera <ivecera@...hat.com>
Cc: Andy Shevchenko <andy@...nel.org>, netdev@...r.kernel.org, 
	Michal Schmidt <mschmidt@...hat.com>, Vadim Fedorenko <vadim.fedorenko@...ux.dev>, 
	Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>, Jiri Pirko <jiri@...nulli.us>, 
	Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Prathosh Satish <Prathosh.Satish@...rochip.com>, Lee Jones <lee@...nel.org>, 
	Kees Cook <kees@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH 01/28] mfd: Add Microchip ZL3073x support

On Mon, Apr 14, 2025 at 2:52 PM Ivan Vecera <ivecera@...hat.com> wrote:
> On 14. 04. 25 1:39 odp., Ivan Vecera wrote:
> > On 14. 04. 25 8:36 dop., Andy Shevchenko wrote:
> >>> What is wrong here?
> >>>
> >>> I have a device that uses 7-bit addresses and have 16 register pages.
> >>> Each pages is from 0x00-0x7f and register 0x7f is used as page selector
> >>> where bits 0-3 select the page.
> >> The problem is that you overlap virtual page over the real one (the
> >> main one).
> >>
> >> The drivers you mentioned in v2 discussions most likely are also buggy.
> >> As I implied in the above question the developers hardly get the
> >> regmap ranges
> >> right. It took me quite a while to see the issue, so it's not
> >> particularly your
> >> fault.
> > Hi Andy,
> >
> > thank you I see the point.
> >
> > Do you mean that the selector register should not be part of the range?
> >
> > If so, does it mean that I have to specify a range for each page? Like
> > this:
> >
> >      {
> >          /* Page 0 */
> >          .range_min    = 0x000,
> >          .range_max    = 0x07e,
> >          .selector_reg    = ZL3073x_PAGE_SEL,
> >          .selector_mask    = GENMASK(3, 0),
> >          .selector_shift    = 0,
> >          .window_start    = 0,
> >          .window_len    = 0x7e,
> >      },
> >      {
> >          /* Page 1 */
> >          .range_min    = 0x080,
> >          .range_max    = 0x0fe,
> >          .selector_reg    = ZL3073x_PAGE_SEL,
> >          .selector_mask    = GENMASK(3, 0),
> >          .selector_shift    = 0,
> >          .window_start    = 0,
> >          .window_len    = 0x7e,
> >      },

...

> Sorry,
> .window_len = 0x7f /* Exclude selector reg */

It actually will make things worse. If selector register is accessible
to all of the pages, it's better to include it in all pages.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ