]> git.baikalelectronics.ru Git - kernel.git/commit
x86/ptrace: Remove set_segment_reg() implementations for current
authorAndy Lutomirski <luto@kernel.org>
Mon, 15 Jul 2019 17:08:48 +0000 (10:08 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 26 Nov 2019 21:00:12 +0000 (22:00 +0100)
commit0673721a7cdac392e6a28e12cdbf6c5a43fe47a4
tree0bcf277c56d26e3f4b2f0d033847892fdd1496d3
parent239d14a9d8d5db9b8be2b0f77189d4131ce5edc2
x86/ptrace: Remove set_segment_reg() implementations for current

seg_segment_reg() should be unreachable with task == current.
Rather than confusingly trying to make it work, just explicitly
disable this case.

(regset->get is used for current in the coredump code, but the ->set
 interface is only used for ptrace, and you can't ptrace yourself.)

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/ptrace.c