* [Buildroot] [PATCH] cifs-utils: unconditionally disable PIE
@ 2018-05-07 20:20 Thomas Petazzoni
2018-05-13 20:28 ` Thomas Petazzoni
2018-05-28 14:29 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-05-07 20:20 UTC (permalink / raw)
To: buildroot
PIE support in Buildroot should be enabled via the global option
BR2_RELRO_FULL option, and not done on a per-package basis, therefore
PIE should unconditionally be disabled in the cifs-utils package.
This has the added side-effect that it works around a binutils bug on
SPARC causing the linker to segfault when PIE is enabled:
sparc-linux-gcc -Wall -Wextra -D_FORTIFY_SOURCE=2 -fpie -pie -Wl,-z,relro,-z,now -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o mount.cifs mount.cifs.o mtab.o resolve_host.o util.o -lcap-ng
collect2: fatal error: ld terminated with signal 6 [Aborted], core dumped
This issue will reappear when we start testing BR2_RELRO_FULL in the
autobuilders, but in the mean time it avoids the problem.
Fixes:
http://autobuild.buildroot.net/results/a5342890f39bdccae1324e7d3dbe0eab1aad28e5/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/cifs-utils/cifs-utils.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/cifs-utils/cifs-utils.mk b/package/cifs-utils/cifs-utils.mk
index 9044fdf83c..9343e3ea89 100644
--- a/package/cifs-utils/cifs-utils.mk
+++ b/package/cifs-utils/cifs-utils.mk
@@ -13,9 +13,9 @@ CIFS_UTILS_LICENSE_FILES = COPYING
CIFS_UTILS_AUTORECONF = YES
CIFS_UTILS_DEPENDENCIES = host-pkgconf
-ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
-CIFS_UTILS_CONF_OPTS += --disable-pie
-endif
+# Let's disable PIE unconditionally. We want PIE to be enabled only by
+# the global BR2_RELRO_FULL option.
+CIFS_UTILS_CONF_OPTS = --disable-pie
ifeq ($(BR2_PACKAGE_KEYUTILS),y)
CIFS_UTILS_DEPENDENCIES += keyutils
--
2.14.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] cifs-utils: unconditionally disable PIE
2018-05-07 20:20 [Buildroot] [PATCH] cifs-utils: unconditionally disable PIE Thomas Petazzoni
@ 2018-05-13 20:28 ` Thomas Petazzoni
2018-05-28 14:29 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-05-13 20:28 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 7 May 2018 22:20:34 +0200, Thomas Petazzoni wrote:
> PIE support in Buildroot should be enabled via the global option
> BR2_RELRO_FULL option, and not done on a per-package basis, therefore
> PIE should unconditionally be disabled in the cifs-utils package.
>
> This has the added side-effect that it works around a binutils bug on
> SPARC causing the linker to segfault when PIE is enabled:
>
> sparc-linux-gcc -Wall -Wextra -D_FORTIFY_SOURCE=2 -fpie -pie -Wl,-z,relro,-z,now -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o mount.cifs mount.cifs.o mtab.o resolve_host.o util.o -lcap-ng
> collect2: fatal error: ld terminated with signal 6 [Aborted], core dumped
>
> This issue will reappear when we start testing BR2_RELRO_FULL in the
> autobuilders, but in the mean time it avoids the problem.
>
> Fixes:
>
> http://autobuild.buildroot.net/results/a5342890f39bdccae1324e7d3dbe0eab1aad28e5/
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> package/cifs-utils/cifs-utils.mk | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] cifs-utils: unconditionally disable PIE
2018-05-07 20:20 [Buildroot] [PATCH] cifs-utils: unconditionally disable PIE Thomas Petazzoni
2018-05-13 20:28 ` Thomas Petazzoni
@ 2018-05-28 14:29 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-05-28 14:29 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> PIE support in Buildroot should be enabled via the global option
> BR2_RELRO_FULL option, and not done on a per-package basis, therefore
> PIE should unconditionally be disabled in the cifs-utils package.
> This has the added side-effect that it works around a binutils bug on
> SPARC causing the linker to segfault when PIE is enabled:
> sparc-linux-gcc -Wall -Wextra -D_FORTIFY_SOURCE=2 -fpie -pie -Wl,-z,relro,-z,now -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o mount.cifs mount.cifs.o mtab.o resolve_host.o util.o -lcap-ng
> collect2: fatal error: ld terminated with signal 6 [Aborted], core dumped
> This issue will reappear when we start testing BR2_RELRO_FULL in the
> autobuilders, but in the mean time it avoids the problem.
> Fixes:
> http://autobuild.buildroot.net/results/a5342890f39bdccae1324e7d3dbe0eab1aad28e5/
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed to 2018.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-28 14:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-07 20:20 [Buildroot] [PATCH] cifs-utils: unconditionally disable PIE Thomas Petazzoni
2018-05-13 20:28 ` Thomas Petazzoni
2018-05-28 14:29 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox