Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rasdaemon for openSUSE:Factory 
checked in at 2025-05-02 15:01:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rasdaemon (Old)
 and      /work/SRC/openSUSE:Factory/.rasdaemon.new.30101 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rasdaemon"

Fri May  2 15:01:28 2025 rev:26 rq:1273990 version:0.8.3.0.git+db0870e

Changes:
--------
--- /work/SRC/openSUSE:Factory/rasdaemon/rasdaemon.changes      2025-04-28 
16:18:30.294611155 +0200
+++ /work/SRC/openSUSE:Factory/.rasdaemon.new.30101/rasdaemon.changes   
2025-05-02 15:03:43.792882469 +0200
@@ -1,0 +2,8 @@
+Wed Apr 30 09:17:13 UTC 2025 - Thomas Renninger <tr...@suse.de>
+
+- Avoid daemon start-up delays by checking whether events are accessible
+  in sysfs before adding event handlers (bsc#1241567)
+A rasdaemon-skip-doesn-t-exist-event.patch
+  
+
+-------------------------------------------------------------------

New:
----
  rasdaemon-skip-doesn-t-exist-event.patch

BETA DEBUG BEGIN:
  New:  in sysfs before adding event handlers (bsc#1241567)
A rasdaemon-skip-doesn-t-exist-event.patch
  
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rasdaemon.spec ++++++
--- /var/tmp/diff_new_pack.ctRwSQ/_old  2025-05-02 15:03:44.400908161 +0200
+++ /var/tmp/diff_new_pack.ctRwSQ/_new  2025-05-02 15:03:44.404908331 +0200
@@ -25,6 +25,7 @@
 URL:            http://git.infradead.org/users/mchehab/rasdaemon.git
 Source:         %{name}-%{version}.tar.xz
 Patch1:         Fix-buffer-overflow-in-add_event_handler-read.patch
+Patch2:         rasdaemon-skip-doesn-t-exist-event.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  gettext-devel

++++++ rasdaemon-skip-doesn-t-exist-event.patch ++++++
From: Ruidong Tian <tianruid...@linux.alibaba.com>
Subject: rasdaemon: skip doesn't exist event
References: jsc#1241567
Patch-Mainline: 
Git-commit: 3615602544e47240ddb5784342ed51ea14213ca9


When compiling rasdaemon with the --enable-all configuration flag,
the system may detect unsupported hardware events - for instance,
ARM-specific events on x86 architectures. This causes the program
to enter a busy-wait loop in the wait_access function. A better
approach would be to explicitly skip these architecture-mismatched
events during initialization.

Signed-off-by: Ruidong Tian <tianruid...@linux.alibaba.com>


Signed-off-by:  <tr...@suse.de>
diff --git a/ras-events.c b/ras-events.c
index c7ee801..46ae519 100644
--- a/ras-events.c
+++ b/ras-events.c
@@ -821,6 +821,18 @@ static int select_tracing_timestamp(struct ras_events *ras)
        return 0;
 }
 
+static bool check_event_exist(struct ras_events *ras, char *group, char *event)
+{
+       char fname[MAX_PATH + 256];
+
+       snprintf(fname, sizeof(fname), "%s/tracing/events/%s/%s",
+                ras->debugfs, group, event);
+       if (access(fname, F_OK) == 0)
+               return true;
+
+       return false;
+}
+
 #define EVENT_DISABLED 1
 
 static int add_event_handler(struct ras_events *ras, struct tep_handle *pevent,
@@ -832,6 +844,12 @@ static int add_event_handler(struct ras_events *ras, 
struct tep_handle *pevent,
        char *page, fname[MAX_PATH + 1];
        struct tep_event_filter *filter = NULL;
 
+       if (!check_event_exist(ras, group, event)) {
+               log(ALL, LOG_WARNING, "%s:%s event not exist\n",
+                   group, event);
+               return -EINVAL;
+       }
+
        snprintf(fname, sizeof(fname), "events/%s/%s/format", group, event);
 
        fd = open_trace(ras, fname, O_RDONLY);

Reply via email to