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, 7 Jan 2014 16:03:46 +0100
From:	Jean Delvare <khali@...ux-fr.org>
To:	Guenter Roeck <linux@...ck-us.net>
Cc:	Eduardo Valentin <eduardo.valentin@...com>, rui.zhang@...el.com,
	rdunlap@...radead.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] thermal: fix compilation issue on CONFIG_THERMAL_OF
  dependencies

On Tue, 07 Jan 2014 06:33:46 -0800, Guenter Roeck wrote:
> Alternative would be something like
> 
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index f7e11c7..156bb4d 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -244,7 +244,7 @@ struct thermal_genl_event {
>   };
> 
>   /* Function declarations */
> -#ifdef CONFIG_THERMAL_OF
> +#if defined(CONFIG_THERMAL_OF) && (defined(CONFIG_THERMAL) || (defined(MODULE) && defined(CONFIG_THERMAL_MODULE)))
>   struct thermal_zone_device *
>   thermal_zone_of_sensor_register(struct device *dev, int id,
>                                  void *data, int (*get_temp)(void *, long *),

I don't like it. Using defined(MODULE) in a header file seems quite
risky (although I see there are occurrences of this already.) But more
importantly, this means that you can have all pieces enabled in your
kernel but the code will be silently stubbed out because the
combinations of Y and M happens to be unsupported but this is nowhere
documented. This is wrong.

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