Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/elfix:master commit in: doc/
Date: Thu, 08 Sep 2011 23:10:34
Message-Id: 8452e2a1ce450503bd0c15f8dfd7bd08de7430dc.blueness@gentoo
1 commit: 8452e2a1ce450503bd0c15f8dfd7bd08de7430dc
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 8 23:10:14 2011 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 8 23:10:14 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=8452e2a1
7
8 doc/paxctl-ng-design.txt: first draft
9
10 ---
11 doc/paxctl-ng-design.txt | 43 +++++++++++++++++++++++++++++++++++++++++++
12 1 files changed, 43 insertions(+), 0 deletions(-)
13
14 diff --git a/doc/paxctl-ng-design.txt b/doc/paxctl-ng-design.txt
15 new file mode 100644
16 index 0000000..18f59f4
17 --- /dev/null
18 +++ b/doc/paxctl-ng-design.txt
19 @@ -0,0 +1,43 @@
20 +
21 +INTRODUCTION
22 +
23 +Currently there are two ways to perform pax markings, one is by EI_PAX and
24 +the other by PT_PAX. The former is a legacy marking which uses bytes 14
25 +and 15 of the ehdr.e_ident[] field. These are in a reserved area of the ELF
26 +header and could be allocated to a different official use by some future
27 +standard [1]. For this reason, it is undesireable to continue using this
28 +marking scheme. The second method introduces a new program header called
29 +PAX_FLAGS which hosts the markings. While this avoids hijacking a reserved
30 +area of an ELF binary, it introduces the problem of pre-compiled binaries
31 +which do not have a PT_PAX program header. Binaries compiled on a Gentoo
32 +system automatically have a PT_PAX header because of patched binutils. However
33 +binaries compiled on other systems do not necessarily have such a section.
34 +This can be remedied by either adding a PT_PAX header or converting a GNU_STACK
35 +header. However both of these are problematic. In the case of self-checking
36 +elf binaries, adding a PT_PAX header will cause a failure of the check.
37 +Alternatively, converting a GNU_STACK header can cause the binary to fail
38 +to execute correctly.
39 +
40 +A third possibility is being consider, but it is in its infancy as of this
41 +writing. The pax markings can be put in the Extended File Attributes, much
42 +like selinux labels. This is not without its difficulties because not all
43 +filesystems are capable of supporting xattrs. However, work on making
44 +filesystems, like tmpfs, and archiving tools, like tar, aware of xattrs
45 +is maturing and migrating pax markings to xattrs is now a design possibility.
46 +
47 +
48 +PURPOSAL
49 +
50 +To avoid ambiguity in Hardened Gentoo and to smooth the transition to a
51 +future, we propose the following standards to how pax markings are treated:
52 +
53 +1) The kernel.
54 +
55 +2) Userland utility.
56 +
57 +
58 +
59 +REFERENCE
60 +
61 +[1] http://refspecs.freestandards.org/elf/
62 +