Re: [RFC PATCH 2/5] entry: Add calls for save/restore auxiliary pt_regs

From: Borislav Petkov
Date: Tue Aug 09 2022 - 15:07:38 EST


On Tue, Aug 09, 2022 at 11:38:03AM -0700, Ira Weiny wrote:
> Thomas did a lot of work to make the entry code generic. So I was
> keeping that work consistent. This also helps to ensure I did not miss
> any places.

How about you worry about the other arches when you actually cross that
bridge?

> I don't believe this is correct because instrumentation is not enabled
> here.

Why do you have to run

arch_save_aux_pt_regs()

with instrumentation enabled?

Patch 5 does

+ struct pt_regs_auxiliary *aux_pt_regs = &to_extended_pt_regs(regs)->aux;
+
+ aux_pt_regs->cpu = raw_smp_processor_id();

only?

Why does that need to run with instrumentation enabled?

--
Regards/Gruss,
Boris.

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