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:	Tue, 26 Nov 2013 01:09:45 +0100
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Lv Zheng <zetalog@...il.com>
Cc:	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Len Brown <len.brown@...el.com>, Lv Zheng <lv.zheng@...el.com>,
	linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [UPDATE PATCH 4/4] ACPI: Add support to force header inclusion rules for <linux/acpi.h>.

On Saturday, November 23, 2013 07:54:18 AM Lv Zheng wrote:
> From: Lv Zheng <lv.zheng@...el.com>
> 
> (Update due to some typo fixes.)
> 
> As there is only CONFIG_ACPI=n processing in the <linux/acpi.h>, it is not
> safe to include <acpi/acpi.h>, <acpi/acpi_drivers.h> and <acpi/acpi_bus.h>
> directly for source out of Linux ACPI subsystems.
> 
> This patch adds error messaging to warn developers of such wrong
> inclusions.
> 
> In order not to be bisected and reverted as a wrong commit, warning
> messages are carefully split into a seperate patch other than the wrong
> inclusion cleanups.
> 
> Signed-off-by: Lv Zheng <lv.zheng@...el.com>

I don't like this one to be honest.

> ---
>  drivers/acpi/acpica/Makefile    |    2 +-
>  include/acpi/acpi_bus.h         |    5 +++++
>  include/acpi/acpi_drivers.h     |    5 +++++
>  include/acpi/platform/aclinux.h |   10 ++++++++++
>  4 files changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
> index 4383040..7738677 100644
> --- a/drivers/acpi/acpica/Makefile
> +++ b/drivers/acpi/acpica/Makefile
> @@ -2,7 +2,7 @@
>  # Makefile for ACPICA Core interpreter
>  #
>  
> -ccflags-y			:= -Os
> +ccflags-y			:= -Os -DLINUXIZED_ACPICA

I don't like this (the naming and the way it is done).

>  ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
>  
>  # use acpi.o to put all files here into acpi.o modparam namespace
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> index 0af9667..0b1ea80 100644
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -26,6 +26,11 @@
>  #ifndef __ACPI_BUS_H__
>  #define __ACPI_BUS_H__
>  
> +/* <acpi/acpi_bus.h> is not safe for CONFIG_ACPI=n environment */
> +#ifndef _LINUX_ACPI_H
> +#error "Please don't include <acpi/acpi_bus.h> directly, include <linux/acpi.h> instead."
> +#endif

And this should either go into all of the <acpi/*.h> files, not only to the two
of them you chose, or to none of them.  I prefer none.

Thanks,
Rafael

--
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