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]
Message-Id: <20110520151113.645dbbe7.akpm@linux-foundation.org>
Date:	Fri, 20 May 2011 15:11:13 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jean Delvare <khali@...ux-fr.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] check_signature depends on CONFIG_CHECK_SIGNATURE

On Fri, 20 May 2011 16:14:48 +0200
Jean Delvare <khali@...ux-fr.org> wrote:

> check_signature() is only available if CONFIG_CHECK_SIGNATURE has been
> selected. Don't declare the function if it won't be available at link
> time. That way, any failure to select CONFIG_CHECK_SIGNATURE as needed
> will show up immediately at build time.
> 
> Signed-off-by: Jean Delvare <khali@...ux-fr.org>
> ---
>  include/linux/io.h |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> --- linux-2.6.40-rc0.orig/include/linux/io.h	2011-05-20 10:41:02.000000000 +0200
> +++ linux-2.6.40-rc0/include/linux/io.h	2011-05-20 16:00:31.000000000 +0200
> @@ -63,8 +63,11 @@ void __iomem *devm_ioremap(struct device
>  void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
>  				    unsigned long size);
>  void devm_iounmap(struct device *dev, void __iomem *addr);
> +void devm_ioremap_release(struct device *dev, void *res);
> +
> +#ifdef CONFIG_CHECK_SIGNATURE
>  int check_signature(const volatile void __iomem *io_addr,
>  			const unsigned char *signature, int length);
> -void devm_ioremap_release(struct device *dev, void *res);
> +#endif

We usually avoid doing this.  Detecting the error at link time is
sufficient.

Yes, that will very occasionally cost a small number of people a little
additional time.  But we must balance that against permanently messing
up the header files.

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