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] [day] [month] [year] [list]
Message-ID: <55FBE029.1000507@linaro.org>
Date:	Fri, 18 Sep 2015 10:58:01 +0100
From:	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:	Axel Lin <axel.lin@...ics.com>,
	Maxime Ripard <maxime.ripard@...e-electrons.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvmem: core: Handle shift bits in-place if cell->nbits
 is non-zero

Hi Axel,
Thanks for the patch

Acked-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>


I remember fixing this sometime back which was reported by static 
checker reported by Dan Carpenter, I forgot to send it over to wider 
audience. Thanks for reminding.


--srini
On 18/09/15 10:50, Axel Lin wrote:
> It's pointless to test (cell->bit_offset || cell->bit_offset).
> nvmem_shift_read_buffer_in_place() should be called when
> (cell->bit_offset || cell->nbits).
>
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
>   drivers/nvmem/core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
> index d3c6676..c39723a 100644
> --- a/drivers/nvmem/core.c
> +++ b/drivers/nvmem/core.c
> @@ -825,7 +825,7 @@ static int __nvmem_cell_read(struct nvmem_device *nvmem,
>   		return rc;
>
>   	/* shift bits in-place */
> -	if (cell->bit_offset || cell->bit_offset)
> +	if (cell->bit_offset || cell->nbits)
>   		nvmem_shift_read_buffer_in_place(cell, buf);
>
>   	*len = cell->bytes;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ