* [Bug runtime/10381] New: sdt.h macros create relocatable addresses in non-writable allocated .probes section
@ 2009-07-10 11:22 mjw at redhat dot com
2009-07-10 11:56 ` [Bug runtime/10381] " mjw at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: mjw at redhat dot com @ 2009-07-10 11:22 UTC (permalink / raw)
To: systemtap
This causes selinux memory protection failures:
SELinux is preventing uprobesgcc-O0de from loading
/usr/local/build/systemtap-obj/testsuite/libuprobeslibgcc-O0default-debug.so
which requires text relocation.
Which look like:
./myexe: error while loading shared libraries: libmylib.so: cannot open shared
object file: No such file or directory
Where mylib.c just has the innocent looking:
STAP_PROBE1(test, lib_main, 1);
This seems to be caused by the fact that we are taking the address of the
generated label (&&label) and store that in the .probes section. Which seem to
result in R_X86_64_RELATIVE relocations in the .probes section, which is
insegment 0 which is LOADed with just R E, not W.
--
Summary: sdt.h macros create relocatable addresses in non-
writable allocated .probes section
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: runtime
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: mjw at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10381
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug runtime/10381] sdt.h macros create relocatable addresses in non-writable allocated .probes section
2009-07-10 11:22 [Bug runtime/10381] New: sdt.h macros create relocatable addresses in non-writable allocated .probes section mjw at redhat dot com
@ 2009-07-10 11:56 ` mjw at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: mjw at redhat dot com @ 2009-07-10 11:56 UTC (permalink / raw)
To: systemtap
------- Additional Comments From mjw at redhat dot com 2009-07-10 11:56 -------
commit 880fc23fa180ae9c9557e7ff945f5f1e750aef15
Author: Mark Wielaard <mjw@redhat.com>
Date: Fri Jul 10 13:53:00 2009 +0200
PR10381 sdt.h macros create relocatable addresses in non-writable section.
Allocated section needs to be writable when creating pic shared objects
because we store relocatable addresses in them.
* includes/sys/sdt.h (ALLOCSEC): New macro, depends on __PIC__.
(STAP_PROBE_DATA_): Use new ALLOCSEC macro.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=10381
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-10 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-10 11:22 [Bug runtime/10381] New: sdt.h macros create relocatable addresses in non-writable allocated .probes section mjw at redhat dot com
2009-07-10 11:56 ` [Bug runtime/10381] " mjw at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).