summaryrefslogtreecommitdiffstats
path: root/usr.sbin/amd
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-08-19 15:04:32 +0000
committerbdrewery <bdrewery@FreeBSD.org>2014-08-19 15:04:32 +0000
commitb619f0c74719d87f58b0ea0053805b7423cdab28 (patch)
treef5585fe1edc0507d12a8ac9729befa9b67327239 /usr.sbin/amd
parentdf507d931047ee5a6db9840d4f900c0ad539717c (diff)
downloadFreeBSD-src-b619f0c74719d87f58b0ea0053805b7423cdab28.zip
FreeBSD-src-b619f0c74719d87f58b0ea0053805b7423cdab28.tar.gz
Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generating _pic.a variants of various libraries. 3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR) where it never would work anyhow, such as csu or loader. This suggests there may be better ways of adding support to the tree. Many of these cases can be fixed such that -fPIE will work but there is really no reason to have it in those cases. 4. Some of the uses are working around hacks done to some Makefiles that are really building libraries but have been using bsd.prog.mk because the code is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have been needed. We likely do want to enable PIE by default (opt-out) for non-tree consumers (such as ports). For in-tree though we probably want to only enable PIE (opt-in) for common attack targets such as remote service daemons and setuid utilities. This is also a great performance compromise since ASLR is expected to reduce performance. As such it does not make sense to enable it in all utilities such as ls(1) that have little benefit to having it enabled. Reported by: kib
Diffstat (limited to 'usr.sbin/amd')
-rw-r--r--usr.sbin/amd/amd/Makefile2
-rw-r--r--usr.sbin/amd/amq/Makefile2
-rw-r--r--usr.sbin/amd/fixmount/Makefile2
-rw-r--r--usr.sbin/amd/fsinfo/Makefile2
-rw-r--r--usr.sbin/amd/hlfsd/Makefile2
-rw-r--r--usr.sbin/amd/mk-amd-map/Makefile2
-rw-r--r--usr.sbin/amd/pawd/Makefile2
-rw-r--r--usr.sbin/amd/wire-test/Makefile2
8 files changed, 0 insertions, 16 deletions
diff --git a/usr.sbin/amd/amd/Makefile b/usr.sbin/amd/amd/Makefile
index fdcbd60..1fc41bf 100644
--- a/usr.sbin/amd/amd/Makefile
+++ b/usr.sbin/amd/amd/Makefile
@@ -24,8 +24,6 @@ SRCS+= ops_nullfs.c ops_pcfs.c ops_tfs.c ops_ufs.c ops_umapfs.c
SRCS+= ops_unionfs.c opts.c readdir.c restart.c rpc_fwd.c sched.c
SRCS+= srvr_amfs_auto.c srvr_nfs.c
-NO_PIE= yes
-
CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \
-I${DESTDIR}/usr/include/rpcsvc
diff --git a/usr.sbin/amd/amq/Makefile b/usr.sbin/amd/amq/Makefile
index 40257c3..74fc749 100644
--- a/usr.sbin/amd/amq/Makefile
+++ b/usr.sbin/amd/amq/Makefile
@@ -17,6 +17,4 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amq
DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.sbin/amd/fixmount/Makefile b/usr.sbin/amd/fixmount/Makefile
index 1838fb2..7f96a45 100644
--- a/usr.sbin/amd/fixmount/Makefile
+++ b/usr.sbin/amd/fixmount/Makefile
@@ -18,6 +18,4 @@ SRCS+= checkmount_bsd44.c
DPADD= ${LIBAMU} ${LIBRPCSVC}
LDADD= ${LIBAMU} -lrpcsvc
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.sbin/amd/fsinfo/Makefile b/usr.sbin/amd/fsinfo/Makefile
index 83becb2..1695a46 100644
--- a/usr.sbin/amd/fsinfo/Makefile
+++ b/usr.sbin/amd/fsinfo/Makefile
@@ -13,8 +13,6 @@ SRCS= fsi_gram.y fsi_lex.l
SRCS+= fsi_analyze.c fsi_dict.c fsi_util.c fsinfo.c wr_atab.c
SRCS+= wr_bparam.c wr_dumpset.c wr_exportfs.c wr_fstab.c
-NO_PIE= yes
-
CFLAGS+= -I${.CURDIR}/../../../contrib/amd/fsinfo
DPADD= ${LIBAMU}
diff --git a/usr.sbin/amd/hlfsd/Makefile b/usr.sbin/amd/hlfsd/Makefile
index dca94da..5b863dd 100644
--- a/usr.sbin/amd/hlfsd/Makefile
+++ b/usr.sbin/amd/hlfsd/Makefile
@@ -16,6 +16,4 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/amd/hlfsd
DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.sbin/amd/mk-amd-map/Makefile b/usr.sbin/amd/mk-amd-map/Makefile
index bed9e30..57fd6a5 100644
--- a/usr.sbin/amd/mk-amd-map/Makefile
+++ b/usr.sbin/amd/mk-amd-map/Makefile
@@ -13,6 +13,4 @@ MAN= mk-amd-map.8
DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.sbin/amd/pawd/Makefile b/usr.sbin/amd/pawd/Makefile
index 612aced..c6bb1cc 100644
--- a/usr.sbin/amd/pawd/Makefile
+++ b/usr.sbin/amd/pawd/Makefile
@@ -17,6 +17,4 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amq
DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/usr.sbin/amd/wire-test/Makefile b/usr.sbin/amd/wire-test/Makefile
index f960768..a07e690 100644
--- a/usr.sbin/amd/wire-test/Makefile
+++ b/usr.sbin/amd/wire-test/Makefile
@@ -13,6 +13,4 @@ MAN= wire-test.8
DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
-NO_PIE= yes
-
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud