[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6dd020cd-e20a-be12-aba7-bfa9e1a94795@kernel.org>
Date:   Tue, 25 Feb 2020 21:34:06 -0800
From:   Andy Lutomirski <luto@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     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 08/10] x86/entry/32: Remove the 0/-1 distinction from
 exception entries
On 2/25/20 1:36 PM, Thomas Gleixner wrote:
> Nothing cares about the -1 "mark as interrupt" in the errorcode anymore. Just
> use 0 for all excpetions which do not have an errorcode consistently.
> 
I sincerely wish this were the case.  But look at collect_syscall() in
lib/syscall.c.
It would be really quite nice to address this for real in some
low-overhead way.  My suggestion would be to borrow a trick from 32-bit:
split regs->cs into ->cs and ->__csh, and stick CS_FROM_SYSCALL into
__csh for syscalls.  This will only add any overhead at all to the int80
case.  Then we could adjust syscall_get_nr() to look for CS_FROM_SYSCALL.
What do you think?  An alternative would be to use the stack walking
machinery in collect_syscall(), since the mere existence of that
function is abomination and we may not care about performance.
--Andy
Powered by blists - more mailing lists
 
