diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2007-10-01 08:35:01 -0600 |
---|---|---|
committer | David Mosberger-Tang <davidm@koala.mostang.com> | 2007-10-01 08:35:01 -0600 |
commit | 57e569646368cb730f028ecf1732143474e3e642 (patch) | |
tree | a76ac9bd99edf78a5194f6308f0bc0566e6fe39c /tests | |
parent | c340d04279f046b543066dbc8f36452602d7fd52 (diff) | |
download | libunwind-57e569646368cb730f028ecf1732143474e3e642.tar.gz |
Mark Wielaard <mwielaard@redhat.com> writes:
On some systems executable stacks are denied. Since libunwind and the
tests don't actually need executable stacks this patch marks all
assembly files as not needing it.
The original patch comes from frysk:
2007-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* src/hppa/getcontext.S, src/hppa/setcontext.S, src/hppa/siglongjmp.S,
src/ia64/Ginstall_cursor.S, src/ia64/Linstall_cursor.S,
src/ia64/dyn_info_list.S, src/ia64/getcontext.S, src/ia64/longjmp.S,
src/ia64/setjmp.S, src/ia64/siglongjmp.S, src/ia64/sigsetjmp.S,
src/ppc64/longjmp.S, src/ppc64/siglongjmp.S, src/x86/longjmp.S,
src/x86/siglongjmp.S, src/x86_64/longjmp.S, src/x86_64/setcontext.S,
src/x86_64/siglongjmp.S: Stack should be non-executable, for SELinux.
I added a couple more markers for new files in current libunwind.
Before this patch you would get the following on selinux enabled
systems without allow_exec_stack: error while loading shared
libraries:
libunwind.so.7: cannot enable executable stack as shared object
requires: Permission denied
After the patch that error disappears and all test results are similar
to the results on systems without executable stack protection.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/flush-cache.S | 5 | ||||
-rw-r--r-- | tests/ia64-dyn-asm.S | 5 | ||||
-rw-r--r-- | tests/ia64-test-nat-asm.S | 5 | ||||
-rw-r--r-- | tests/ia64-test-rbs-asm.S | 5 | ||||
-rw-r--r-- | tests/ia64-test-readonly-asm.S | 5 | ||||
-rw-r--r-- | tests/ia64-test-stack-asm.S | 5 |
6 files changed, 30 insertions, 0 deletions
diff --git a/tests/flush-cache.S b/tests/flush-cache.S index 8243f82d..d996492f 100644 --- a/tests/flush-cache.S +++ b/tests/flush-cache.S @@ -69,3 +69,8 @@ flush_cache: #else # error Need flush_cache code for this architecture. #endif + +#ifdef __linux__ + /* We do not need executable stack. */ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/tests/ia64-dyn-asm.S b/tests/ia64-dyn-asm.S index bc69852e..79582e9e 100644 --- a/tests/ia64-dyn-asm.S +++ b/tests/ia64-dyn-asm.S @@ -95,3 +95,8 @@ func_vframe: } func_vframe_end: .endp func_vframe + +#ifdef __linux__ + /* We do not need executable stack. */ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/tests/ia64-test-nat-asm.S b/tests/ia64-test-nat-asm.S index 8482c35a..eea5ac27 100644 --- a/tests/ia64-test-nat-asm.S +++ b/tests/ia64-test-nat-asm.S @@ -501,3 +501,8 @@ save_pr: br.ret.sptk.many rp .endp save_pr + +#ifdef __linux__ + /* We do not need executable stack. */ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/tests/ia64-test-rbs-asm.S b/tests/ia64-test-rbs-asm.S index dc532d90..9a6d33fb 100644 --- a/tests/ia64-test-rbs-asm.S +++ b/tests/ia64-test-rbs-asm.S @@ -268,3 +268,8 @@ resumption_point_label: ;; br.cond.sptk.many b6 .endp resumption_point + +#ifdef __linux__ + /* We do not need executable stack. */ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/tests/ia64-test-readonly-asm.S b/tests/ia64-test-readonly-asm.S index 94a4dd74..acd3ada2 100644 --- a/tests/ia64-test-readonly-asm.S +++ b/tests/ia64-test-readonly-asm.S @@ -48,3 +48,8 @@ test_func: br.ret.sptk.many rp .endp test_func + +#ifdef __linux__ + /* We do not need executable stack. */ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/tests/ia64-test-stack-asm.S b/tests/ia64-test-stack-asm.S index 0194774c..0aea33a4 100644 --- a/tests/ia64-test-stack-asm.S +++ b/tests/ia64-test-stack-asm.S @@ -176,3 +176,8 @@ touch_all: mov ar.pfs = loc1 br.ret.sptk.many rp .endp touch_all + +#ifdef __linux__ + /* We do not need executable stack. */ + .section .note.GNU-stack,"",@progbits +#endif |