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: <20171003191240.692c21e7@gandalf.local.home>
Date:   Tue, 3 Oct 2017 19:12:40 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Jan Kiszka <jan.kiszka@...mens.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][trace-cmd] Print value of unknown symbolic fields

On Thu, 28 Sep 2017 22:13:10 +0200
Jan Kiszka <jan.kiszka@...mens.com> wrote:

> From: Jan Kiszka <jan.kiszka@...mens.com>
> 
> Aligns trace-cmd with the behavior of the kernel.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@...mens.com>
> ---
>  event-parse.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/event-parse.c b/event-parse.c
> index 606da5b..25e0874 100644
> --- a/event-parse.c
> +++ b/event-parse.c
> @@ -3960,6 +3960,8 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
>  				break;
>  			}
>  		}
> +		if (!flag)
> +			trace_seq_printf(s, "0x%llx", val);
>  		break;
>  	case PRINT_HEX:
>  		if (arg->hex.field->type == PRINT_DYNAMIC_ARRAY) {

I'm going to also add this patch, to do the same for flags:

diff --git a/event-parse.c b/event-parse.c
index 25e0874..7ef66f8 100644
--- a/event-parse.c
+++ b/event-parse.c
@@ -3950,6 +3950,11 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
 				val &= ~fval;
 			}
 		}
+		if (val) {
+			if (print && arg->flags.delim)
+				trace_seq_puts(s, arg->flags.delim);
+			trace_seq_printf(s, "0x%llx", val);
+		}
 		break;
 	case PRINT_SYMBOL:
 		val = eval_num_arg(data, size, event, arg->symbol.field);


-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ