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:	Thu, 19 Jan 2012 20:45:41 +0100
From:	Wolfram Sang <w.sang@...gutronix.de>
To:	Austin Boyle <Austin.Boyle@...atnet.com>
Cc:	rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] rtc: ds1307: generalise ram size and offset


Sorry, found another thing.

> +	if (chip) {
> +		if (chip->nvram_size)
> +			ds1307->nvram_size = chip->nvram_size;
> +		if (chip->nvram_offset)
> +			ds1307->nvram_offset = chip->nvram_offset;
> +	}

I moved only the assignments...

>  
>  	buf = ds1307->regs;
>  	if (i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) {
> @@ -893,11 +907,12 @@ read_rtc:
>  		dev_dbg(&client->dev, "got IRQ %d\n", client->irq);
>  	}
>  
> -	if (chip && chip->nvram56) {
> +	if (chip && chip->nvram_size) {

.. to here when I saw...

> +		nvram.size = ds1307->nvram_size;

... that nvram is static and we are changing it. Yeah, it is very unlikely but
if we have two RTC with different nvram sizes, one of them will not work correctly.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ