Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC

Bug 447826

Summary: sys-kernel/hardened-sources-2.6.32-r143 fails to compile for ia64: include/linux/random.h:91:19: error: redefinition of ‘arch_get_random_long’
Product: Gentoo Linux Reporter: Dennis Schridde <devurandom>
Component: [OLD] Core systemAssignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE) <hardened-kernel+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: hardened, kernel, pageexec, spender
Priority: Normal    
Version: unspecified   
Hardware: IA64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dennis Schridde 2012-12-19 14:24:01 UTC
In file included from /usr/src/linux-2.6.32-hardened-r143/include/linux/net.h:57:0,
                 from /usr/src/linux-2.6.32-hardened-r143/include/linux/skbuff.h:27,
                 from /usr/src/linux-2.6.32-hardened-r143/include/linux/netfilter.h:6,
                 from /usr/src/linux-2.6.32-hardened-r143/include/net/netns/x_tables.h:5,
                 from /usr/src/linux-2.6.32-hardened-r143/include/net/net_namespace.h:18,
                 from /usr/src/linux-2.6.32-hardened-r143/include/linux/init_task.h:13,
                 from /usr/src/linux-2.6.32-hardened-r143/arch/ia64/kernel/init_task.c:14:
/usr/src/linux-2.6.32-hardened-r143/include/linux/random.h:91:19: error: redefinition of ‘arch_get_random_long’
/usr/src/linux-2.6.32-hardened-r143/include/linux/random.h:73:19: note: previous definition of ‘arch_get_random_long’ was here
/usr/src/linux-2.6.32-hardened-r143/include/linux/random.h:95:19: error: redefinition of ‘arch_get_random_int’
/usr/src/linux-2.6.32-hardened-r143/include/linux/random.h:77:19: note: previous definition of ‘arch_get_random_int’ was here
 
Appears several times.

The code makes it look like a faulty patch:
#ifdef CONFIG_ARCH_RANDOM
# include <asm/archrandom.h>
#else
static inline int arch_get_random_long(unsigned long *v)
...
#endif
...
#ifdef CONFIG_ARCH_RANDOM
# include <asm/archrandom.h>
#else
static inline int arch_get_random_long(unsigned long *v)
...
#endif

Reproducible: Always
Comment 1 Dennis Schridde 2012-12-20 09:42:31 UTC
Deleting the second instance of the #ifdef makes the build pass.
Comment 2 Anthony Basile gentoo-dev 2012-12-23 13:25:10 UTC
hardened-sources-2.6.32-r143 = latest upstream patchset so I'll send it their way.
Comment 3 PaX Team 2012-12-23 14:21:18 UTC
it's duplicated only in grsec, so spender will have to fix it ;).
Comment 4 PaX Team 2013-01-18 21:03:02 UTC
this should be fixed already, can you confirm it?
Comment 5 Dennis Schridde 2013-01-18 23:15:20 UTC
(In reply to comment #4)
> this should be fixed already, can you confirm it?
I switched to 3.2 a while ago, so I will currently not reproduce this.

It should be pretty easy to tell whether the bug is still there or not, by just having a look a random.h.
Comment 6 Anthony Basile gentoo-dev 2013-06-24 21:26:34 UTC
(In reply to PaX Team from comment #4)
> this should be fixed already, can you confirm it?

I just marked 2.6.32-r170, 3.2.46-r1, 3.9.5 stable..  Please test and if this is still an issue reopen.