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:	Wed, 22 Feb 2012 12:55:52 +0000
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>
Cc:	Liam Girdwood <lrg@...com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] regmap: Add support for writing to regmap `registers'

On Wed, Feb 22, 2012 at 12:43:50PM +0000, Dimitris Papastamos wrote:
> To enable writing to the regmap `registers' file, users will
> need to modify the source directly and #define REGMAP_ALLOW_WRITE_DEBUGFS.
> The reason for this is that it is dangerous to expose this
> functionality in general where clients could potentially be PMICs.

Applied but...

> +static ssize_t regmap_map_write_file(struct file *file, const char __user *user_buf,
> +				    size_t count, loff_t *ppos)

...with this wrapped into 80 columns.

>  static const struct file_operations regmap_map_fops = {
>  	.open = regmap_open_file,
>  	.read = regmap_map_read_file,
> +#ifdef REGMAP_ALLOW_WRITE_DEBUGFS
> +	.write = regmap_map_write_file,
> +#endif

It's also a bit more idiomatic to have an #else #define function NULL in
the main ifdef for stuff like this; I'll fix that up as well.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ