lkml.org 
[lkml]   [2023]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 00/11] Fix up SRSO stuff
On Mon, Aug 14, 2023 at 12:51:53PM -0700, Josh Poimboeuf wrote:
> > * Regarding alignment - the instructions which need to be untrained,
> > * must all start at a cacheline boundary for Zen1/2 generations. That
> > * is, both the ret in zen_untrain_ret() and srso_safe_ret() in the
> > * srso_untrain_ret() must both be placed at the beginning of
> > * a cacheline.
> > */
>
> It's a good comment, but RET in srso_safe_ret() is still misaligned.
> Don't we need something like so?

Well, I guess that comment is still not good enough. Not the RET must be
cacheline-aligned but the function return sequences must be.

IOW, we need this:

<--- cacheline begin
SYM_INNER_LABEL(retbleed_return_thunk, SYM_L_GLOBAL)
ret
int3


and

<--- cacheline begin
SYM_INNER_LABEL(srso_safe_ret, SYM_L_GLOBAL)
lea 8(%_ASM_SP), %_ASM_SP
ret
int3

I'll improve on it before I apply it.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2023-08-14 21:59    [W:0.168 / U:2.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site