[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <FB8AAE2A-108E-493A-B5FD-FCBFC1CA1C38@amacapital.net>
Date: Thu, 21 Nov 2019 15:12:01 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Fenghua Yu <fenghua.yu@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
H Peter Anvin <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Tony Luck <tony.luck@...el.com>,
Ashok Raj <ashok.raj@...el.com>,
Ravi V Shankar <ravi.v.shankar@...el.com>,
linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH v10 5/6] x86/split_lock: Handle #AC exception for split lock
> On Nov 21, 2019, at 3:02 PM, Fenghua Yu <fenghua.yu@...el.com> wrote:
>
> On Thu, Nov 21, 2019 at 02:10:38PM -0800, Andy Lutomirski wrote:
>>
>>
>>>> On Nov 20, 2019, at 5:45 PM, Fenghua Yu <fenghua.yu@...el.com> wrote:
>>>
>>> + if (!user_mode(regs) && split_lock_detect_enabled)
>>> + panic("Split lock detected\n");
>>
>> NAK.
>>
>> 1. Don’t say “split lock detected” if you don’t know that you detected a split lock. Or is this genuinely the only way to get #AC from kernel mode?
>
> Intel hardware design team confirmed that the only reason for #AC in ring 0 is
> split lock.
Okay.
This should eventually get integrated with Jann’s decoder work to print the lock address and size.
>
>>
>> 2. Don’t panic. Use die() just like every other error where nothing is corrupted.
>
> Ok. Will change to die() which provides all the trace information and
> allow multiple split lock in one boot.
>
>>
>> And maybe instead turn off split lock detection and print a stack trace instead. Then the kernel is even more likely to survive to log something useful.
>
> How about we just use simple policy die() in this patch set to allow
> detect and debug split lock issues and extend the code base to handle
> split lock with different policies (panic, disable split lock, maybe other
> options) in the future?
>
>
I’m okay with this. Peter?
>
Powered by blists - more mailing lists