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: <20090402094522.b29004c8.akpm@linux-foundation.org>
Date:	Thu, 2 Apr 2009 09:45:22 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Akinobu Mita <akinobu.mita@...il.com>
Cc:	Alexander Beregalov <a.beregalov@...il.com>,
	"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, linux-arch@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] build fix for generic debug pagealloc

On Fri, 3 Apr 2009 01:31:52 +0900 Akinobu Mita <akinobu.mita@...il.com> wrote:

> > mm/debug-pagealloc.c: In function 'set_page_poison':
> > mm/debug-pagealloc.c:8: error: 'struct page' has no member named 'debug_flags'
> > mm/debug-pagealloc.c: In function 'clear_page_poison':
> > mm/debug-pagealloc.c:13: error: 'struct page' has no member named 'debug_flags'
> > mm/debug-pagealloc.c: In function 'page_poison':
> > mm/debug-pagealloc.c:18: error: 'struct page' has no member named 'debug_flags'
> > mm/debug-pagealloc.c: At top level:
> > mm/debug-pagealloc.c:120: error: redefinition of 'kernel_map_pages'
> > include/linux/mm.h:1278: error: previous definition of
> > 'kernel_map_pages' was here
> > mm/debug-pagealloc.c: In function 'kernel_map_pages':
> > mm/debug-pagealloc.c:122: error: 'debug_pagealloc_enabled' undeclared
> > (first use in this function)
> 
> This patch fixes build failure with generic debug pagealloc:
> 
>  - debug_flags should be in struct page
>  - define DEBUG_PAGEALLOC config option for all architectures
>
> ...
>
>  	bool "Debug access to per_cpu maps"
>  	depends on DEBUG_KERNEL
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index ddadb4d..0e80e26 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -95,6 +95,9 @@ struct page {
>  	void *virtual;			/* Kernel virtual address (NULL if
>  					   not kmapped, ie. highmem) */
>  #endif /* WANT_PAGE_VIRTUAL */
> +#ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS
> +	unsigned long debug_flags;	/* Use atomic bitops on this */
> +#endif
>  };
>  
>  /*
> @@ -175,9 +178,6 @@ struct vm_area_struct {
>  #ifdef CONFIG_NUMA
>  	struct mempolicy *vm_policy;	/* NUMA policy for the VMA */
>  #endif
> -#ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS
> -	unsigned long debug_flags;	/* Use atomic bitops on this */
> -#endif
>  };

dammit.

>  struct core_thread {
> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
> index c8d62d4..bb01e29 100644
> --- a/mm/Kconfig.debug
> +++ b/mm/Kconfig.debug
> @@ -1,3 +1,12 @@
> +config DEBUG_PAGEALLOC
> +	bool "Debug page memory allocations"
> +	depends on DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC
> +	depends on !HIBERNATION || !PPC && !SPARC
> +	---help---
> +	  Unmap pages from the kernel linear mapping after free_pages().
> +	  This results in a large slowdown, but helps to find certain types
> +	  of memory corruptions.
> +

I guess this is why it wasn't discovered in my compile testing.  It's
quite regrettable that `make allmodconfig' didn't enable the feature. 
That's what allmodconfig is for.
--
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