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, 9 Sep 2019 11:18:10 +0100
From:   Sebastian Reichel <sre@...nel.org>
To:     Nandor Han <nandor.han@...sala.com>
Cc:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        kbuild test robot <lkp@...el.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvmem: core: fix nvmem_cell_write inline function

Hi,

On Mon, Sep 09, 2019 at 12:26:06PM +0300, Nandor Han wrote:
> On 9/8/19 3:10 PM, Sebastian Reichel wrote:
> > From: Sebastian Reichel <sebastian.reichel@...labora.com>
> > 
> > nvmem_cell_write's buf argument uses different types based on
> > the configuration of CONFIG_NVMEM. The function prototype for
> > enabled NVMEM uses 'void *' type, but the static dummy function
> > for disabled NVMEM uses 'const char *' instead. Fix the different
> > behaviour by always expecting a 'void *' typed buf argument.
> > 
> > Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface")
> > Reported-by: kbuild test robot <lkp@...el.com>
> > Cc: Han Nandor <nandor.han@...sala.com>
> > Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> > Cc: linux-kernel@...r.kernel.org
> > Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>
> > ---
> >   include/linux/nvmem-consumer.h | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
> > index 8f8be5b00060..5c17cb733224 100644
> > --- a/include/linux/nvmem-consumer.h
> > +++ b/include/linux/nvmem-consumer.h
> > @@ -118,7 +118,7 @@ static inline void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
> >   }
> >   static inline int nvmem_cell_write(struct nvmem_cell *cell,
> > -				    const char *buf, size_t len)
> > +				   void *buf, size_t len)
> 
> nitpick: alignment issue?

This actually fixes the alignment issue as a side-effect.
I guess I should have mentioned it in the changelog.

> Review-By: Han Nandor <nandor.han@...sala.com>

I suppose you meant to write "Reviewed-by" instead of inventing your
own tag?

-- Sebastian

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ