[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A5649779-7F89-4991-88D9-CF9DE14C8EDA@zytor.com>
Date: Sat, 25 Feb 2017 09:55:45 -0800
From: hpa@...or.com
To: Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <peterz@...radead.org>
CC: Ingo Molnar <mingo@...nel.org>,
Arjan van de Ven <arjan@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
jpoimboe@...hat.com, richard.weinberger@...il.com,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] x86: Implement __WARN using UD0
On February 25, 2017 2:38:08 AM PST, Borislav Petkov <bp@...en8.de> wrote:
>On Fri, Feb 24, 2017 at 11:41:33AM +0100, Peter Zijlstra wrote:
>> So yes, its tricky but it could be done. A new single byte #UD
>> instruction would be much nicer though.
>
>Btw, if we did a new insn which means new functionality instead of
>"stealing" an invalid one, we would have to have a fallback for all
>those current CPUs which don't support it, which means, alternatives
>patching.
>
>Perhaps it would be better to take one of the invalid ones and future
>hw can then extend it and actually make it into a special OS-INT
>instruction which is small enough to be inline and can, if hit, run a
>handler where you do fixup.
>
>And then that insn could even have a immed8 arg which you can use to
>pass info from the call site. IOW, something like
>
> ...
> OSINT $12
> ...
>
>and handler inspects opcode and does things based on it...
>
>Oh well.
You mean like the INT instruction?
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Powered by blists - more mailing lists