[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21d0415c-9af4-db18-8e65-410f6ab5ec68@linux.intel.com>
Date: Tue, 3 Nov 2020 20:15:27 +0800
From: Xiaoyao Li <xiaoyao.li@...ux.intel.com>
To: Fenghua Yu <fenghua.yu@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Randy Dunlap <rdunlap@...radead.org>,
Tony Luck <tony.luck@...el.com>,
Christopherson Sean J <sean.j.christopherson@...el.com>,
Ashok Raj <ashok.raj@...el.com>,
Ravi V Shankar <ravi.v.shankar@...el.com>
Cc: linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH RFC v3 2/4] x86/bus_lock: Handle warn and fatal in #DB for
bus lock
On 10/31/2020 8:27 AM, Fenghua Yu wrote:
...
> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> index 3c70fb34028b..1c3442000972 100644
> --- a/arch/x86/kernel/traps.c
> +++ b/arch/x86/kernel/traps.c
> @@ -953,6 +953,13 @@ static __always_inline void exc_debug_user(struct pt_regs *regs,
> goto out_irq;
> }
>
> + /*
> + * Handle bus lock. #DB for bus lock can only be triggered from
> + * userspace.
> + */
> + if (!(dr6 & DR_BUS_LOCK))
it should be
if (dr6 & DR_BUS_LOCK)
since you keep DR6.[bit 11] reserved in this version. bit 11 of
debug_read_clear_dr6() being set to 1 means bus lock detected.
> + handle_bus_lock(regs);
> +
> /* Add the virtual_dr6 bits for signals. */
> dr6 |= current->thread.virtual_dr6;
> if (dr6 & (DR_STEP | DR_TRAP_BITS) || icebp)
>
Powered by blists - more mailing lists