[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250219183329.GE23004@noisy.programming.kicks-ass.net>
Date: Wed, 19 Feb 2025 19:33:29 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Kees Cook <kees@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, alyssa.milburn@...el.com,
scott.d.constable@...el.com, joao@...rdrivepizza.com,
andrew.cooper3@...rix.com, jpoimboe@...nel.org,
jose.marchesi@...cle.com, hjl.tools@...il.com,
ndesaulniers@...gle.com, samitolvanen@...gle.com, nathan@...nel.org,
ojeda@...nel.org, alexei.starovoitov@...il.com, mhiramat@...nel.org,
jmill@....edu
Subject: Re: [PATCH v3 06/10] x86/traps: Decode LOCK Jcc.d8 #UD
On Wed, Feb 19, 2025 at 10:20:25AM -0800, Kees Cook wrote:
> I realize these are misplaced chunks, but passing ud_type into the
> handler feels like a layering violation to me. I struggled with this
> when making recommendations for the UBSAN handler too, so I'm not sure
> I have any better idea. It feels like there should be a way to separate
> this logic more cleanly. The handlers are all doing very similar things:
>
> 1- find the address where a bad thing happened
> 2- report about it
> 3- whether to continue execution
> 4- where to continue execution
>
> The variability happens with 1 and 4, where it depends on the instruction
> sequences. Meh, I dunno. I can't see anything cleaner, so passing down
> ud_type does seem best.
Yeah, agreed. I couldn't get rid of relying on ud_type entirely (it was
worse), I'll see if I can come up something.
Powered by blists - more mailing lists