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: <20200420164349.GD3721@ninjato>
Date:   Mon, 20 Apr 2020 18:43:49 +0200
From:   Wolfram Sang <wsa@...-dreams.de>
To:     Bjorn Ardo <bjorn.ardo@...s.com>
Cc:     Patrick Williams <alpawi@...zon.com>,
        Björn Ardö <bjornar@...s.com>,
        Patrick Williams <patrick@...cx.xyz>,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] i2c: slave-eeprom: initialize empty eeprom properly

On Wed, Oct 02, 2019 at 08:20:53AM +0200, Bjorn Ardo wrote:
> Hi,
> 
> 
> I sent in another patch earlier that added support for specifying a file in
> devicetree to initilize the eeprom from, corresponding to the case of
> pre-flashed eeprom. Maybe these two patches should be merged so this
> initialization is only done if no file is specified?

Yes, I agree.

> /BA
> 
> On 10/1/19 6:40 PM, Patrick Williams wrote:
> > The i2c-slave-eeprom driver emulates at24 class eeprom devices,
> > which come initialized with all 1s.  Do the same in the software
> > emulation.
> > 
> > Signed-off-by: Patrick Williams <alpawi@...zon.com>
> > ---
> >   drivers/i2c/i2c-slave-eeprom.c | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/i2c/i2c-slave-eeprom.c b/drivers/i2c/i2c-slave-eeprom.c
> > index db9763cb4dae..efee56106251 100644
> > --- a/drivers/i2c/i2c-slave-eeprom.c
> > +++ b/drivers/i2c/i2c-slave-eeprom.c
> > @@ -131,6 +131,8 @@ static int i2c_slave_eeprom_probe(struct i2c_client *client, const struct i2c_de
> >   	if (!eeprom)
> >   		return -ENOMEM;
> > +	memset(eeprom->buffer, 0xFF, size);
> > +
> >   	eeprom->idx_write_cnt = 0;
> >   	eeprom->num_address_bytes = flag_addr16 ? 2 : 1;
> >   	eeprom->address_mask = size - 1;

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