linux_dsm_epyc7002/tools/testing/selftests
Mark Rutland 564cbc8793 locking/atomics, selftests/powerpc: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE()
For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
preference to ACCESS_ONCE(), and new code is expected to use one of the
former. So far, there's been no reason to change most existing uses of
ACCESS_ONCE(), as these aren't currently harmful.

However, for some features it is necessary to instrument reads and
writes separately, which is not possible with ACCESS_ONCE(). This
distinction is critical to correct operation.

The bulk of the kernel code can be transformed via Coccinelle to use
{READ,WRITE}_ONCE(), though this only modifies users of ACCESS_ONCE(),
and not the implementation itself. As such, it has the potential to
break homebrew ACCESS_ONCE() macros seen in some user code in the kernel
tree (e.g. the virtio code, as fixed in commit ea9156fb3b).

To avoid fragility if/when that transformation occurs, and to align with
the preferred usage of {READ,WRITE}_ONCE(), this patch updates the DSCR
selftest code to use READ_ONCE() rather than ACCESS_ONCE(). There should
be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: davem@davemloft.net
Cc: linux-arch@vger.kernel.org
Cc: snitzer@redhat.com
Cc: thor.thayer@linux.intel.com
Cc: tj@kernel.org
Cc: viro@zeniv.linux.org.uk
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1508792849-3115-11-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-25 11:01:02 +02:00
..
bpf bpf: add test cases to bpf selftests to cover all access tests 2017-10-22 00:56:09 +01:00
breakpoints selftests: breakpoints: re-order TEST_GEN_PROGS targets 2017-09-18 10:53:58 -06:00
capabilities selftests: capabilities: convert error output to TAP13 ksft framework 2017-08-14 11:31:15 -06:00
cpu-hotplug selftests/cpu-hotplug: Skip test when there is only one online cpu 2017-08-16 17:48:18 -06:00
cpufreq
drivers/gpu
efivarfs
exec
filesystems
firmware test_firmware: add batched firmware tests 2017-08-10 13:58:41 -07:00
ftrace selftests/ftrace: multiple_kprobes: Also check for support 2017-09-18 10:55:55 -06:00
futex selftests: futex: Makefile: fix for loops in targets to run silently 2017-09-25 10:09:00 -06:00
gpio
ia64
intel_pstate selftests/intel_pstate: No need to compile test progs in the run script 2017-09-18 10:54:53 -06:00
ipc
kcmp tools/testing/selftests/kcmp/kcmp_test.c: add KCMP_EPOLL_TFD testing 2017-09-08 18:26:47 -07:00
kmod test_kmod: fix description for -s -and -c parameters 2017-08-18 15:32:01 -07:00
lib selftests: lib: Skip tests on missing test modules 2017-06-23 09:41:53 -06:00
locking
media_tests
membarrier selftests: membarrier: use ksft_* var arg msg api 2017-06-30 16:16:23 -06:00
memfd selftests/memfd: correct run_tests.sh permission 2017-09-25 10:09:06 -06:00
memory-hotplug selftests: fix memory-hotplug test 2017-06-30 10:06:23 -06:00
mount
mqueue selftests: mqueue: fix regression in silencing output from RUN_TESTS 2017-10-05 11:34:43 -06:00
net selftests/net: msg_zerocopy enable build with older kernel headers 2017-09-19 14:12:29 -06:00
networking/timestamping selftests/net: rxtimestamp: Fix an off by one 2017-10-05 21:28:53 -07:00
nsfs selftests/nsfs: create kconfig fragments 2017-07-24 12:35:14 -06:00
ntb ntb: ntb_test: ensure the link is up before trying to configure the mws 2017-08-01 15:18:59 -04:00
powerpc locking/atomics, selftests/powerpc: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:02 +02:00
prctl
pstore selftests: pstore: add .gitignore for generated files 2017-08-02 13:50:29 -06:00
ptp selftests: ptp: include default header install path 2017-08-02 15:26:46 -06:00
ptrace
rcutorture Merge branches 'doc.2017.08.17a', 'fixes.2017.08.17a', 'hotplug.2017.07.25b', 'misc.2017.08.17a', 'spin_unlock_wait_no.2017.08.17a', 'srcu.2017.07.27c' and 'torture.2017.07.24c' into HEAD 2017-08-17 08:10:04 -07:00
seccomp linux-kselftest-4.14-rc3-fixes 2017-09-27 10:51:08 -07:00
sigaltstack tools: fix testing/selftests/sigaltstack for s390x 2017-09-18 10:52:01 -06:00
size kselftest: convert get_size to use stricter TAP13 format 2017-06-14 18:23:27 -06:00
splice selftests: splice: add .gitignore for generated files 2017-08-02 13:50:48 -06:00
static_keys
sync selftests: sync: kselftest and kselftest-clean fail for make O=dir case 2017-09-21 07:55:40 -06:00
sysctl test_sysctl: fix sysctl.sh by making it executable 2017-08-07 15:13:36 -06:00
tc-testing tc-testing: add test for testing ife type 2017-08-29 15:14:18 -07:00
timers selftests: timers: set-timer-lat: Fix hang when testing unsupported alarms 2017-09-25 10:09:07 -06:00
user
vDSO
vm userfaultfd: selftest: exercise -EEXIST only in background transfer 2017-10-13 16:18:32 -07:00
watchdog selftests: watchdog: fix to use TEST_GEN_PROGS and remove clean 2017-09-21 07:55:38 -06:00
x86 selftests: x86: sysret_ss_attrs doesn't build on a PIE build 2017-10-05 11:34:14 -06:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_harness.h selftests: Enhance kselftest_harness.h to print which assert failed 2017-09-05 19:21:33 -06:00
kselftest_install.sh
kselftest.h selftests: kselftest framework: change skip exit code to 0 2017-08-25 10:02:00 -06:00
lib.mk selftests: lib.mk: copy test scripts and test files for make O=dir run 2017-09-21 07:55:40 -06:00
Makefile selftests: Makefile: fix for loops in targets to run silently 2017-09-25 10:08:59 -06:00