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: <Y6RWwzBfgtMBorAy@hirez.programming.kicks-ass.net>
Date:   Thu, 22 Dec 2022 14:08:19 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     "Li, Xin3" <xin3.li@...el.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
        "Christopherson,, Sean" <seanjc@...gle.com>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>
Subject: Re: [RFC PATCH 21/32] x86/fred: FRED entry/exit and dispatch code

On Wed, Dec 21, 2022 at 02:56:08AM +0000, Li, Xin3 wrote:

> > > +		if (!(BIT(vector) & noinstr_mask)) {
> > > +			state = irqentry_enter(regs);
> > > +			instrumentation_begin();
> > > +		}
> > > +
> > > +		exception_handlers[vector](regs);
> > > +
> > > +		if (!(BIT(vector) & noinstr_mask)) {
> > > +			instrumentation_end();
> > > +			irqentry_exit(regs, state);
> > > +		}
> > 
> > This noinstr mask is daft; why not have DEFINE_FRED_HANDLER and
> > DEFINE_FRED_HANDLER_RAW or something, have the normal one include the
> > irqentry bits and use the _RAW one for the 'funny' ones that need to do it
> > themselves?
> 
> I wanted to keep "state = irqentry_enter(regs); instrumentation_begin();"
> in the dispatch framework, instead of pushing down to the handlers.
> 
> Of course, we could do it the other way if it is more preferred.

Yes, please do as I suggested, it is consistent IDTENTRY macros.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ