1 |
commit: 40ed7d92f481b5af9aa54843bb350d25f28c7110 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Sep 3 22:26:09 2021 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Fri Sep 3 23:05:07 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=40ed7d92 |
7 |
|
8 |
sys-cluster/dyninst: no W+X sections |
9 |
|
10 |
Closes: https://bugs.gentoo.org/806268 |
11 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
12 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
13 |
|
14 |
...yninst-11.0.1.ebuild => dyninst-11.0.1-r1.ebuild} | 2 ++ |
15 |
...e-executable-flag-from-dyninst_heap-section.patch | 20 ++++++++++++++++++++ |
16 |
2 files changed, 22 insertions(+) |
17 |
|
18 |
diff --git a/sys-cluster/dyninst/dyninst-11.0.1.ebuild b/sys-cluster/dyninst/dyninst-11.0.1-r1.ebuild |
19 |
similarity index 93% |
20 |
rename from sys-cluster/dyninst/dyninst-11.0.1.ebuild |
21 |
rename to sys-cluster/dyninst/dyninst-11.0.1-r1.ebuild |
22 |
index 73a7501d4..eb0f0a6d7 100644 |
23 |
--- a/sys-cluster/dyninst/dyninst-11.0.1.ebuild |
24 |
+++ b/sys-cluster/dyninst/dyninst-11.0.1-r1.ebuild |
25 |
@@ -29,6 +29,8 @@ RDEPEND=" |
26 |
DEPEND="${RDEPEND}" |
27 |
BDEPEND="doc? ( dev-texlive/texlive-latex )" |
28 |
|
29 |
+PATCHES=( "${FILESDIR}/${P}-remove-executable-flag-from-dyninst_heap-section.patch" ) |
30 |
+ |
31 |
src_configure() { |
32 |
local mycmakeargs=( |
33 |
-DENABLE_STATIC_LIBS=NO |
34 |
|
35 |
diff --git a/sys-cluster/dyninst/files/dyninst-11.0.1-remove-executable-flag-from-dyninst_heap-section.patch b/sys-cluster/dyninst/files/dyninst-11.0.1-remove-executable-flag-from-dyninst_heap-section.patch |
36 |
new file mode 100644 |
37 |
index 000000000..09bab8993 |
38 |
--- /dev/null |
39 |
+++ b/sys-cluster/dyninst/files/dyninst-11.0.1-remove-executable-flag-from-dyninst_heap-section.patch |
40 |
@@ -0,0 +1,20 @@ |
41 |
+From f27f96cee0b73f770cf69cb98a5744f769014ee5 Mon Sep 17 00:00:00 2001 |
42 |
+From: "James A. Kupsch" <kupsch@×××××××.edu> |
43 |
+Date: Mon, 30 Aug 2021 10:18:17 -0500 |
44 |
+Subject: [PATCH] remove executable flag from .dyninst_heap section |
45 |
+ |
46 |
+This prevents the library/object with this code from having a segment violates |
47 |
+the W^X security property for segments as the current setting resulted in |
48 |
+segment with both the WRITE and EXECUTE flags set. The function |
49 |
+mark_heaps_exec() restores execute protection to just the heap arrays. |
50 |
+--- a/dyninstAPI_RT/src/RTspace.S |
51 |
++++ b/dyninstAPI_RT/src/RTspace.S |
52 |
+@@ -8,7 +8,7 @@ |
53 |
+ .type DYNINSTstaticHeap_16M_anyHeap_1, @object |
54 |
+ .size DYNINSTstaticHeap_16M_anyHeap_1, 16777216 |
55 |
+ |
56 |
+-.section .dyninst_heap,"awx",@nobits |
57 |
++.section .dyninst_heap,"aw",@nobits |
58 |
+ .align 16 |
59 |
+ DYNINSTstaticHeap_512K_lowmemHeap_1: |
60 |
+ .skip 524288 |