lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250414143526.4ab44b28@gandalf.local.home>
Date: Mon, 14 Apr 2025 14:35:26 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Sargun Dhillon <sargun@...gun.me>, linux-kernel@...r.kernel.org,
 linux-edac@...r.kernel.org, "Paul E . McKenney" <paulmck@...nel.org>, Tony
 Luck <tony.luck@...el.com>
Subject: Re: [PATCH v2] trace, RAS: Use __print_symbolic helper for entry
 severity for aer_events

On Mon, 14 Apr 2025 18:33:47 +0200
Borislav Petkov <bp@...en8.de> wrote:

> On Mon, Apr 14, 2025 at 08:38:34AM -0700, Sargun Dhillon wrote:
> > The chained ternary conditional operator in the perf event format for
> > ras:aer_event was causing a misrepresentation of the severity of the event
> > when used with "perf script". Rather than building our own hand-rolled
> > formatting, just use the __print_symbolic helper to format it.
> > 
> > Specifically, all corrected errors were being formatted as non-fatal,
> > uncorrected errors, as shown below with the BAD_TLP errors, which is
> > correctable. This is due to a bug in libtraceevent, where chained
> > ternary conditions are not parsed correctly.  
> 
> So because *some* libtraceevent has a bug, we're wagging the dog, not the
> tail?

Agreed.

If something isn't parsed correctly in libtraceevent, please let me know!

Can you apply this to libtraceevent and see if it fixes your issue:

diff --git a/src/event-parse.c b/src/event-parse.c
index 6317ff6..4a09fcc 100644
--- a/src/event-parse.c
+++ b/src/event-parse.c
@@ -2083,6 +2083,16 @@ process_cond(struct tep_event *event, struct tep_print_arg *top, char **tok)
 
 	type = process_arg(event, right, &token);
 
+ againagain:
+	if (type == TEP_EVENT_ERROR)
+		goto out_free;
+
+	/* Handle other operations in the results */
+	if (type == TEP_EVENT_OP) {
+		type = process_op(event, right, &token);
+		goto againagain;
+	}
+
 	top->op.right = arg;
 
 	*tok = token;

I'm getting ready to post a new version of libtraceevent, and if this fixes
the parsing then I'll include this too.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ