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, 17 Jun 2024 16:08:08 +0100
From: Mark Brown <broonie@...nel.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, Armin Wolf <W_Armin@....de>
Subject: Re: Page select register restrictions in regmap core

On Mon, Jun 17, 2024 at 07:20:28AM -0700, Guenter Roeck wrote:

>         .window_start     = 0,
>         .window_len       = SPD5118_PAGE_SIZE,			// 128
>         .range_min        = 0,
>         .range_max        = SPD5118_PAGE_SIZE - 1,		// 127


>         .window_start     = SPD5118_PAGE_SIZE,			// 128
>         .window_len       = SPD5118_PAGE_SIZE,			// 128
>         .range_min        = SPD5118_PAGE_SIZE,			// 128
>         .range_max        = 9 * SPD5118_PAGE_SIZE - 1,		// 0x47f

You appear to be trying to define ranges that overlap with the windows
that you're trying to expose.  I can't understand what that's trying to
represent or how that would work.  The window is the physical registers
that the host can actually see, the range is the virtual addresses which
users of the region should use to access registers behind the window.
This should be a range of register values which don't physically exist
on the device.  I really can't understand what a sensible handling of an
overlap would be, any attempt to access the window should recursively
trigger selection of the range so no actual register should work.  I
can't tell what it's trying to model.

This configuration would also be rejected by the next test which
verifies that the window does not overlap with the range.

> This works just fine if I comment out the select register validation in
> the regmap core (the one which generates the error). Is there a reason
> for having this restriction, or would it be possible to drop it ?

I'm very surprised this does anything useful TBH, possibly that's a bug
of some kind.  A configuration with the selector within the range is
nonsensical as far as I can see since the range can't be accessed
without programming the selector, the range should be purely virtual
registers and the selector must be a physical register.

> If dropping it is not possible, could we possibly add some flag to the
> configuration data, indicating that this "violation" is on purpose ?
> Alternatively, do you see some other means to describe the ranges which
> would not violate the restrictions ?

Like I say I can't tell what this is trying to describe or how it could
possibly work.  The range should be completely distinct from the window.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ