[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878rcx6d8x.ffs@tglx>
Date: Mon, 05 Jun 2023 19:16:30 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: "H. Peter Anvin" <hpa@...or.com>, Xin Li <xin3.li@...el.com>,
linux-kernel@...r.kernel.org, x86@...nel.org, kvm@...r.kernel.org
Cc: mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
peterz@...radead.org, andrew.cooper3@...rix.com, seanjc@...gle.com,
pbonzini@...hat.com, ravi.v.shankar@...el.com,
jiangshanlai@...il.com, shan.kang@...el.com
Subject: Re: [PATCH v8 31/33] x86/fred: BUG() when ERETU with %rsp not equal
to that when the ring 3 event was just delivered
On Mon, Jun 05 2023 at 09:42, H. Peter Anvin wrote:
> On 6/5/23 07:15, Thomas Gleixner wrote:
>> On Mon, Apr 10 2023 at 01:14, Xin Li wrote:
>>> A FRED stack frame generated by a ring 3 event should never be messed up, and
>>> the first thing we must make sure is that at the time an ERETU instruction is
>>> executed, %rsp must have the same address as that when the user level event
>>> was just delivered.
>>>
>>> However we don't want to bother the normal code path of ERETU because it's on
>>> the hotest code path, a good choice is to do this check when ERETU
>>> faults.
>>
>> Which might be not catching bugs where the wrong frame makes ERETU not
>> fault.
>>
>> We have CONFIG_DEBUG_ENTRY for catching this at the proper place.
>>
>
> This is true, but this BUG() is a cheap test on a slow path, and thus
> can be included in production code.
No objection.
Powered by blists - more mailing lists