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: <9f939484-18bc-42be-bd1b-ef48d3366a69@zytor.com>
Date: Wed, 23 Oct 2024 14:52:56 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Xin Li <xin3.li@...el.com>, Xin Li <xin@...or.com>,
        Andrew Cooper <andrew.cooper3@...rix.com>
Cc: "x86@...nel.org" <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: RFC, untested: handing of MSR immediates and MSRs on Xen

On 10/23/24 14:31, H. Peter Anvin wrote:
> 
> Note: I haven't added tracepoint handling yet. *Ideally* tracepoints 
> would be patched over the main callsite instead of using a separate 
> static_key() -- which also messes up register allocation due to the 
> subsequent call. This is a general problem with tracepoints which 
> perhaps is better handled separately.
> 

So I have never quite wrapped my head around how heavyweight tracepoints 
actually are. I do know that static_key() is definitely not a perfect 
optimization barrier[*].

The case of MSR tracepoints in particular concerns me, because having 
one knob for all MSRs is an *incredibly* wide net to cast, and doesn't 
distinguish in any way between performance-sensitive and 
non-performance-sensitive MSRs.

I do wonder if tracepoint sites could be implemented using traps (or 
perhaps better, software interrupts) especially in critical flows, or if 
that would increase the cost of the tracing too much.

	-hpa


[*] One thing we may want to consider in general is if we should 
increase the bias for __builtin_expect() by passing 
-fbuiltin-expect-probability to gcc, or use 
__builtin_expect_with_probability().



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ