[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf1ad4c3-73eb-0f8f-e627-a7e0785fe903@citrix.com>
Date: Fri, 24 Feb 2023 10:59:54 +0000
From: andrew.cooper3@...rix.com
To: Xin Li <xin3.li@...el.com>, linux-kernel@...r.kernel.org,
x86@...nel.org, kvm@...r.kernel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com, peterz@...radead.org,
seanjc@...gle.com, pbonzini@...hat.com, ravi.v.shankar@...el.com
Subject: Re: [RFC PATCH v3 15/32] x86/fred: make unions for the cs and ss
fields in struct pt_regs
On 24/02/2023 7:01 am, Xin Li wrote:
> diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
> index f4db78b09c8f..341e44847cc1 100644
> --- a/arch/x86/include/asm/ptrace.h
> +++ b/arch/x86/include/asm/ptrace.h
> @@ -82,13 +82,41 @@ struct pt_regs {
> * On hw interrupt, it's IRQ number:
> */
> unsigned long orig_ax;
> -/* Return frame for iretq */
> +
> + /* Return frame for iretq/eretu/erets */
> unsigned long ip;
> - unsigned long cs;
> + union {
> + unsigned long csl; /* CS + any fields above it */
I guess that CSL here is supposed to mean cs long, but CSL (Current
Stack Level) is a new term in the FRED spec which isn't this.
This causes changes such as the final hunk in patch 27 to read
incorrectly, despite being technically correct.
cs_slot would be much clearer in code, but tbh, even cs_l would be
better than the version without an underscore.
And obviously, whatever is done here should be mirrored for ss.
~Andrew
Powered by blists - more mailing lists