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: <20110711134121.54557e28.akpm@linux-foundation.org>
Date:	Mon, 11 Jul 2011 13:41:21 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	linux-kernel@...r.kernel.org, cl@...ux.com,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: page->_count build failure [was: mmotm 2011-07-08-12-50
 uploaded]

On Mon, 11 Jul 2011 22:27:22 +0200
Jiri Slaby <jirislaby@...il.com> wrote:

> On 07/08/2011 09:50 PM, akpm@...ux-foundation.org wrote:
> > The mm-of-the-moment snapshot 2011-07-08-12-50 has been uploaded to
> 
> Hi, am I the only one encountering a build failure due to double
> definition of _count in page struct introduced by:
> commit fc9bb8c768abe7ae10861c3510e01a95f98d5933
> Author: Christoph Lameter <cl@...ux.com>
> Date:   Wed Jun 1 12:25:48 2011 -0500
> 
>     mm: Rearrange struct page
> 
> in the -next tree?
> 
> $ make
> ...
>   CC      arch/x86/kernel/asm-offsets.s
> In file included from include/linux/sched.h:64:0,
>                  from arch/x86/kernel/asm-offsets.c:9:
> include/linux/mm_types.h:74:15: error: duplicate member ____count___
> make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
> make: *** [prepare0] Error 2
> $ gcc --version
> gcc (SUSE Linux) 4.6.0 20110607 [gcc-4_6-branch revision 174741]
> 

Oh dear.  Yes, I would call that an error.  Afacit the two `_count's
end up at the same offset in the page struct.  Perhaps that makes it
legal and your compiler got it wrong.  Or perhaps it is illegal and all
other compilers got it wrong.

Still, we should fix it.  It's daft to have two distinct page->_count's.

To fix it, we could rename one of them.  Which means that we're going
to need to work out which references to page->_count are referring to
which field.  Which demonstrates the problem!


hmm, let's jiggle the offset:

--- a/include/linux/mm_types.h~a
+++ a/include/linux/mm_types.h
@@ -71,6 +71,7 @@ struct page {
 					 * Kernel may make use of this field even when slub
 					 * uses the rest of the double word!
 					 */
+					int foo;
 					atomic_t _count;
 				};
 			};
_

nope, it still compiles OK.  It has to be gcc bustification I think. 
Fixed in gcc-4.6.0.

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