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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250507174809.10cfc5ac@gandalf.local.home>
Date: Wed, 7 May 2025 17:48:09 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Sohil Mehta <sohil.mehta@...el.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, Xin Li <xin@...or.com>, "H
 . Peter Anvin" <hpa@...or.com>, Andy Lutomirski <luto@...nel.org>, Thomas
 Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav
 Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, Peter
 Zijlstra <peterz@...radead.org>, Sean Christopherson <seanjc@...gle.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim
 <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>, Alexander
 Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa
 <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>, Adrian Hunter
 <adrian.hunter@...el.com>, Kan Liang <kan.liang@...ux.intel.com>, Tony Luck
 <tony.luck@...el.com>, Paolo Bonzini <pbonzini@...hat.com>, Vitaly
 Kuznetsov <vkuznets@...hat.com>, "Rafael J . Wysocki" <rafael@...nel.org>,
 Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui
 <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>, Masami Hiramatsu
 <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Brian Gerst <brgerst@...il.com>, Andrew Cooper <andrew.cooper3@...rix.com>,
 "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>, Jacob Pan
 <jacob.pan@...ux.microsoft.com>, Andi Kleen <ak@...ux.intel.com>, Kai Huang
 <kai.huang@...el.com>, Nikolay Borisov <nik.borisov@...e.com>,
 linux-perf-users@...r.kernel.org, linux-edac@...r.kernel.org,
 kvm@...r.kernel.org, linux-pm@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v5 9/9] x86/nmi: Include NMI-source information in
 tracepoint and debug prints

On Tue,  6 May 2025 18:21:45 -0700
Sohil Mehta <sohil.mehta@...el.com> wrote:

> diff --git a/include/trace/events/nmi.h b/include/trace/events/nmi.h
> index 18e0411398ba..6e4a1ff70a44 100644
> --- a/include/trace/events/nmi.h
> +++ b/include/trace/events/nmi.h
> @@ -10,29 +10,32 @@
>  
>  TRACE_EVENT(nmi_handler,
>  
> -	TP_PROTO(void *handler, s64 delta_ns, int handled),
> +	TP_PROTO(void *handler, s64 delta_ns, int handled, unsigned long source_bitmap),

Even though x86 is currently the only architecture using the nmi
tracepoint, this "source_bitmap" makes it become very x86 specific.

This file should be moved into arch/x86/include/asm/trace/

And that would require adding to the Makefile:

CFLAGS_nmi.o := -I $(src)/../include/asm/trace

>  
> -	TP_ARGS(handler, delta_ns, handled),
> +	TP_ARGS(handler, delta_ns, handled, source_bitmap),
>  
>  	TP_STRUCT__entry(
>  		__field(	void *,		handler	)
>  		__field(	s64,		delta_ns)
>  		__field(	int,		handled	)
> +		__field(	unsigned long,	source_bitmap)
>  	),
>  
>  	TP_fast_assign(
>  		__entry->handler = handler;
>  		__entry->delta_ns = delta_ns;
>  		__entry->handled = handled;
> +		__entry->source_bitmap = source_bitmap;
>  	),
>  
> -	TP_printk("%ps() delta_ns: %lld handled: %d",
> +	TP_printk("%ps() delta_ns: %lld handled: %d source_bitmap: 0x%lx",
>  		__entry->handler,
>  		__entry->delta_ns,
> -		__entry->handled)
> +		__entry->handled,
> +		__entry->source_bitmap)
>  );
>  
>  #endif /* _TRACE_NMI_H */
>  
> -/* This part ust be outside protection */
> +/* This part must be outside protection */

And this would need to have:

#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH .
#define TRACE_INCLUDE_FILE nmi

-- Steve

>  #include <trace/define_trace.h>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ