s390/maccess: remove potentially broken probe_kernel_write()
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 13 Mar 2015 11:55:56 +0000 (12:55 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 25 Mar 2015 10:49:43 +0000 (11:49 +0100)
commit8a5d8473dd7e2b0bc2864e34bd6836b520589fa1
tree36997ac10fc75d5a0ed5fe5632e58684f90edf24
parentb2527d2009903a06b0076bb89166c72a0f17823b
s390/maccess: remove potentially broken probe_kernel_write()

Remove the s390 architecture implementation of probe_kernel_write() and
instead use a new function s390_kernel_write() to modify kernel text and
data everywhere.

The s390 implementation of probe_kernel_write() was potentially broken
since it modified memory in a read-modify-write fashion, which read four
bytes, modified the requested bytes within those four bytes and wrote
the result back.
If two cpus would modify the same four byte area at different locations
within that area, this could lead to corruption.
Right now the only places which called probe_kernel_write() did run within
stop_machine_run. Therefore the scenario can't happen right now, however
that might change at any time.

To fix this rename probe_kernel_write() to s390_kernel_write() which can
have special semantics, like only call it while running within stop_machine().

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/uaccess.h
arch/s390/kernel/ftrace.c
arch/s390/kernel/jump_label.c
arch/s390/kernel/kprobes.c
arch/s390/mm/maccess.c