Update to version 0.30

Signed-off-by: Michal Fabik <mfabik@redhat.com>
This commit is contained in:
Michal Fabik 2020-02-06 11:11:24 +01:00
parent 064381a640
commit 722007b3c3
5 changed files with 11 additions and 424 deletions

1
.gitignore vendored
View File

@ -25,3 +25,4 @@
/satyr-0.27.tar.xz
/satyr-0.28.tar.xz
/satyr-0.29.tar.gz
/satyr-0.30.tar.gz

View File

@ -1,113 +0,0 @@
From c9f7d3c5b5e4cc546c2c940a1f28e68045cfcf24 Mon Sep 17 00:00:00 2001
From: Ernestas Kulik <ekulik@redhat.com>
Date: Wed, 30 Oct 2019 17:47:53 +0100
Subject: [PATCH] =?UTF-8?q?lib:=20koops=5Fstacktrace:=20Don=E2=80=99t=20pa?=
=?UTF-8?q?rse=20register=20as=20module?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As can be seen at [1], the kernel might also spill the value of CR2
*after* the list of modules. This commit adds a check for it to avoid
parsing a register as a module.
[1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/x86/mm/fault.c?id=8e998fc24de47c55b47a887f6c95ab91acd4a720#n824
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1518943
Signed-off-by: Ernestas Kulik <ekulik@redhat.com>
---
lib/koops_stacktrace.c | 7 +++++
tests/kerneloopses/rhbz-1518943 | 49 +++++++++++++++++++++++++++++++++
tests/koops_stacktrace.at | 1 +
3 files changed, 57 insertions(+)
create mode 100644 tests/kerneloopses/rhbz-1518943
diff --git a/lib/koops_stacktrace.c b/lib/koops_stacktrace.c
index 638df0c..a36d80a 100644
--- a/lib/koops_stacktrace.c
+++ b/lib/koops_stacktrace.c
@@ -434,6 +434,13 @@ module_list_continues(const char *input)
sr_skip_char_span(&input, "0123456789"))
return false;
+ /* CR2 can also be spilled at the end:
+ * https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/x86/mm/fault.c?id=8e998fc24de47c55b47a887f6c95ab91acd4a720#n824
+ */
+ if (sr_skip_string(&input, "CR2: ") &&
+ sr_skip_hexadecimal_uint(&input))
+ return false;
+
/* Other conditions may need to be added */
return true;
diff --git a/tests/kerneloopses/rhbz-1518943 b/tests/kerneloopses/rhbz-1518943
new file mode 100644
index 0000000..40be71a
--- /dev/null
+++ b/tests/kerneloopses/rhbz-1518943
@@ -0,0 +1,49 @@
+BUG: kernel NULL pointer dereference, address: 0000000000000008
+#PF: supervisor read access in kernel mode
+#PF: error_code(0x0000) - not-present page
+PGD 0 P4D 0
+Oops: 0000 [#1] SMP NOPTI
+CPU: 1 PID: 1
+88243 Comm: QSGRenderThread Not tainted 5.3.6-300.fc31.x86_64 #1
+Hardware name: System manufacturer System Product Name/TUF B450-PRO GAMING, BIOS 1816 09/02/2019
+RIP: 0010:amdgpu_vm_sdma_commit+0x46/0x120 [amdgpu]
+Code: 18 65 48 8b 04 2
+5 28 00 00 00 48 89 44 24 08 31 c0 48 8b 47 08 4c 8b a2 88 01 00 00 4c 8b a8 80 00 00 00 48 8b 80 c8 00 00 00 <4c> 8b 70 08 41 8b 44 24 08 4d 8d 7e 88 85 c0 0f 84 37 f9 1e 00 49
+RSP: 0018:ffffad85491579a8 EFLAGS: 00010246
+RAX: 0000000000000000 RBX: ffffad8549157b40 RCX: 0000000002888000
+RDX: ffff9caeb3c21400 RSI: 0000000000000000 RDI: ffffad8549157b40
+RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000001000
+R10: 00000000000000eb R11: 00000000000000e9 R12: ffff9caeb3c215f8
+R13: ffff9cae0e1ba800 R14: ffffad8549157b40 R15: 0000000000000000
+FS: 00007fd17b7fe700(0000) GS:ffff9caebe640000(0000) knlGS:0000000000000000
+CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+CR2: 0000000000000008 CR3: 000000064e8e8000 CR4: 0000000000340ee0
+Call Trace:
+ amdgpu_vm_sdma_update+0x17d/0x240 [amdgpu]
+ ? amdgpu_vm_num_entries+0x1e/0x70 [amdgpu]
+ amdgpu_vm_update_ptes+0x385/0x6b0 [amdgpu]
+ amdgpu_vm_bo_update_mapping+0xb3/0xe0 [amdgpu]
+ amdgpu_vm_clear_freed+0xcf/0x1a0 [amdgpu]
+ amdgpu_gem_va_ioctl+0x42c/0x550 [amdgpu]
+ ? amdgpu_gem_metadata_ioctl+0x190/0x190 [amdgpu]
+ drm_ioctl_kernel+0xaa/0xf0 [drm]
+ drm_ioctl+0x208/0x390 [drm]
+ ? amdgpu_gem_metadata_ioctl+0x190/0x190 [amdgpu]
+ ? pollwake+0x74/0x90
+ amdgpu_drm_ioctl+0x49/0x80 [amdgpu]
+ do_vfs_ioctl+0x405/0x660
+ ksys_ioctl+0x5e/0x90
+ __x64_sys_ioctl+0x16/0x20
+ do_syscall_64+0x5f/0x1a0
+ entry_SYSCALL_64_after_hwframe+0x44/0xa9
+RIP: 0033:0x7fd1f18192fb
+Code: 0f 1e fa 48 8b 05 8d 9b 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5d 9b 0c 00 f7 d8 64 89 01 48
+RSP: 002b:00007fd17b7fd798 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
+RAX: ffffffffffffffda RBX: 00007fd17b7fd7e0 RCX: 00007fd1f18192fb
+RDX: 00007fd17b7fd7e0 RSI: 00000000c0286448 RDI: 000000000000000b
+RBP: 00000000c0286448 R08: 0000000103c00000 R09: 000000000000000e
+R10: 000000000000000c R11: 0000000000000246 R12: 0000000000000000
+R13: 000000000000000b R14: 0000000000000002 R15: 00005653a61e5a40
+Modules linked in: fuse ip6t_REJECT nf_reject_ipv6 ip6t_rpfilter ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ebtable_broute ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter sunrpc vfat fat squashfs zstd_decompress loop edac_mce_amd kvm_amd snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep kvm snd_seq snd_seq_device irqbypass snd_pcm eeepc_wmi asus_wmi sparse_keymap snd_timer rfkill crct10dif_pclmul raid1 crc32_pclmul joydev video snd wmi_bmof ghash_clmulni_intel sp5100_tco k10temp ccp i2c_piix4 soundcore gpio_amdpt gpio_generic acpi_cpufreq binfmt_misc ip_tables hid_logitech_hidpp amdgpu amd_iommu_v2 gpu_sched i2c_algo_bit ttm drm_kms_helper drm uas crc32c_intel r8169 usb_storage hid_logitech_dj wmi
+ pinctrl_amd
+CR2: 0000000000000008
diff --git a/tests/koops_stacktrace.at b/tests/koops_stacktrace.at
index fad3f34..ef8058d 100644
--- a/tests/koops_stacktrace.at
+++ b/tests/koops_stacktrace.at
@@ -259,6 +259,7 @@ main(void)
check("../../kerneloopses/arm-hung-task-oops", "dump_backtrace_log_lvl", "kthread", 6, 2, 0, NULL, NULL);
check("../../kerneloopses/arm-hung-task-oops-2", "shmem_getpage_gfp", "SyS_write", 7, 0, 53, NULL, NULL);
+ check("../../kerneloopses/rhbz-1518943", "amdgpu_vm_sdma_update", "entry_SYSCALL_64_after_hwframe", 17, 0, 87, NULL, NULL);
return 0;
}
--
2.23.0

View File

@ -1,294 +0,0 @@
From 0af82291c7c80cc0a1b486882242774211e5d8d4 Mon Sep 17 00:00:00 2001
From: Michal Fabik <mfabik@redhat.com>
Date: Tue, 28 Jan 2020 08:59:36 +0100
Subject: [PATCH] Fix build failure with gcc -fno-common
Definitions of the extern symbols are found in the existing versions of the corresponding .c files.
Signed-off-by: Michal Fabik <mfabik@redhat.com>
---
python/py_core_frame.h | 2 +-
python/py_core_stacktrace.h | 2 +-
python/py_core_thread.h | 2 +-
python/py_gdb_frame.h | 2 +-
python/py_gdb_stacktrace.h | 2 +-
python/py_gdb_thread.h | 2 +-
python/py_java_frame.h | 2 +-
python/py_java_stacktrace.h | 2 +-
python/py_java_thread.h | 2 +-
python/py_js_frame.h | 2 +-
python/py_js_stacktrace.h | 2 +-
python/py_koops_frame.h | 2 +-
python/py_koops_stacktrace.h | 2 +-
python/py_operating_system.h | 2 +-
python/py_python_frame.h | 2 +-
python/py_python_stacktrace.h | 2 +-
python/py_report.h | 2 +-
python/py_rpm_package.h | 2 +-
python/py_ruby_frame.h | 2 +-
python/py_ruby_stacktrace.h | 2 +-
20 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/python/py_core_frame.h b/python/py_core_frame.h
index dc4a3a2..bc002e6 100644
--- a/python/py_core_frame.h
+++ b/python/py_core_frame.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_core_frame_type;
+extern PyTypeObject sr_py_core_frame_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_frame.
diff --git a/python/py_core_stacktrace.h b/python/py_core_stacktrace.h
index f458a23..6d91e40 100644
--- a/python/py_core_stacktrace.h
+++ b/python/py_core_stacktrace.h
@@ -35,7 +35,7 @@ extern "C" {
struct sr_py_core_frame;
struct sr_py_core_thread;
-PyTypeObject sr_py_core_stacktrace_type;
+extern PyTypeObject sr_py_core_stacktrace_type;
/* The beginning of this structure has to have the same layout as
* sr_py_multi_thread_stacktrace.
diff --git a/python/py_core_thread.h b/python/py_core_thread.h
index 2890ff1..c400fb0 100644
--- a/python/py_core_thread.h
+++ b/python/py_core_thread.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_core_thread_type;
+extern PyTypeObject sr_py_core_thread_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_thread.
diff --git a/python/py_gdb_frame.h b/python/py_gdb_frame.h
index a5f6911..64d49b2 100644
--- a/python/py_gdb_frame.h
+++ b/python/py_gdb_frame.h
@@ -33,7 +33,7 @@ extern "C" {
#include <structmember.h>
#include "gdb/frame.h"
-PyTypeObject sr_py_gdb_frame_type;
+extern PyTypeObject sr_py_gdb_frame_type;
typedef sr_gdb_frame_address_t sr_py_gdb_frame_address_t;
diff --git a/python/py_gdb_stacktrace.h b/python/py_gdb_stacktrace.h
index f5a1765..6c977be 100644
--- a/python/py_gdb_stacktrace.h
+++ b/python/py_gdb_stacktrace.h
@@ -35,7 +35,7 @@ extern "C" {
struct sr_py_gdb_frame;
struct sr_py_gdb_thread;
-PyTypeObject sr_py_gdb_stacktrace_type;
+extern PyTypeObject sr_py_gdb_stacktrace_type;
/* The beginning of this structure has to have the same layout as
* sr_py_multi_thread_stacktrace.
diff --git a/python/py_gdb_thread.h b/python/py_gdb_thread.h
index 39d5163..f518fd8 100644
--- a/python/py_gdb_thread.h
+++ b/python/py_gdb_thread.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_gdb_thread_type;
+extern PyTypeObject sr_py_gdb_thread_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_thread.
diff --git a/python/py_java_frame.h b/python/py_java_frame.h
index 9f30eb5..ce77cd2 100644
--- a/python/py_java_frame.h
+++ b/python/py_java_frame.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_java_frame_type;
+extern PyTypeObject sr_py_java_frame_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_frame.
diff --git a/python/py_java_stacktrace.h b/python/py_java_stacktrace.h
index 9cbe80a..1ddf412 100644
--- a/python/py_java_stacktrace.h
+++ b/python/py_java_stacktrace.h
@@ -35,7 +35,7 @@ extern "C" {
struct sr_py_java_frame;
struct sr_py_java_thread;
-PyTypeObject sr_py_java_stacktrace_type;
+extern PyTypeObject sr_py_java_stacktrace_type;
/* The beginning of this structure has to have the same layout as
* sr_py_multi_thread_stacktrace.
diff --git a/python/py_java_thread.h b/python/py_java_thread.h
index 0abe8bc..d95438f 100644
--- a/python/py_java_thread.h
+++ b/python/py_java_thread.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_java_thread_type;
+extern PyTypeObject sr_py_java_thread_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_thread.
diff --git a/python/py_js_frame.h b/python/py_js_frame.h
index 4374f17..8ce154e 100644
--- a/python/py_js_frame.h
+++ b/python/py_js_frame.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_js_frame_type;
+extern PyTypeObject sr_py_js_frame_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_frame.
diff --git a/python/py_js_stacktrace.h b/python/py_js_stacktrace.h
index 4c24476..14f6c36 100644
--- a/python/py_js_stacktrace.h
+++ b/python/py_js_stacktrace.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_js_stacktrace_type;
+extern PyTypeObject sr_py_js_stacktrace_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_thread.
diff --git a/python/py_koops_frame.h b/python/py_koops_frame.h
index 81174de..7d658d7 100644
--- a/python/py_koops_frame.h
+++ b/python/py_koops_frame.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_koops_frame_type;
+extern PyTypeObject sr_py_koops_frame_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_frame.
diff --git a/python/py_koops_stacktrace.h b/python/py_koops_stacktrace.h
index e72ab54..bea12c9 100644
--- a/python/py_koops_stacktrace.h
+++ b/python/py_koops_stacktrace.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_koops_stacktrace_type;
+extern PyTypeObject sr_py_koops_stacktrace_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_thread.
diff --git a/python/py_operating_system.h b/python/py_operating_system.h
index bcd8e7f..dbfa024 100644
--- a/python/py_operating_system.h
+++ b/python/py_operating_system.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_operating_system_type;
+extern PyTypeObject sr_py_operating_system_type;
struct sr_py_operating_system
{
diff --git a/python/py_python_frame.h b/python/py_python_frame.h
index 6b4b63f..6cdde88 100644
--- a/python/py_python_frame.h
+++ b/python/py_python_frame.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_python_frame_type;
+extern PyTypeObject sr_py_python_frame_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_frame.
diff --git a/python/py_python_stacktrace.h b/python/py_python_stacktrace.h
index a89ad8f..fff51c4 100644
--- a/python/py_python_stacktrace.h
+++ b/python/py_python_stacktrace.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_python_stacktrace_type;
+extern PyTypeObject sr_py_python_stacktrace_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_thread.
diff --git a/python/py_report.h b/python/py_report.h
index 88ec30f..2c5bb8d 100644
--- a/python/py_report.h
+++ b/python/py_report.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_report_type;
+extern PyTypeObject sr_py_report_type;
struct sr_py_report
{
diff --git a/python/py_rpm_package.h b/python/py_rpm_package.h
index 0a00d8d..363acd6 100644
--- a/python/py_rpm_package.h
+++ b/python/py_rpm_package.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_rpm_package_type;
+extern PyTypeObject sr_py_rpm_package_type;
struct sr_py_rpm_package
{
diff --git a/python/py_ruby_frame.h b/python/py_ruby_frame.h
index 7f460ff..e7aa568 100644
--- a/python/py_ruby_frame.h
+++ b/python/py_ruby_frame.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_ruby_frame_type;
+extern PyTypeObject sr_py_ruby_frame_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_frame.
diff --git a/python/py_ruby_stacktrace.h b/python/py_ruby_stacktrace.h
index f4eebce..59d866b 100644
--- a/python/py_ruby_stacktrace.h
+++ b/python/py_ruby_stacktrace.h
@@ -32,7 +32,7 @@ extern "C" {
#include <Python.h>
#include <structmember.h>
-PyTypeObject sr_py_ruby_stacktrace_type;
+extern PyTypeObject sr_py_ruby_stacktrace_type;
/* The beginning of this structure has to have the same layout as
* sr_py_base_thread.
--
2.24.1

View File

@ -14,8 +14,8 @@
%endif
Name: satyr
Version: 0.29
Release: 3%{?dist}
Version: 0.30
Release: 1%{?dist}
Summary: Tools to create anonymous, machine-friendly problem reports
License: GPLv2+
URL: https://github.com/abrt/satyr
@ -34,19 +34,13 @@ BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: gdb
BuildRequires: gperf
BuildRequires: nettle-devel
BuildRequires: pkgconfig(json-c)
%if %{with python3}
BuildRequires: python3-sphinx
%endif # with python3
Requires: json-c
# git is need for '%%autosetup -S git' which automatically applies all the
# patches above. Please, be aware that the patches must be generated
# by 'git format-patch'
BuildRequires: git
Patch0: 0001-lib-koops_stacktrace-Don-t-parse-register-as-module.patch
Patch1: 0002-Fix-build-failure-with-gcc-fno-common.patch
Requires: nettle
%description
Satyr is a library that can be used to create and process microreports.
@ -75,12 +69,7 @@ Python 3 bindings for %{name}.
%endif # if with python3
%prep
# http://www.rpm.org/wiki/PackagerDocs/Autosetup
# Default '__scm_apply_git' is 'git apply && git commit' but this workflow
# doesn't allow us to create a new file within a patch, so we have to use
# 'git am' (see /usr/lib/rpm/macros for more details)
%define __scm_apply_git(qp:m:) %{__git} am
%autosetup -S git
%setup -q
%build
%configure \
@ -134,6 +123,10 @@ make check|| {
%endif
%changelog
* Thu Feb 06 2020 Michal Fabik <mfabik@redhat.com> - 0.30-1
- Fix registers being parsed as modules in kernel oopses in some cases
- Use Nettle for cryptographic calculations
* Thu Jan 30 2020 Martin Kutlak <mkutlak@redhat.com> - 0.29-3
- Add patch to fix build failure with gcc -fno-common
- Resolves: #1796384

View File

@ -1 +1 @@
SHA512 (satyr-0.29.tar.gz) = 8e1622d934f5b70351f46126889a55b83c79446dc4b2015e055dafd66732a484a8f3482bde181fbcee64d173d2a8179f2b74dcca1711a8f0e0fe71ecebaf9a3b
SHA512 (satyr-0.30.tar.gz) = 0cc3475b4b37cab83e6688989483e230ed1ac8846bc971177c5b2a15c36a496076e0743aece8f69713e8caa0588b741fcd91ee88027b3a5ea71e9e0d69e0ed98