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]
Date:	Thu, 3 Nov 2011 00:06:52 +0100
From:	Wolfram Sang <w.sang@...gutronix.de>
To:	Austin Boyle <Austin.Boyle@...atnet.com>
Cc:	rtc-linux@...glegroups.com, David Anderson <danders.dev@...il.com>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtc: ds1307: generalise ram size and offset

On Thu, Nov 03, 2011 at 09:59:15AM +1300, Austin Boyle wrote:
> From: Austin Boyle <Austin.Boyle@...atnet.com>
> 
> This patch generalises NVRAM to support RAM with other size and offset, such
> as the 64 bytes of SRAM on the MCP7941x.
> 
> Cc: Wolfram Sang <w.sang@...gutronix.de>
> Cc: David Anderson <danders.dev@...il.com>
> Cc: Alessandro Zummo <a.zummo@...ertech.it>
> Cc: Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>
> Signed-off-by: Austin Boyle <Austin.Boyle@...atnet.com>

Looks good to me in general, with one exception.

> ---
> this patch is based on Wolfram Sang's tree:
> git://git.pengutronix.de/git/wsa/linux-2.6.git ds1307
> 
> patch depends on:
> rtc: ds1307: comment and format cleanup 21af5f7bd6
> rtc: ds1307: simplify irq setup code  8c63e03627
> rtc: ds1307: refactor chip_desc table e246db081d
> rtc: add initial support for mcp7941x parts e69bba2d3a
> 
> --- a/drivers/rtc/rtc-ds1307.c	2011-10-10 11:22:22.674690998 +1300
> +++ b/drivers/rtc/rtc-ds1307.c	2011-11-03 09:13:06.662159569 +1300
> @@ -104,10 +104,12 @@ enum ds_type {
>  
>  struct ds1307 {
>  	u8			offset; /* register's offset */
> +	u16			ram_offset;
> +	u16			ram_size;
>  	u8			regs[11];
>  	enum ds_type		type;
>  	unsigned long		flags;
> -#define HAS_NVRAM	0		/* bit 0 == sysfs file active */
> +#define HAS_RAM	0			/* bit 0 == sysfs file active */

Why the rename from NVRAM to RAM everywhere? While it doesn't matter much for
most occurences...

> -static struct bin_attribute nvram = {
> +static struct bin_attribute ram = {
>  	.attr = {
> -		.name	= "nvram",
> +		.name	= "ram",
>  		.mode	= S_IRUGO | S_IWUSR,
>  	},

... here it will break userspace.

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