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: <d64ec287-c85e-4b50-beac-4517462882f6@intel.com>
Date: Mon, 14 Apr 2025 16:37:19 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Junxuan Liao <ljx@...wisc.edu>, linux-trace-kernel@...r.kernel.org,
 linux-kernel@...r.kernel.org, x86@...nel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 "H. Peter Anvin" <hpa@...or.com>, Steven Rostedt <rostedt@...dmis.org>,
 Masami Hiramatsu <mhiramat@...nel.org>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 "Paul E. McKenney" <paulmck@...nel.org>
Subject: Re: [PATCH] x86/tracing: introduce enter/exit tracepoint pairs for
 page faults

On 4/14/25 16:22, Junxuan Liao wrote:
> On 4/14/25 6:14 PM, Junxuan Liao wrote:
>> Do people find separate user/kernel tracepoints useful? For me, I can
>> check regs in eBPF tracing code instead.
> I think it might be good to add a field to the tracepoints to indicate
> whether it's in user space or not.

Sounds sane to me.  Doing something like this:

        TP_STRUCT__entry(
                __field(                unsigned long, address  )
                __field(                unsigned long, ip       )
+               __field(                bool	     , user_mode)
                __field(                unsigned long, error_code )
        ),

        TP_fast_assign(
                 __entry->address = address;
                 __entry->ip         = regs->ip;
+                __entry->user_mode  = user_mode(regs);
                 __entry->error_code = error_code;
        ),

seems highly superior to having two sets of tracepoints and static keys.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ