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: <b4eddc66-9fe7-4f52-936a-7cfd8c2b424c@moroto.mountain>
Date: Fri, 7 Jun 2024 19:47:06 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Joy Chakraborty <joychakr@...gle.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Rob Herring <robh@...nel.org>,
	Nicolas Saenz Julienne <nsaenz@...nel.org>,
	linux-kernel@...r.kernel.org, manugautam@...gle.com,
	stable@...r.kernel.org
Subject: Re: [PATCH v3] nvmem: rmem: Fix return value of rmem_read()

On Fri, Jun 07, 2024 at 04:05:10PM +0000, Joy Chakraborty wrote:
> reg_read() callback registered with nvmem core expects 0 on success and
> a negative value on error but rmem_read() returns the number of bytes
> read which is treated as an error at the nvmem core.
> 
> This does not break when rmem is accessed using sysfs via
> bin_attr_nvmem_read()/write() but causes an error when accessed from
> places like nvmem_access_with_keepouts(), etc.
> 
> Change to return 0 on success and error in case
> memory_read_from_buffer() returns an error or -EIO if bytes read do not
> match what was requested.
> 
> Fixes: 5a3fa75a4d9c ("nvmem: Add driver to expose reserved memory as nvmem")
> Cc: stable@...r.kernel.org
> Signed-off-by: Joy Chakraborty <joychakr@...gle.com>
> ---

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@...aro.org>

You mentioned some other functions that had similar bugs.  Could you
fix those as well.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ