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] [day] [month] [year] [list]
Message-ID: <20060820013109.GF27115@1wt.eu>
Date:	Sun, 20 Aug 2006 03:31:09 +0200
From:	Willy Tarreau <w@....eu>
To:	Mikael Pettersson <mikpe@...uu.se>
Cc:	ak@...e.de, linux-kernel@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH 2.4.34-pre1] fix x86_64 etc build failure due to memchr change

On Sun, Aug 20, 2006 at 12:19:06AM +0200, Mikael Pettersson wrote:
> 2.4.34-pre1 doesn't build on x86_64:
> 
> kernel/kernel.o(__ksymtab+0x1c10): multiple definition of `__ksymtab_memchr'
> arch/x86_64/kernel/kernel.o(__ksymtab+0x3f0): first defined here
> kernel/kernel.o(.kstrtab+0x3960): multiple definition of `__kstrtab_memchr'
> arch/x86_64/kernel/kernel.o(.kstrtab+0x5fd): first defined here
> ld: Warning: size of symbol `__kstrtab_memchr' changed from 7 in arch/x86_64/kernel/kernel.o to 17 in kernel/kernel.o
> make: *** [vmlinux] Error 1
> 
> This is because the 'export memchr() which is used by smbfs and lp driver'
> change in 2.4.34-pre1 added an EXPORT_SYMBOL of memchr to kernel/ksyms.c
> without also removing the existing one in arch/x86_64/kernel/x8664_ksyms.c.
> Alpha, ARM, ppc32, and SH also have EXPORTs of memchr so they probably
> also broke.
> 
> This patch removes the EXPORTs of memchr under arch/, which fixes x86_64
> and should fix the other architectures as well.

OK Mikael,

I have fixed sparc and sparc64 instead, and it's OK now without having to
export memchr() in kernel/ksyms.c. So the fix is shorter and more logical.
It brings non-sparc architectures to their state before my wrong fix. However,
sparc needs to export memchr() for smbfs and lp.


diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index 1c08204..f5058fe 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -297,6 +297,7 @@ EXPORT_SYMBOL_NOVERS(memcmp);
 EXPORT_SYMBOL_NOVERS(memcpy);
 EXPORT_SYMBOL_NOVERS(memset);
 EXPORT_SYMBOL_NOVERS(memmove);
+EXPORT_SYMBOL_NOVERS(memchr);
 EXPORT_SYMBOL_NOVERS(__ashrdi3);
 EXPORT_SYMBOL_NOVERS(__ashldi3);
 EXPORT_SYMBOL_NOVERS(__lshrdi3);
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 0f1f31f..40accab 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -359,6 +359,7 @@ EXPORT_SYMBOL_NOVERS(__ret_efault);
 /* No version information on these, as gcc produces such symbols. */
 EXPORT_SYMBOL_NOVERS(memcmp);
 EXPORT_SYMBOL_NOVERS(memcpy);
+EXPORT_SYMBOL_NOVERS(memchr);
 EXPORT_SYMBOL_NOVERS(memset);
 EXPORT_SYMBOL_NOVERS(memmove);
 
diff --git a/kernel/ksyms.c b/kernel/ksyms.c
index 73ad3e9..d1e66c7 100644
--- a/kernel/ksyms.c
+++ b/kernel/ksyms.c
@@ -579,7 +579,6 @@ EXPORT_SYMBOL(get_write_access);
 EXPORT_SYMBOL(strnicmp);
 EXPORT_SYMBOL(strspn);
 EXPORT_SYMBOL(strsep);
-EXPORT_SYMBOL(memchr);
 
 #ifdef CONFIG_CRC32
 EXPORT_SYMBOL(crc32_le);

Cheers,
Willy

-
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