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: <4D1BBEB7.3010901@zytor.com>
Date:	Wed, 29 Dec 2010 15:05:27 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Yinghai Lu <yinghai@...nel.org>
CC:	Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/6] x86: Change get_max_mapped() to inline

On 12/27/2010 04:47 PM, Yinghai Lu wrote:
> 
> Move it into head file. to prepare use it in other files.
> 
> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
> 
> ---
>  arch/x86/include/asm/page_types.h |    5 +++++
>  arch/x86/kernel/setup.c           |    9 ---------
>  2 files changed, 5 insertions(+), 9 deletions(-)
> 
> Index: linux-2.6/arch/x86/include/asm/page_types.h
> ===================================================================
> --- linux-2.6.orig/arch/x86/include/asm/page_types.h
> +++ linux-2.6/arch/x86/include/asm/page_types.h
> @@ -45,6 +45,11 @@ extern int devmem_is_allowed(unsigned lo
>  extern unsigned long max_low_pfn_mapped;
>  extern unsigned long max_pfn_mapped;
>  
> +static inline u64 get_max_mapped(void)
> +{
> +	return (u64)max_pfn_mapped<<PAGE_SHIFT;
> +}
> +
>  extern unsigned long init_memory_mapping(unsigned long start,
>  					 unsigned long end);
>  

This is broken.  <asm/page_types.h> doesn't include <linux/types.h>
which is required for the u64 type -- a simple compile test would have
told you this.  Furthermore, it seems to me that it would make more
sense for this to be phys_addr_t instead of u64; would you agree?

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