Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8ad224227 | ||
|
|
0384025141 | ||
|
|
846f2b32c6 | ||
|
|
f6d32ace8f | ||
|
|
43d514b856 | ||
|
|
cdc8fbe05c | ||
|
|
61c8529211 |
12 changed files with 778 additions and 780 deletions
|
|
@ -1 +0,0 @@
|
|||
1
|
||||
109
.gitignore
vendored
109
.gitignore
vendored
|
|
@ -4,112 +4,3 @@
|
|||
/systemtap-3.2-0.20170410gitcbf2583808d6.tar.gz
|
||||
/systemtap-3.2-0.20170512gitc67d8f274b21.tar.gz
|
||||
/systemtap-3.2.tar.gz
|
||||
/systemtap-3.3-0.20180222git5ef0c24456e3.tar.gz
|
||||
/systemtap-3.3-0.20180315gitc2585f2b58cd.tar.gz
|
||||
/systemtap-3.3-0.20180420gitd4a446c.tar.gz
|
||||
/systemtap-3.3-0.20180508git9c6ac6cda49e.tar.gz
|
||||
/systemtap-3.3.tar.gz
|
||||
/systemtap-4.0-0.20180810git.tar.gz
|
||||
/systemtap-4.0-0.20180906git37598c4fee7c.tar.gz
|
||||
/systemtap-4.0-0.20180914gitc51d4e55d285.tar.gz
|
||||
/systemtap-4.0-0.20180914gitc1befcceae01.tar.gz
|
||||
/systemtap-4.0-0.20180914git11a0a7aea387.tar.gz
|
||||
/systemtap-4.0-0.20180914gitfe4e14f4af16.tar.gz
|
||||
/systemtap-4.0-0.20180914gitfe4e14f4af16.1.tar.gz
|
||||
/systemtap-4.0-0.20181003git4ad1e11de831.tar.gz
|
||||
/systemtap-4.0.tar.gz
|
||||
/systemtap-4.1-0.20181126gitf082df49dd91.tar.gz
|
||||
/systemtap-4.1-0.20181126git47ce37a149b6.tar.gz
|
||||
/systemtap-4.1-0.20181203gitec3b46eb9b19.tar.gz
|
||||
/systemtap-4.1-0.20181204git891810c246d6.tar.gz
|
||||
/systemtap-4.1-0.20190123gitc8084763b75f.tar.gz
|
||||
/systemtap-4.1-0.20190125git905865da1024.tar.gz
|
||||
/systemtap-4.1-0.20190207git4e76869512d2.tar.gz
|
||||
/systemtap-4.1-0.20190307gitf7fb9c9182dc.tar.gz
|
||||
/systemtap-4.1-0.20190308gitb3627d9aa037.tar.gz
|
||||
/systemtap-4.1-0.20190327git2ede4cecb20c.tar.gz
|
||||
/systemtap-4.1-0.20190502git446e7c358247.tar.gz
|
||||
/systemtap-4.1.tar.gz
|
||||
/systemtap-4.2-0.20190513git8b868f3dd030.tar.gz
|
||||
/systemtap-4.2-0.20190613git2d77f531a5d1.tar.gz
|
||||
/systemtap-4.2-0.20190618git47c3f6c60174.tar.gz
|
||||
/systemtap-4.2-0.20190807gitebfc300ec2ad.tar.gz
|
||||
/systemtap-4.2-0.20190827git8ffab23ff.tar.gz
|
||||
/systemtap-4.2.tar.gz
|
||||
/systemtap-4.3-0.20200112gitb1e6a6645bba.tar.gz
|
||||
/systemtap-4.3-0.20200203git6c0b74f5910a.tar.gz
|
||||
/systemtap-4.3-0.20200211git91ffb97ad335.tar.gz
|
||||
/systemtap-4.3-0.20200529git6d50a5cadb64.tar.gz
|
||||
/systemtap-4.3.tar.gz
|
||||
/systemtap-4.4-0.20200714git8212024da2ae.tar.gz
|
||||
/systemtap-4.4-0.20200714gite5a63d9c000a.tar.gz
|
||||
/systemtap-4.4-0.20200715gitce0fa621eb35.tar.gz
|
||||
/systemtap-4.4-0.20200731git87344e948606.tar.gz
|
||||
/systemtap-4.4-0.20200805git82b8e1a07.tar.gz
|
||||
/systemtap-4.4-0.20200922git05179173e71c.tar.gz
|
||||
/systemtap-4.4.tar.gz
|
||||
/systemtap-4.4-0.20201203gitf02f08bc6eff.tar.gz
|
||||
/systemtap-4.5-0.20201203git963c215e781e.tar.gz
|
||||
/systemtap-4.5-0.20201204git0d80048e02ec.tar.gz
|
||||
/systemtap-4.5-0.20201210gitd86b64029598.tar.gz
|
||||
/systemtap-4.5-0.20210105git6cb54128e005.tar.gz
|
||||
/systemtap-4.5-0.20210107gita4d01e48d435.tar.gz
|
||||
/systemtap-4.5-0.20210128gita790dc64a9d8.tar.gz
|
||||
/systemtap-4.5-0.20210129gitea81249b90b9.tar.gz
|
||||
/systemtap-4.5-0.202101291559git9e1a0f5703ad.tar.gz
|
||||
/systemtap-4.5-0.202102101544git8d5e0abc542c.tar.gz
|
||||
/systemtap-4.5-0.202102191905git0f623095ee3e.tar.gz
|
||||
/systemtap-4.5-0.202102231232git663a93e8b82b.tar.gz
|
||||
/systemtap-4.5-0.202104140931gitad00fb87e.tar.gz
|
||||
/systemtap-4.5-0.202104140933gitad00fb87e.tar.gz
|
||||
/systemtap-4.5-0.202105041345git02b6be05fb76.tar.gz
|
||||
/systemtap-4.5.tar.gz
|
||||
/systemtap-4.6-16261989g7c2751e3.tar.gz
|
||||
/systemtap-4.6~pre16262008gbff2b2ff.tar.gz
|
||||
/systemtap-4.6~pre16262012gc7f1c12e.tar.gz
|
||||
/systemtap-4.6~pre16262021g84ef6bd9.tar.gz
|
||||
/systemtap-4.6~pre16291338gf2c14776.tar.gz
|
||||
/systemtap-4.6.tar.gz
|
||||
/systemtap-4.7~pre16378386g61a4c8f8.tar.gz
|
||||
/systemtap-4.7~pre16383943gecab2afe.tar.gz
|
||||
/systemtap-4.7~pre16388948g209b5a19.tar.gz
|
||||
/systemtap-4.7~pre16395042gefae8a3d.tar.gz
|
||||
/systemtap-4.7~pre16432070g1d2cb8b3.tar.gz
|
||||
/systemtap-4.7~pre16433134g7d871ab5.tar.gz
|
||||
/systemtap-4.7~pre16468670g9f253544.tar.gz
|
||||
/systemtap-4.7.tar.gz
|
||||
/systemtap-4.8~pre16557277g2882dcc9.tar.gz
|
||||
/systemtap-4.8~pre16578235g069e109c.tar.gz
|
||||
/systemtap-4.8~pre16594727g09f1b7bb.tar.gz
|
||||
/systemtap-4.8~pre16594741g5bdc37b9.tar.gz
|
||||
/systemtap-4.8~pre16650659g6a096a7d.tar.gz
|
||||
/systemtap-4.8.tar.gz
|
||||
/systemtap-4.9.tar.gz
|
||||
/systemtap-5.0~pre16885197g6b17715f.tar.gz
|
||||
/systemtap-5.0~pre16885234gd98d6c2d.tar.gz
|
||||
/systemtap-5.0~pre16890184ge891a37e.tar.gz
|
||||
/systemtap-5.0~pre16891249ge891a37e.tar.gz
|
||||
/systemtap-5.0~pre16958465gca71442b.tar.gz
|
||||
/systemtap-5.0.tar.gz
|
||||
/systemtap-5.1~pre17056120g2ccc0c4c.tar.gz
|
||||
/systemtap-5.1~pre17056139g6c0b92b3.tar.gz
|
||||
/systemtap-5.1~pre17059382g67086c54.tar.gz
|
||||
/systemtap-5.1~pre17060399gb6abf4bd.tar.gz
|
||||
/systemtap-5.1~pre17062114g2604d135.tar.gz
|
||||
/systemtap-5.1~pre17062192g5fd8daba.tar.gz
|
||||
/systemtap-5.1.tar.gz
|
||||
/systemtap-5.1~pre17206206ge48abca5.tar.gz
|
||||
/systemtap-5.2~pre17206355g1a07290a.tar.gz
|
||||
/systemtap-5.2~pre17224323g98d1ea34.tar.gz
|
||||
/systemtap-5.2~pre17250223gd07e4284.tar.gz
|
||||
/systemtap-5.2~pre17277956g0b7f6722.tar.gz
|
||||
/systemtap-5.2~pre17283218gc5774e18.tar.gz
|
||||
/systemtap-5.2.tar.gz
|
||||
/systemtap-5.2~pre17373420g1e894ff0.tar.gz
|
||||
/systemtap-5.3~pre17373422g9a48fbea.tar.gz
|
||||
/systemtap-5.3~pre17373794g3efe129d.tar.gz
|
||||
/systemtap-5.3~pre17373816g7a71d34b.tar.gz
|
||||
/systemtap-5.3.tar.gz
|
||||
/systemtap-5.4~pre17585473g1fe4178d.tar.gz
|
||||
/systemtap-5.4~pre17585496g86ab88eb.tar.gz
|
||||
/systemtap-5.4.tar.gz
|
||||
|
|
|
|||
30
gating.yaml
30
gating.yaml
|
|
@ -1,30 +0,0 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts: [bodhi_update_push_testing]
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts: [bodhi_update_push_stable]
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.rebuild.validation}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.rebuild.validation}
|
||||
12
plans/ci.fmf
12
plans/ci.fmf
|
|
@ -1,12 +0,0 @@
|
|||
summary: CI Gating Plan
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://src.fedoraproject.org/tests/systemtap-gating.git
|
||||
ref: main
|
||||
directory: tests
|
||||
prepare:
|
||||
- name: prepare
|
||||
how: shell
|
||||
script: ./plans/prepare.sh
|
||||
execute:
|
||||
how: tmt
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# On Rawhide, the running kernel packages won't probably be avail in
|
||||
# configured repos. Debuginfo isn't a problem, we access that using
|
||||
# the debuginfod.
|
||||
__fedora_install_deps ()
|
||||
{
|
||||
TMPD=$(mktemp -d)
|
||||
pushd $TMPD
|
||||
koji download-build --rpm kernel-`uname -r` --arch `uname -i`
|
||||
koji download-build --rpm kernel-devel-`uname -r` --arch `uname -i`
|
||||
koji download-build --rpm kernel-modules-`uname -r` --arch `uname -i`
|
||||
dnf -y install kernel{,-devel,-modules}-`uname -r`.rpm
|
||||
popd
|
||||
rm -rf $TMPD
|
||||
}
|
||||
|
||||
set -xe
|
||||
|
||||
source /etc/os-release
|
||||
|
||||
# Install needed packages
|
||||
if [ "$ID" == "fedora" ]; then
|
||||
stap-prep || __fedora_install_deps
|
||||
fi
|
||||
stap-prep
|
||||
|
||||
# Report installed packages
|
||||
stap-report
|
||||
|
||||
# Set up SELinux so that it allows for userspace probing
|
||||
setsebool allow_execmod on
|
||||
setsebool allow_execstack on
|
||||
setsebool deny_ptrace off
|
||||
|
||||
set +xe
|
||||
49
rhbz1504009.patch
Normal file
49
rhbz1504009.patch
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
commit 9f81f10b0caf6dfc49c4b7ceb7902f45d37b532a (HEAD -> master, origin/master, origin/HEAD)
|
||||
Author: Frank Ch. Eigler <fche@redhat.com>
|
||||
Date: Fri Oct 20 10:01:58 2017 -0400
|
||||
|
||||
rhbz1504009: let dtrace -G -o /dev/null run, as in autoconf
|
||||
|
||||
commit c245153ca193c471a8c broke the ability of dtrace to be tested in
|
||||
autoconf "-G -o /dev/null" usage, because its output file name was too
|
||||
simple a function of the input name, and normal users can't write to
|
||||
/dev/null.dtrace-temp.c . Now we back down to mkstemp, like before,
|
||||
upon a failure of the simple concatenated name.
|
||||
|
||||
diff --git a/dtrace.in b/dtrace.in
|
||||
index 2e2e002a5c56..25efc253b708 100644
|
||||
--- a/dtrace.in
|
||||
+++ b/dtrace.in
|
||||
@@ -410,8 +410,12 @@ from tempfile import mkstemp
|
||||
else:
|
||||
print("header: " + fname)
|
||||
|
||||
- fname = filename + ".dtrace-temp.c"
|
||||
- fdesc = open(fname, mode='w')
|
||||
+ try: # for reproducible-builds purposes, prefer a fixed path name pattern
|
||||
+ fname = filename + ".dtrace-temp.c"
|
||||
+ fdesc = open(fname, mode='w')
|
||||
+ except: # but that doesn't work for -o /dev/null - see rhbz1504009
|
||||
+ (ignore,fname) = mkstemp(suffix=".c")
|
||||
+ fdesc = open(fname, mode='w')
|
||||
providers.semaphore_write(fdesc)
|
||||
fdesc.close()
|
||||
cc1 = os.environ.get("CC", "gcc")
|
||||
diff --git a/testsuite/systemtap.base/dtrace.exp b/testsuite/systemtap.base/dtrace.exp
|
||||
index fa6b3ec3f6d3..7c60f09d70b8 100644
|
||||
--- a/testsuite/systemtap.base/dtrace.exp
|
||||
+++ b/testsuite/systemtap.base/dtrace.exp
|
||||
@@ -83,6 +83,13 @@ if {[file exists /tmp/XXX.o]} then {
|
||||
}
|
||||
exec rm -f /tmp/XXX.o
|
||||
|
||||
+verbose -log "$dtrace -G -s $dpath -o /dev/null"
|
||||
+if [as_non_root "$python $dtrace -G -s $dpath -o /dev/null"] {
|
||||
+ fail "$test -G -o /dev/null"
|
||||
+} else {
|
||||
+ pass "$test -G -o /dev/null"
|
||||
+}
|
||||
+
|
||||
verbose -log "$dtrace -G -s $dpath -o /tmp/XXX"
|
||||
catch {exec $python $dtrace -G -s $dpath -o /tmp/XXX} res
|
||||
if {[file exists /tmp/XXX]} then {
|
||||
208
rhbz1544711.patch
Normal file
208
rhbz1544711.patch
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
commit a8e317b60 (HEAD -> master, origin/master, origin/HEAD)
|
||||
Author: Stan Cox <scox@redhat.com>
|
||||
Date: Tue Feb 13 22:38:03 2018 -0500
|
||||
|
||||
Fixes for gcc 8
|
||||
|
||||
* includes/sys/sdt.h (__SDT_COND_SIGNED): Add CT, cast type argument
|
||||
|
||||
Author: Will Cohen <wcohen.redhat.com>
|
||||
|
||||
* stap-serverd.cxx (generate_mok, handleRequest, handle_connection):
|
||||
Catch format overflow
|
||||
|
||||
* translate.cxx (translate_pass): Use ref in catch.
|
||||
|
||||
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
|
||||
index 940f74483..c0c5a492c 100644
|
||||
--- a/includes/sys/sdt.h
|
||||
+++ b/includes/sys/sdt.h
|
||||
@@ -119,8 +119,8 @@ struct __sdt_type
|
||||
|
||||
#define __SDT_ALWAYS_SIGNED(T) \
|
||||
template<> struct __sdt_type<T> { static const bool __sdt_signed = true; };
|
||||
-#define __SDT_COND_SIGNED(T) \
|
||||
-template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 1); };
|
||||
+#define __SDT_COND_SIGNED(T,CT) \
|
||||
+template<> struct __sdt_type<T> { static const bool __sdt_signed = ((CT)(-1) < 1); };
|
||||
__SDT_ALWAYS_SIGNED(signed char)
|
||||
__SDT_ALWAYS_SIGNED(short)
|
||||
__SDT_ALWAYS_SIGNED(int)
|
||||
@@ -141,14 +141,14 @@ __SDT_ALWAYS_SIGNED(const volatile short)
|
||||
__SDT_ALWAYS_SIGNED(const volatile int)
|
||||
__SDT_ALWAYS_SIGNED(const volatile long)
|
||||
__SDT_ALWAYS_SIGNED(const volatile long long)
|
||||
-__SDT_COND_SIGNED(char)
|
||||
-__SDT_COND_SIGNED(wchar_t)
|
||||
-__SDT_COND_SIGNED(volatile char)
|
||||
-__SDT_COND_SIGNED(volatile wchar_t)
|
||||
-__SDT_COND_SIGNED(const char)
|
||||
-__SDT_COND_SIGNED(const wchar_t)
|
||||
-__SDT_COND_SIGNED(const volatile char)
|
||||
-__SDT_COND_SIGNED(const volatile wchar_t)
|
||||
+__SDT_COND_SIGNED(char, char)
|
||||
+__SDT_COND_SIGNED(wchar_t, wchar_t)
|
||||
+__SDT_COND_SIGNED(volatile char, char)
|
||||
+__SDT_COND_SIGNED(volatile wchar_t, wchar_t)
|
||||
+__SDT_COND_SIGNED(const char, char)
|
||||
+__SDT_COND_SIGNED(const wchar_t, wchar_t)
|
||||
+__SDT_COND_SIGNED(const volatile char, char)
|
||||
+__SDT_COND_SIGNED(const volatile wchar_t, wchar_t)
|
||||
#if defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
|
||||
/* __SDT_COND_SIGNED(char16_t) */
|
||||
/* __SDT_COND_SIGNED(char32_t) */
|
||||
diff --git a/stap-serverd.cxx b/stap-serverd.cxx
|
||||
index b8f70114c..063c3c587 100644
|
||||
--- a/stap-serverd.cxx
|
||||
+++ b/stap-serverd.cxx
|
||||
@@ -1607,6 +1607,7 @@ generate_mok(string &mok_fingerprint)
|
||||
char tmpdir[PATH_MAX] = { '\0' };
|
||||
string public_cert_path, private_cert_path, destdir;
|
||||
mode_t old_umask;
|
||||
+ int retlen;
|
||||
|
||||
mok_fingerprint.clear ();
|
||||
|
||||
@@ -1631,7 +1632,14 @@ generate_mok(string &mok_fingerprint)
|
||||
}
|
||||
|
||||
// Make a temporary directory to store results in.
|
||||
- snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ());
|
||||
+ retlen = snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ());
|
||||
+ if (retlen < 0 || retlen >= PATH_MAX)
|
||||
+ {
|
||||
+ server_error (_F("Could not create %s name", "temporary directory"));
|
||||
+ tmpdir[0] = '\0';
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
if (mkdtemp (tmpdir) == NULL)
|
||||
{
|
||||
server_error (_F("Could not create temporary directory %s: %s", tmpdir,
|
||||
@@ -1704,6 +1712,7 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri
|
||||
unsigned u;
|
||||
unsigned i;
|
||||
FILE* f;
|
||||
+ int retlen;
|
||||
|
||||
// Save the server version. Do this early, so the client knows what version of the server
|
||||
// it is dealing with, even if the request is not fully completed.
|
||||
@@ -1782,7 +1791,12 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri
|
||||
struct stat st;
|
||||
char *arg;
|
||||
|
||||
- snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i);
|
||||
+ retlen = snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i);
|
||||
+ if (retlen < 0 || retlen >= PATH_MAX)
|
||||
+ {
|
||||
+ server_error (_F("Error creating %s name", "path"));
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
rc = stat(stapargfile, & st);
|
||||
if (rc) break;
|
||||
@@ -1888,7 +1902,15 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri
|
||||
{
|
||||
glob_t globber;
|
||||
char pattern[PATH_MAX];
|
||||
- snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str());
|
||||
+ int retlen;
|
||||
+
|
||||
+ retlen = snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str());
|
||||
+ if (retlen < 0 || retlen >= PATH_MAX)
|
||||
+ {
|
||||
+ server_error (_F("Error creating %s name", "pattern"));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
rc = glob (pattern, GLOB_ERR, NULL, &globber);
|
||||
if (rc)
|
||||
server_error (_F("Unable to find a module in %s", new_staptmpdir.c_str()));
|
||||
@@ -2164,6 +2186,7 @@ handle_connection (void *arg)
|
||||
copy for each connection.*/
|
||||
vector<string> argv;
|
||||
PRInt32 bytesRead;
|
||||
+ int retlen;
|
||||
|
||||
/* Detatch to avoid a memory leak */
|
||||
if(max_threads > 0)
|
||||
@@ -2213,7 +2236,13 @@ handle_connection (void *arg)
|
||||
#endif
|
||||
|
||||
secStatus = SECFailure;
|
||||
- snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp");
|
||||
+ retlen = snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp");
|
||||
+ if (retlen < 0 || retlen >= PATH_MAX)
|
||||
+ {
|
||||
+ server_error (_F("Error creating %s name", "temporary directory"));
|
||||
+ tmpdir[0]=0; /* prevent /bin/rm */
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
rc1 = mkdtemp(tmpdir);
|
||||
if (! rc1)
|
||||
{
|
||||
@@ -2223,9 +2252,20 @@ handle_connection (void *arg)
|
||||
}
|
||||
|
||||
/* Create a temporary files names and directories. */
|
||||
- snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir);
|
||||
+ retlen = snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir);
|
||||
+ if (retlen < 0 || retlen >= PATH_MAX)
|
||||
+ {
|
||||
+ server_error (_F("Error creating %s name", "request.zip path"));
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ retlen = snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir);
|
||||
+ if (retlen < 0 || retlen >= PATH_MAX)
|
||||
+ {
|
||||
+ server_error (_F("Error creating %s name", "request directory path"));
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
|
||||
- snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir);
|
||||
rc = mkdir(requestDirName, 0700);
|
||||
if (rc)
|
||||
{
|
||||
@@ -2233,7 +2273,13 @@ handle_connection (void *arg)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir);
|
||||
+ retlen = snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir);
|
||||
+ if (retlen < 0 || retlen >= PATH_MAX)
|
||||
+ {
|
||||
+ server_error (_F("Error creating %s name", "response directory path"));
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
rc = mkdir(responseDirName, 0700);
|
||||
if (rc)
|
||||
{
|
||||
@@ -2243,7 +2289,12 @@ handle_connection (void *arg)
|
||||
// Set this early, since it gets used for errors to be returned to the client.
|
||||
stapstderr = string(responseDirName) + "/stderr";
|
||||
|
||||
- snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir);
|
||||
+ retlen = snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir);
|
||||
+ if (retlen < 0 || retlen >= PATH_MAX)
|
||||
+ {
|
||||
+ server_error (_F("Error creating %s name", "response.zip path"));
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
|
||||
/* Read data from the socket.
|
||||
* If the user is requesting/requiring authentication, authenticate
|
||||
diff --git a/translate.cxx b/translate.cxx
|
||||
index 1240a80ec..4ade06fdd 100644
|
||||
--- a/translate.cxx
|
||||
+++ b/translate.cxx
|
||||
@@ -7860,7 +7860,7 @@ translate_pass (systemtap_session& s)
|
||||
if (versions.size() >= 3 && s.verbose > 1)
|
||||
clog << _F("ignoring extra parts of compat version: %s", s.compatible.c_str()) << endl;
|
||||
}
|
||||
- catch (const runtime_error)
|
||||
+ catch (const runtime_error&)
|
||||
{
|
||||
throw SEMANTIC_ERROR(_F("parse error in compatibility version: %s", s.compatible.c_str()));
|
||||
}
|
||||
273
rhbz1546563.patch
Normal file
273
rhbz1546563.patch
Normal file
|
|
@ -0,0 +1,273 @@
|
|||
From fbb26e17a4c026f05a497fc5d584516bad3b6950 Mon Sep 17 00:00:00 2001
|
||||
From: David Smith <dsmith@redhat.com>
|
||||
Date: Wed, 6 Dec 2017 14:37:42 -0600
|
||||
Subject: [PATCH] Fix PR22551 by updating the use of timers for the 4.15
|
||||
kernel.
|
||||
|
||||
* runtime/linux/timer_compatibility.h: New file.
|
||||
* runtime/time.c: Update timer callback function parameter type. Update
|
||||
timer initialization.
|
||||
* runtime/transport/relay_v2.c: Ditto.
|
||||
* runtime/transport/transport.c: Ditto.
|
||||
* tapset-timers.cxx (timer_derived_probe_group::emit_module_decls):
|
||||
Ditto. Handle old and new timer callback interface.
|
||||
* runtime/linux/runtime.h: Include timer_compatibility.h instead of timer.h.
|
||||
* tapset/linux/scsi.stp: Ditto.
|
||||
---
|
||||
runtime/linux/runtime.h | 2 +-
|
||||
runtime/linux/timer_compatibility.h | 76 +++++++++++++++++++++++++++++++++++++
|
||||
runtime/time.c | 7 ++--
|
||||
runtime/transport/relay_v2.c | 8 ++--
|
||||
runtime/transport/transport.c | 13 +++----
|
||||
tapset-timers.cxx | 14 +++++--
|
||||
tapset/linux/scsi.stp | 2 +-
|
||||
7 files changed, 100 insertions(+), 22 deletions(-)
|
||||
create mode 100644 runtime/linux/timer_compatibility.h
|
||||
|
||||
diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h
|
||||
index 9c585a2..df9b74c 100644
|
||||
--- a/runtime/linux/runtime.h
|
||||
+++ b/runtime/linux/runtime.h
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <linux/compat.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
-#include <linux/timer.h>
|
||||
+#include "timer_compatibility.h"
|
||||
#include <linux/delay.h>
|
||||
#include <linux/profile.h>
|
||||
#include <linux/rcupdate.h>
|
||||
diff --git a/runtime/linux/timer_compatibility.h b/runtime/linux/timer_compatibility.h
|
||||
new file mode 100644
|
||||
index 0000000..ac03de9
|
||||
--- /dev/null
|
||||
+++ b/runtime/linux/timer_compatibility.h
|
||||
@@ -0,0 +1,76 @@
|
||||
+/*
|
||||
+ * linux/timer.h compatibility defines and inlines
|
||||
+ * Copyright (C) 2017 Red Hat Inc.
|
||||
+ *
|
||||
+ * This file is part of systemtap, and is free software. You can
|
||||
+ * redistribute it and/or modify it under the terms of the GNU General
|
||||
+ * Public License (GPL); either version 2, or (at your option) any
|
||||
+ * later version.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _TIMER_COMPATIBILITY_H_
|
||||
+#define _TIMER_COMPATIBILITY_H_
|
||||
+
|
||||
+#include <linux/timer.h>
|
||||
+
|
||||
+/*
|
||||
+ * Starting with the 4.15 kernel, the timer interface
|
||||
+ * changed. Originally, you'd do something like:
|
||||
+ *
|
||||
+ * static void timer_func(unsigned long val);
|
||||
+ *
|
||||
+ * init_timer(&timer);
|
||||
+ * timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
|
||||
+ * timer.function = timer_func;
|
||||
+ * timer.data = 0;
|
||||
+ * add_timer(&timer);
|
||||
+ *
|
||||
+ * The 'data' parameter would get passed to the callback
|
||||
+ * function. Starting with 4.15, you'd do something like this:
|
||||
+ *
|
||||
+ * static void timer_func(struct timer_list *val);
|
||||
+ *
|
||||
+ * timer_setup(&timer, timer_func, 0);
|
||||
+ * timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
|
||||
+ * add_timer(&timer);
|
||||
+ *
|
||||
+ * With the new code, the timer that caused the callback gets passed
|
||||
+ * to the timer callback function. The 'data' field has been removed.
|
||||
+ *
|
||||
+ * So, we're going to use the new interface. To hide the differences
|
||||
+ * between the callback function parameter type, we'll define a new
|
||||
+ * type, 'stp_timer_callback_parameter_t'.
|
||||
+ *
|
||||
+ * If code needs to figure out the difference between the old and new
|
||||
+ * interface, it should test the TIMER_TRACE_FLAGMASK define (which
|
||||
+ * only exists in the new interface).
|
||||
+ */
|
||||
+
|
||||
+#if defined(TIMER_TRACE_FLAGMASK)
|
||||
+/* This is the >= 4.15 kernel interface. */
|
||||
+
|
||||
+typedef struct timer_list * stp_timer_callback_parameter_t;
|
||||
+
|
||||
+#else
|
||||
+/* This is the < 4.15 kernel interface. */
|
||||
+
|
||||
+typedef unsigned long stp_timer_callback_parameter_t;
|
||||
+
|
||||
+/**
|
||||
+ * timer_setup - prepare a timer for first use
|
||||
+ * @timer: the timer in question
|
||||
+ * @callback: the function to call when timer expires
|
||||
+ * @flags: any TIMER_* flags (note that anything other than 0 is an
|
||||
+ * error, since this compatibility function can't support any
|
||||
+ * of the TIMER_* flags)
|
||||
+ */
|
||||
+#define timer_setup(timer, callback, flags) \
|
||||
+ { \
|
||||
+ init_timer((timer)); \
|
||||
+ (timer)->function = callback; \
|
||||
+ (timer)->data = 0; \
|
||||
+ BUILD_BUG_ON_ZERO((flags) != 0); \
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+#endif /* _TIMER_COMPATIBILITY_H_ */
|
||||
diff --git a/runtime/time.c b/runtime/time.c
|
||||
index 2e666d5..91ceafa 100644
|
||||
--- a/runtime/time.c
|
||||
+++ b/runtime/time.c
|
||||
@@ -168,10 +168,10 @@ __stp_time_smp_callback(void *val)
|
||||
|
||||
/* The timer callback is in a softIRQ -- interrupts enabled. */
|
||||
static void
|
||||
-__stp_time_timer_callback(unsigned long val)
|
||||
+__stp_time_timer_callback(stp_timer_callback_parameter_t unused)
|
||||
{
|
||||
stp_time_t *time =__stp_time_local_update();
|
||||
- (void) val;
|
||||
+ (void) unused;
|
||||
|
||||
/* PR6481: make sure IRQs are enabled before resetting the timer
|
||||
(IRQs are disabled and then reenabled in
|
||||
@@ -200,9 +200,8 @@ __stp_init_time(void *info)
|
||||
time->freq = __stp_get_freq();
|
||||
__stp_time_local_update();
|
||||
|
||||
- init_timer(&time->timer);
|
||||
+ timer_setup(&time->timer, __stp_time_timer_callback, 0);
|
||||
time->timer.expires = jiffies + STP_TIME_SYNC_INTERVAL;
|
||||
- time->timer.function = __stp_time_timer_callback;
|
||||
|
||||
#ifndef STAPCONF_ADD_TIMER_ON
|
||||
add_timer(&time->timer);
|
||||
diff --git a/runtime/transport/relay_v2.c b/runtime/transport/relay_v2.c
|
||||
index f81d75d..135951a 100644
|
||||
--- a/runtime/transport/relay_v2.c
|
||||
+++ b/runtime/transport/relay_v2.c
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/relay.h>
|
||||
-#include <linux/timer.h>
|
||||
+#include "../linux/timer_compatibility.h"
|
||||
#include "../uidgid_compatibility.h"
|
||||
#include "relay_compat.h"
|
||||
|
||||
@@ -120,7 +120,7 @@ static void __stp_relay_wakeup_readers(struct rchan_buf *buf)
|
||||
wake_up_interruptible(&buf->read_wait);
|
||||
}
|
||||
|
||||
-static void __stp_relay_wakeup_timer(unsigned long val)
|
||||
+static void __stp_relay_wakeup_timer(stp_timer_callback_parameter_t unused)
|
||||
{
|
||||
#ifdef STP_BULKMODE
|
||||
int i;
|
||||
@@ -151,10 +151,8 @@ static void __stp_relay_wakeup_timer(unsigned long val)
|
||||
static void __stp_relay_timer_init(void)
|
||||
{
|
||||
atomic_set(&_stp_relay_data.wakeup, 0);
|
||||
- init_timer(&_stp_relay_data.timer);
|
||||
+ timer_setup(&_stp_relay_data.timer, __stp_relay_wakeup_timer, 0);
|
||||
_stp_relay_data.timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
|
||||
- _stp_relay_data.timer.function = __stp_relay_wakeup_timer;
|
||||
- _stp_relay_data.timer.data = 0;
|
||||
add_timer(&_stp_relay_data.timer);
|
||||
smp_mb();
|
||||
}
|
||||
diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
|
||||
index 3400f22..320fd18 100644
|
||||
--- a/runtime/transport/transport.c
|
||||
+++ b/runtime/transport/transport.c
|
||||
@@ -311,7 +311,7 @@ static void _stp_detach(void)
|
||||
}
|
||||
|
||||
|
||||
-static void _stp_ctl_work_callback(unsigned long val);
|
||||
+static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused);
|
||||
|
||||
/*
|
||||
* Called when stapio opens the control channel.
|
||||
@@ -320,13 +320,12 @@ static void _stp_attach(void)
|
||||
{
|
||||
dbug_trans(1, "attach\n");
|
||||
_stp_pid = current->pid;
|
||||
- if (_stp_namespaces_pid < 1)
|
||||
- _stp_namespaces_pid = _stp_pid;
|
||||
+ if (_stp_namespaces_pid < 1)
|
||||
+ _stp_namespaces_pid = _stp_pid;
|
||||
_stp_transport_data_fs_overwrite(0);
|
||||
- init_timer(&_stp_ctl_work_timer);
|
||||
+
|
||||
+ timer_setup(&_stp_ctl_work_timer, _stp_ctl_work_callback, 0);
|
||||
_stp_ctl_work_timer.expires = jiffies + STP_CTL_TIMER_INTERVAL;
|
||||
- _stp_ctl_work_timer.function = _stp_ctl_work_callback;
|
||||
- _stp_ctl_work_timer.data= 0;
|
||||
add_timer(&_stp_ctl_work_timer);
|
||||
}
|
||||
|
||||
@@ -341,7 +340,7 @@ static void _stp_attach(void)
|
||||
* notified. Reschedules itself if someone is still attached
|
||||
* to the cmd channel.
|
||||
*/
|
||||
-static void _stp_ctl_work_callback(unsigned long val)
|
||||
+static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused)
|
||||
{
|
||||
int do_io = 0;
|
||||
unsigned long flags;
|
||||
diff --git a/tapset-timers.cxx b/tapset-timers.cxx
|
||||
index 1a40bcd..0ab4d69 100644
|
||||
--- a/tapset-timers.cxx
|
||||
+++ b/tapset-timers.cxx
|
||||
@@ -122,9 +122,13 @@ timer_derived_probe_group::emit_module_decls (systemtap_session& s)
|
||||
s.op->newline(-1) << "};";
|
||||
s.op->newline();
|
||||
|
||||
- s.op->newline() << "static void enter_timer_probe (unsigned long val) {";
|
||||
+ s.op->newline() << "static void enter_timer_probe (stp_timer_callback_parameter_t val) {";
|
||||
+ s.op->newline() << "#if defined(TIMER_TRACE_FLAGMASK)";
|
||||
+ s.op->newline(1) << "struct stap_timer_probe* stp = container_of(val, struct stap_timer_probe, timer_list);";
|
||||
+ s.op->newline(-1) << "#else";
|
||||
s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [val];";
|
||||
- s.op->newline() << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||";
|
||||
+ s.op->newline(-1) << "#endif";
|
||||
+ s.op->newline(1) << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||";
|
||||
s.op->newline() << " (atomic_read (session_state()) == STAP_SESSION_RUNNING))";
|
||||
s.op->newline(1) << "mod_timer (& stp->timer_list, jiffies + ";
|
||||
emit_interval (s.op);
|
||||
@@ -148,9 +152,11 @@ timer_derived_probe_group::emit_module_init (systemtap_session& s)
|
||||
s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
|
||||
s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [i];";
|
||||
s.op->newline() << "probe_point = stp->probe->pp;";
|
||||
- s.op->newline() << "init_timer (& stp->timer_list);";
|
||||
- s.op->newline() << "stp->timer_list.function = & enter_timer_probe;";
|
||||
+
|
||||
+ s.op->newline() << "timer_setup (& stp->timer_list, enter_timer_probe, 0);";
|
||||
+ s.op->newline() << "#if !defined(TIMER_TRACE_FLAGMASK)";
|
||||
s.op->newline() << "stp->timer_list.data = i;"; // NB: important!
|
||||
+ s.op->newline() << "#endif";
|
||||
// copy timer renew calculations from above :-(
|
||||
s.op->newline() << "stp->timer_list.expires = jiffies + ";
|
||||
emit_interval (s.op);
|
||||
diff --git a/tapset/linux/scsi.stp b/tapset/linux/scsi.stp
|
||||
index 44f686c..3577942 100644
|
||||
--- a/tapset/linux/scsi.stp
|
||||
+++ b/tapset/linux/scsi.stp
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <scsi/scsi_cmnd.h>
|
||||
#include <scsi/scsi_device.h>
|
||||
#include <scsi/scsi_host.h>
|
||||
-#include <linux/timer.h>
|
||||
+#include "linux/timer_compatibility.h"
|
||||
#include <linux/blkdev.h>
|
||||
%}
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
|
||||
|
||||
# exclude ownership tests; we need setuid/gids as is
|
||||
ownership:
|
||||
ignore:
|
||||
- /usr/bin/staprun
|
||||
|
||||
# this SO is for JNI only, so annobin/etc. don't know what to do with it
|
||||
annocheck:
|
||||
ignore:
|
||||
- /usr/libexec/systemtap/libHelperSDT.so
|
||||
|
||||
# bytecode version 43 vs 55 complaint is a misconfiguration according to msrb
|
||||
javabytecode:
|
||||
ignore:
|
||||
- /usr/libexec/systemtap/HelperSDT.jar
|
||||
|
||||
# setuid binary
|
||||
permissions:
|
||||
ignore:
|
||||
- /usr/bin/staprun
|
||||
|
||||
# some stap scripts are wrapped within /bin/sh that confuses rpminspect
|
||||
shellsyntax:
|
||||
ignore:
|
||||
- *.stp
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (systemtap-5.4.tar.gz) = 5869fe3735e44be65ba7895a46b4ea66fcdcc21ed2ab0673c62d822730553837f816d82fd78eeca4bfe6f17fdeaa12eb2f94c0b0b7ebb8c495c961f0b6935785
|
||||
SHA512 (systemtap-3.2.tar.gz) = 6036ed1b5189fd3fcfdeeaa526a3539ac632d0b687a063b5e3424e8f613bfc2c8d079742b0262b547128e97e30e4beb61898b23761657aee519e61346ac92e94
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
--- systemtap-5.4/configure~ 2025-10-30 14:47:35.000000000 +0000
|
||||
+++ systemtap-5.4/configure 2026-01-13 18:53:20.466037572 +0000
|
||||
@@ -3121,8 +3121,8 @@
|
||||
}
|
||||
{
|
||||
// Unicode literals
|
||||
- char const *utf8 = u8"UTF-8 string \u2500";
|
||||
- char16_t const *utf16 = u"UTF-8 string \u2500";
|
||||
+ auto const *utf8 = u8"UTF-8 string \u2500";
|
||||
+ char16_t const *utf16 = u"UTF-16 string \u2500";
|
||||
char32_t const *utf32 = U"UTF-32 string \u2500";
|
||||
}
|
||||
'
|
||||
799
systemtap.spec
799
systemtap.spec
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue