Import rpm: c8s

This commit is contained in:
James Antill 2023-02-27 13:13:24 -05:00
commit a6107ba557
5 changed files with 1639 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
SOURCES/systemtap-4.1.tar.gz
/systemtap-4.1.tar.gz

51
pr23074.patch Normal file
View File

@ -0,0 +1,51 @@
commit 83071bc877b462eacca309fa49c9e8112fc16bdf
Author: Jafeer Uddin <juddin@redhat.com>
Date: Thu May 9 16:18:46 2019 -0400
PR23074: fix guru mode issue with generated calls to register get/set
diff --git a/elaborate.cxx b/elaborate.cxx
index 9ebf30b..fcd1d1d 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -3073,7 +3073,7 @@ public:
}
// Don't allow /* guru */ functions unless caller is privileged.
- if (!call->tok->location.file->privileged &&
+ if (!call->synthetic && !call->tok->location.file->privileged &&
s->tagged_p ("/* guru */"))
throw SEMANTIC_ERROR (_("function may not be used unless -g is specified"),
call->tok);
diff --git a/loc2stap.cxx b/loc2stap.cxx
index c1a48d0..d4fd051 100644
--- a/loc2stap.cxx
+++ b/loc2stap.cxx
@@ -1745,6 +1745,7 @@ location_context::handle_GNU_parameter_ref (Dwarf_Op expr)
// it and we want to be able to restore the registers back.
functioncall *get_ptregs = new functioncall;
get_ptregs->tok = e->tok;
+ get_ptregs->synthetic = true;
if (this->userspace_p)
get_ptregs->function = std::string("__get_uregs");
else
@@ -1870,6 +1871,7 @@ location_context::handle_GNU_parameter_ref (Dwarf_Op expr)
// Translation done, restore the pt_regs to its original value
functioncall *set_ptregs = new functioncall;
set_ptregs->tok = e->tok;
+ set_ptregs->synthetic = true;
if (this->userspace_p)
set_ptregs->function = std::string("__set_uregs");
else
diff --git a/staptree.h b/staptree.h
index d63156f..2735808 100644
--- a/staptree.h
+++ b/staptree.h
@@ -464,6 +464,7 @@ struct functioncall: public expression
interned_string function;
std::vector<expression*> args;
std::vector<functiondecl*> referents;
+ bool synthetic;
functioncall ();
void print (std::ostream& o) const;
void visit (visitor* u);

32
rhbz1732173.patch Normal file
View File

@ -0,0 +1,32 @@
commit 7be7af0fda3633cd19e499617834cf4a5f51dd55
Author: William Cohen <wcohen@redhat.com>
Date: Tue Jul 23 14:24:14 2019 -0400
Fix aarch64 to properly access arguments for wrapped syscalls
Linux 4.18 added wrappers for aarch64 syscalls that pass a pointer to
a struct pt_regs holding the values for the actual arguments. The
syscall tapsets initialize CONTEXT->sregs to point at this data
structure. However, the aarch64 specific register access code was
using the CONTEXT->kregs and just getting the processor register state
when the kprobe triggered rather than the expected arguments in the
data structure being passed into the syscall. The aarch64 specific
register code now gets the syscall arguments from the correct pt_regs
structure.
diff --git a/tapset/arm64/registers.stp b/tapset/arm64/registers.stp
index b2e5649..8773df2 100644
--- a/tapset/arm64/registers.stp
+++ b/tapset/arm64/registers.stp
@@ -58,7 +58,10 @@ function uarch_bytes:long() {
function _stp_get_register_by_offset:long (offset:long) %{ /* pure */
long value;
struct pt_regs *regs;
- regs = (CONTEXT->user_mode_p ? CONTEXT->uregs : CONTEXT->kregs);
+ if (CONTEXT->sregs)
+ regs = CONTEXT->sregs;
+ else
+ regs = (CONTEXT->user_mode_p ? CONTEXT->uregs : CONTEXT->kregs);
if (!regs) {
CONTEXT->last_error = "No registers available in this context";
return;

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (systemtap-4.1.tar.gz) = fbd606d9842ac63af6e607613a112b08d7593da74ad0398716cdc46f74a977a8e6b9fae92e1f63779ccfc94cffa25f29dee2ae44f67ecc4cedae630e50a2e7b6

1553
systemtap.spec Normal file

File diff suppressed because it is too large Load Diff