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]
Message-ID: <20101208191736.GA6694@core2.telecom.by>
Date:	Wed, 8 Dec 2010 21:17:36 +0200
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Hanno Böck <hanno@...eck.de>
Cc:	lenb@...nel.org, linux-kernel@...r.kernel.org,
	linux-acpi@...r.kernel.org
Subject: Re: [PATCH] acpi: const-ify functions

On Wed, Dec 08, 2010 at 07:25:10PM +0100, Hanno Böck wrote:
> Will const a couple of functions and variables. This is extracted
> from grsecurity (with only a slight modification to limit a line
> to 80 chars).

Why don't they do it themselves? :^)

> Patch is against linux-acpi-2.6 git.
> 
> Similar patches have been sent in the past but not applied,
> supposedly because they weren't sent to subsystem maintainers.
> (I may continue to send similar extracts to other subsystems)
> 
> ---
> Signed-off-by: Hanno Boeck <hanno@...eck.de>

Signed-off-by should be before --- -- it must make into changelog.

> diff -Naurp linux-acpi-1//drivers/acpi/battery.c linux-acpi-2/drivers/acpi/battery.c
> --- linux-acpi-1//drivers/acpi/battery.c	2010-12-08 18:42:26.187000005 +0100
> +++ linux-acpi-2/drivers/acpi/battery.c	2010-12-08 18:42:53.595000204 +0100
> @@ -851,7 +851,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
>  	}
>  
>  static struct battery_file {
> -	struct file_operations ops;
> +	const struct file_operations ops;

Whoa, does this work?

>  	mode_t mode;
>  	const char *name;
>  } acpi_battery_file[] = {

It maybe better to call proc_create_date() by hand (and even handle
errors gracefully?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ