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:	Thu, 4 Jul 2013 11:25:14 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Chen Gang <gang.chen@...anux.com>
Cc:	Greg KH <gregkh@...uxfoundation.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Richard Weinberger <richard@....at>,
	Jeff Dike <jdike@...toit.com>,
	David Sharp <dhsharp@...gle.com>,
	"sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
	Ingo Molnar <mingo@...nel.org>,
	"uml-devel" <user-mode-linux-devel@...ts.sourceforge.net>,
	"uml-user" <user-mode-linux-user@...ts.sourceforge.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Linux-Arch" <linux-arch@...r.kernel.org>,
	Mark Brown <broonie@...nel.org>,
	David Miller <davem@...emloft.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jiri Kosina <trivial@...nel.org>, Jiri Slaby <jslaby@...e.cz>
Subject: Re: [PATCH] include/asm-generic/io.h: add dummy fuctions to support 'COMPILE_TEST' in 'asm-generic'.

On Thursday 04 July 2013, Chen Gang wrote:

> --------------------------patch begin----------------------------------
> 
> 'asm-generic' need provide necessary configuration checking, if can't
> pass checking, 'asm-generic' shouldn't implement it.
> 
> For 'COMPILE_TEST', according to its help contents, 'asm-generic' need
> let it pass configuration checking, and provide related dummy contents
> for it.
> 
> Part of 'COMPLE_TEST' help contents in "init/Kconfig":
> 
>   "...Despite they cannot be loaded there (or even when they load they cannot be used due to missing HW support)..."
> 
> One sample for using 'COMPILE_TEST':
> 
>   'PTP_1588_CLOCK_PCH' in drivers/ptp/Kconfig, which need depend on 'HAS_IOMEM'.

Then please submit a patch that adds the 'depends on HAS_IOMEM' line there.
That line was clearly left out by accident.

> Signed-off-by: Chen Gang <gang.chen@...anux.com>
> ---
>  include/asm-generic/io.h |   22 ++++++++++++++++++----
>  1 files changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
> index d5afe96..301ce80 100644
> --- a/include/asm-generic/io.h
> +++ b/include/asm-generic/io.h
> @@ -303,13 +303,18 @@ static inline void *phys_to_virt(unsigned long address)
>  /*
>   * Change "struct page" to physical address.
>   *
> - * This implementation is for the no-MMU case only... if you have an MMU
> - * you'll need to provide your own definitions.
> + * This for the no-MMU, or no-IOMEM but still try to COMPILE_TEST cases.
> + * if you have an MMU and IOMEM, you'll need to provide your own definitions.
>   */
> -#ifndef CONFIG_MMU
> +#if !defined(CONFIG_MMU) || \
> +	(!defined(CONFIG_HAS_IOMEM) && defined(CONFIG_COMPILE_TEST))
>  static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
>  {
> +#if !defined(CONFIG_MMU)
>  	return (void __iomem*) (unsigned long)offset;
> +#else
> +	return NULL;
> +#endif
>  }
>  
>  #define __ioremap(offset, size, flags)	ioremap(offset, size)

This is wrong for multiple reasons, all of which have been discussed in
this thread before.

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