]> git.baikalelectronics.ru Git - kernel.git/commit
x86/debug: Only clear/set ->virtual_dr6 for userspace #DB
authorPeter Zijlstra <peterz@infradead.org>
Tue, 27 Oct 2020 09:15:06 +0000 (10:15 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 27 Oct 2020 22:15:23 +0000 (23:15 +0100)
commit6dd26dae92000bdddf95892a91f34550463d555c
treef61191d9faa00ce094e8a54b215e4de01262fec7
parent209a4a6b53854bb5b49902cb6215125b85711ce1
x86/debug: Only clear/set ->virtual_dr6 for userspace #DB

The ->virtual_dr6 is the value used by ptrace_{get,set}_debugreg(6). A
kernel #DB clearing it could mean spurious malfunction of ptrace()
expectations.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Kyle Huey <me@kylehuey.com>
Link: https://lore.kernel.org/r/20201027093608.028952500@infradead.org
arch/x86/kernel/traps.c