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: <87blplp03u.fsf@nanos.tec.linutronix.de>
Date:   Wed, 26 Feb 2020 21:25:25 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Andy Lutomirski <luto@...capital.net>,
        Peter Zijlstra <peterz@...radead.org>
Cc:     LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Brian Gerst <brgerst@...il.com>,
        Juergen Gross <JGross@...e.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [patch 13/16] x86/entry: Move irqflags and context tracking to C for simple idtentries

Andy Lutomirski <luto@...capital.net> writes:
>> On Feb 26, 2020, at 8:28 AM, Peter Zijlstra <peterz@...radead.org> wrote:
>> 
>> On Wed, Feb 26, 2020 at 07:11:39AM -0800, Andy Lutomirski wrote:
>> 
>>> In some sense, this is a weakness of the magic macro approach.  Some
>>> of the entries just want to have code that runs before all the entry
>>> fixups.  This is an example of it.  So are the cr2 reads.  It can all
>>> be made to work, but it's a bit gross.
>> 
>> Right. In my current pile (new patche since last posting) I also have
>> one that makes #DB save-clear/restore DR7.
>> 
>> I got it early enough that only a watchpoint on the task stack can still
>> screw us over, since I also included your patch that excludes
>> cpu_entry_area.
>
> Hmm. It would be nice to prevent watchpoints on the task stack, but that would need some trickery.  It could be done.
>
>> 
>> Pushing it earlier still would require calling into C from the entry
>> stack, which I know is on your todo list, but we're not quite there yet.
>
> Indeed.
>
> This is my main objection to the DEFINE_IDTENTRY stuff. It’s *great*
> for the easy cases, but it’s not so great for the nasty cases. Maybe
> we should open code PF, MC, DB, etc.  (And kill the kvm special case
> for PF.  I have a working patch for that and I can send it.)

I'm fine with that. I like the obvious easy ones as it spares to
duplicate all the same crap all over the place.

Making the nasty ones have:

#define DEFINE_IDTENTRY_$NASTY(exc_name)	\
__visible void notrace exc_name(args....)

would solve this and you can stick whatever you want into it and have
the NOPROBE added manually. Hmm?

Thanks,

        tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ