[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/4] x86: reduce CET-SS related #ifdef-ary



On 27.07.2020 17:00, Roger Pau Monné wrote:
On Wed, Jul 15, 2020 at 12:48:46PM +0200, Jan Beulich wrote:
Commit b586a81b7a90 ("x86/CET: Fix build following c/s 43b98e7190") had
to introduce a number of #ifdef-s to make the build work with older tool
chains. Introduce an assembler macro covering for tool chains not
knowing of CET-SS, allowing some conditionals where just SETSSBSY is the
problem to be dropped again.

No change to generated code.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Looks like an improvement overall in code clarity:

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

Can you test on clang? Just to be on the safe side, otherwise I can
test it.

Works with 5.<whatever> that I have on one of my boxes.

--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -237,9 +237,7 @@ iret_exit_to_guest:
   * %ss must be saved into the space left by the trampoline.
   */
  ENTRY(lstar_enter)
-#ifdef CONFIG_XEN_SHSTK
          ALTERNATIVE "", "setssbsy", X86_FEATURE_XEN_SHSTK

Should the setssbsy be quoted, or it doesn't matter? I'm asking
because the same construction used by CLAC/STAC doesn't quote the
instruction.

I actually thought we consistently quote these. It doesn't matter
as long as it's a single word. Quoting becomes necessary when
there are e.g. blanks involved, which happens for insns with
operands.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.