linux-stable/arch
Peter Zijlstra f4956cf83e x86/debug: Support negative polarity DR6 bits
DR6 has a whole bunch of bits that have negative polarity; they were
architecturally reserved and defined to be 1 and are now getting used.
Since they're 1 by default, 0 becomes the signal value.

Handle this by xor'ing the read DR6 value by the reserved mask, this
will flip them around such that 1 is the signal value (positive
polarity).

Current Linux doesn't yet support any of these bits, but there's two
defined:

 - DR6[11] Bus Lock Debug Exception		(ISEr39)
 - DR6[16] Restricted Transactional Memory	(SDM)

Update ptrace_{set,get}_debugreg() to provide/consume the value in
architectural polarity. Although afaict ptrace_set_debugreg(6) is
pointless, the value is not consumed anywhere.

Change hw_breakpoint_restore() to alway write the DR6_RESERVED value
to DR6, again, no consumer for that write.

Suggested-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20200902133201.354220797@infradead.org
2020-09-04 15:12:57 +02:00
..
alpha treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
arc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
arm A set of fixes for lockdep, tracing and RCU: 2020-08-30 11:43:50 -07:00
arm64 MMC host: 2020-08-31 11:22:57 -07:00
c6x treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
csky treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
h8300 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hexagon treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ia64 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
m68k treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
microblaze treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mips A set of fixes for lockdep, tracing and RCU: 2020-08-30 11:43:50 -07:00
nds32 A set of fixes for lockdep, tracing and RCU: 2020-08-30 11:43:50 -07:00
nios2 mm/nios2: use general page fault accounting 2020-08-12 10:58:03 -07:00
openrisc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
parisc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
powerpc A set of fixes for lockdep, tracing and RCU: 2020-08-30 11:43:50 -07:00
riscv treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
s390 A set of fixes for lockdep, tracing and RCU: 2020-08-30 11:43:50 -07:00
sh treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sparc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
um treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
x86 x86/debug: Support negative polarity DR6 bits 2020-09-04 15:12:57 +02:00
xtensa treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
.gitignore
Kconfig A set oftimekeeping/VDSO updates: 2020-08-14 14:26:08 -07:00