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: <20110629130711.GA15649@linux-mips.org>
Date:	Wed, 29 Jun 2011 14:07:11 +0100
From:	Ralf Baechle <ralf@...ux-mips.org>
To:	David Miller <davem@...emloft.net>
Cc:	akpm@...ux-foundation.org, alan@...ux.intel.com, bcasavan@....com,
	airlied@...ux.ie, grundler@...isc-linux.org,
	JBottomley@...allels.com, perex@...ex.cz, rpurdie@...ys.net,
	klassert@...hematik.tu-chemnitz.de, tj@...nel.org,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	linux-mips@...ux-mips.org, linux-scsi@...r.kernel.org,
	linux-serial@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 00/12] Fix various section mismatches and build errors.

On Mon, Jun 27, 2011 at 10:12:57PM -0700, David Miller wrote:

> commit 948252cb9e01d65a89ecadf67be5018351eee15e
> Author: David S. Miller <davem@...emloft.net>
> Date:   Tue May 31 19:27:48 2011 -0700
> 
>     Revert "net: fix section mismatches"
>     
>     This reverts commit e5cb966c0838e4da43a3b0751bdcac7fe719f7b4.
>     
>     It causes new build regressions with gcc-4.2 which is
>     pretty common on non-x86 platforms.
>     
>     Reported-by: James Bottomley <James.Bottomley@...senPartnership.com>
>     Signed-off-by: David S. Miller <davem@...emloft.net>
> 
> and postings that led to this revert including:
> 
> http://marc.info/?l=linux-netdev&m=130653748205263&w=2

Thanks for the pointers; I looked into it a bit deeper and found that the
construct which hppa64-linux-gcc 4.2.4 doesn't like is the combination of
const and __devinitconst __devinitdata.

My patches are minimalistic and don't do any constification and seem to
work fine for PA-RISC.

A possible alternative to allow the use of MichaƂ's reverted patch would
be to conditionalize the definition of __devinitconst.  There is no
user of __devexitconst so I left that unchanged.

  Ralf

Signed-off-by: Ralf Baechle <ralf@...ux-mips.org>

 include/linux/init.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/linux/init.h b/include/linux/init.h
index 577671c..e12fd85 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -84,7 +84,15 @@
 /* Used for HOTPLUG */
 #define __devinit        __section(.devinit.text) __cold
 #define __devinitdata    __section(.devinit.data)
+#if defined __GNUC__ && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
+/*
+ * GCC 4.2 will sometimes throw an error if the combination of const and
+ * __devinitconst is being used.  As a workaround make __devinitconst a noop
+ */
+#define __devinitconst
+#else
 #define __devinitconst   __section(.devinit.rodata)
+#endif
 #define __devexit        __section(.devexit.text) __exitused __cold
 #define __devexitdata    __section(.devexit.data)
 #define __devexitconst   __section(.devexit.rodata)
--
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