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>] [day] [month] [year] [list]
Date:   Fri, 3 Apr 2020 07:46:13 +0000
From:   Jean-Baptiste Maneyrol <JManeyrol@...ensense.com>
To:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: regmap issue with ranges and noinc read

Hello,

I have an issue using regmap noinc read when using ranges.

My device is 8-bits registers and 8-bits values and uses several register banks that you can switch using a bank register available on all banks.
I am configuring regmap with 1 range with window len of 0x100 and using virtual register addresses like 0x0aRR, where a is the bank number and RR register address (0x0032 for register 0x32 in bank 0, and 0x0123 for register 0x23 in bank 1). This is working pretty well so far.

The device has in bank 0 a virtual register for reading a data FIFO, which is larger than a bank (0x800, 2048). When using the regmap_noinc_read API for reading my FIFO, I am limited in size to not overflow the range window len. regmap is checking that and returns EINVAL in this case (check is done inside _regmap_select_page called in _regmap_raw_read). It certainly makes sense when using the standard remap_bulk_read API, but for the noinc_read where we are not reading continuous register this doesn't seem to be relevant. And this prevent the read of the entire FIFO data in this case.

Is there any reason to check the range window len bounds for the noinc_read API or is this a bug?

Thanks for your help.

Best regards,
JB

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ