From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QHkAe-0007XP-Je for garchives@archives.gentoo.org; Wed, 04 May 2011 22:03:48 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9E1AC1C008; Wed, 4 May 2011 22:03:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5E10A1C008 for ; Wed, 4 May 2011 22:03:40 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AB7D51B407A for ; Wed, 4 May 2011 22:03:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id CE2DC45962 for ; Wed, 4 May 2011 22:03:38 +0000 (UTC) From: "Francisco Blas Izquierdo Riera" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Francisco Blas Izquierdo Riera" Message-ID: Subject: [gentoo-commits] proj/hardened-docs:master commit in: xml/ X-VCS-Repository: proj/hardened-docs X-VCS-Files: xml/etdyn.xml X-VCS-Directories: xml/ X-VCS-Committer: klondike X-VCS-Committer-Name: Francisco Blas Izquierdo Riera X-VCS-Revision: c905159e3812ba690d55bcf6fedd5e26b3eb18d6 Date: Wed, 4 May 2011 22:03:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: f2002ad48275b1364b4a6173cb7110b3 commit: c905159e3812ba690d55bcf6fedd5e26b3eb18d6 Author: klondike xiscosoft es> AuthorDate: Wed May 4 21:44:13 2011 +0000 Commit: Francisco Blas Izquierdo Riera xiscosoft = es> CommitDate: Wed May 4 21:44:13 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-docs= .git;a=3Dcommit;h=3Dc905159e Fixing some QA issues --- xml/etdyn.xml | 44 +++++++++++++++++++++++++------------------- 1 files changed, 25 insertions(+), 19 deletions(-) diff --git a/xml/etdyn.xml b/xml/etdyn.xml index 2b81d4d..6744440 100644 --- a/xml/etdyn.xml +++ b/xml/etdyn.xml @@ -1,7 +1,7 @@ - +ETDYN guide The PaX Team @@ -27,6 +27,7 @@ These guidelines are required to achieve full Address S= pace Layout Randomization =20 Introduction +

One of the features of PaX is Address Space Layout Randomization (= ASLR) that allows the kernel to randomize the addresses of various areas in @@ -67,10 +68,12 @@ These guidelines are required to achieve full Address= Space Layout Randomization themselves in the future.

=20 +
=20 How to produce ET_DYN ELF executables +
=20

The following discussion assumes that the GNU toolchain (such as g= cc and @@ -114,8 +117,8 @@ These guidelines are required to achieve full Address= Space Layout Randomization care about gcrt1.o). It is no coincidence that crt1.o is not linked i= nto shared libraries as this object contains (among others) the low-level= entry point and startup code that invokes the C library startup code which = in - turn calls main().=20 - Initiating the building of ET_DYN executables on Gentoo does no= t require us to put -shared in our CFLAGS or LDFLAGS

+ turn calls main().

+ Initiating the building of ET_DYN executables on Gentoo does no= t require us to put -shared in our CFLAGS or LDFLAGS =20

Making crt1.o position independent is easy, we just have to make u= se of the GOT (in keeping with the tradition of the glibc naming convention for= the @@ -148,20 +151,22 @@ These guidelines are required to achieve full Addre= ss Space Layout Randomization code) they can be compiled once and put into the same directory where the other systemwide crt* files are.

+
=20 ET_DYN ELF executables (The Gentoo Way) +
=20 -

On Gentoo this is accomplished by merging hardened-gcc: +

On Gentoo this is accomplished by merging hardened-gcc: =20

-# emerge hardened-gcc
+# emerge hardened-gcc
 
=20 -

hardened-gcc is an umbrella package for non-mainstream gcc = modifications - The hardened-gcc packages was initially created by Alexander G= abert=20 +

hardened-gcc is an umbrella package for non-mainstream gcc = modifications + The hardened-gcc packages was initially created by Alexander G= abert=20 for this special purpose we are serving here: rolling out the etdyn specs file and interp.o together with the position independent crt1S.o. But this package is not limited to that purpose. =20 @@ -184,21 +189,17 @@ These guidelines are required to achieve full Addre= ss Space Layout Randomization one is chpax built as an ET_EXEC.

=20
-# file /sbin/chpax
+# file /sbin/chpax
 /sbin/chpax: ELF 32-bit LSB shared object, Intel 80386, version 1 \
 (GNU/Linux), stripped
 /sbin/chpax: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), f=
or \
 GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped
 
=20 - - - + =20 -To keep the bugs down for us we really dont want the -end user mucking with the specs -solar - -

We can further simplify the building of ET_DYN executables by modi= fying + + +

+
+ + =20 Credits
=20