linux-stable/Documentation/ABI/stable
Christophe Leroy 6eda706a53 selftests: vDSO: fix the way vDSO functions are called for powerpc
vdso_test_correctness test fails on powerpc:

~ # ./vdso_test_correctness
...
[RUN]	Testing clock_gettime for clock CLOCK_REALTIME_ALARM (8)...
[FAIL]	No such clock, but __vdso_clock_gettime returned 22
[RUN]	Testing clock_gettime for clock CLOCK_BOOTTIME_ALARM (9)...
[FAIL]	No such clock, but __vdso_clock_gettime returned 22
[RUN]	Testing clock_gettime for clock CLOCK_SGI_CYCLE (10)...
[FAIL]	No such clock, but __vdso_clock_gettime returned 22
...
[RUN]	Testing clock_gettime for clock invalid (-1)...
[FAIL]	No such clock, but __vdso_clock_gettime returned 22
[RUN]	Testing clock_gettime for clock invalid (-2147483648)...
[FAIL]	No such clock, but __vdso_clock_gettime returned 22
[RUN]	Testing clock_gettime for clock invalid (2147483647)...
[FAIL]	No such clock, but __vdso_clock_gettime returned 22

On powerpc, a call to a VDSO function is not an ordinary C function
call. Unlike several architectures which returns a negative error code
in case of an error, powerpc sets CR[SO] and returns the error code
as a positive value.

Define and use a macro called VDSO_CALL() which takes a pointer
to the function to call, the number of arguments and the arguments.

Also update ABI vdso documentation to reflect this subtlety.

Provide a specific version of VDSO_CALL() for powerpc that negates
the error code on return when CR[SO] is set.

Fixes: c7e5789b24 ("kselftest: Move test_vdso to the vDSO test suite")
Fixes: 2e9a972566 ("selftests: vdso: Add a selftest for vDSO getcpu()")
Fixes: 693f5ca08c ("kselftest: Extend vDSO selftest")
Fixes: b2f1c3db28 ("kselftest: Extend vdso correctness test to clock_gettime64")
Fixes: 4920a2590e ("selftests/vDSO: add tests for vgetrandom")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2024-08-30 15:48:45 +02:00
..
firewire-cdev docs: ABI: cleanup several ABI documents 2020-10-30 13:14:29 +01:00
o2cb docs: update ocfs2-devel mailing list address 2023-07-08 09:29:29 -07:00
procfs-audit_loginuid audit: drop /proc/PID/loginuid documentation Format field 2021-04-01 18:32:24 -04:00
syscalls [PATCH] Add kernel<->userspace ABI stability documentation 2006-06-21 12:40:47 -07:00
sysfs-acpi-pmprofile ACPI: docs: Update the pm_profile sysfs attribute documentation 2023-03-20 18:23:23 +01:00
sysfs-block block: Add core atomic write support 2024-06-20 15:19:17 -06:00
sysfs-bus-firewire docs: ABI: stable: make files ReST compatible 2020-10-30 13:07:01 +01:00
sysfs-bus-fsl-mc bus: fsl-mc: add autorescan sysfs 2021-01-27 15:13:53 +01:00
sysfs-bus-mhi bus: mhi: host: Add sysfs entry to force device to enter EDL 2024-04-25 20:16:42 +05:30
sysfs-bus-nvmem nvmem: core: Implement force_ro sysfs attribute 2024-07-05 09:55:05 +02:00
sysfs-bus-usb docs: ABI: stable: make files ReST compatible 2020-10-30 13:07:01 +01:00
sysfs-bus-vmbus docs: typo fixes in Documentation/ABI/ 2021-05-13 09:13:25 -06:00
sysfs-bus-w1 docs: ABI: cleanup several ABI documents 2020-10-30 13:14:29 +01:00
sysfs-bus-xen-backend docs: typo fixes in Documentation/ABI/ 2021-05-13 09:13:25 -06:00
sysfs-class-backlight backlight: Add BACKLIGHT_POWER_ constants for power states 2024-07-04 16:45:25 +01:00
sysfs-class-infiniband Documentation/ABI: Fix typos 2023-08-18 11:28:40 -06:00
sysfs-class-rfkill docs: ABI: stable: make files ReST compatible 2020-10-30 13:07:01 +01:00
sysfs-class-tpm ABI: sysfs-class-tpm: use wildcards for pcr-* nodes 2021-09-21 18:31:15 +02:00
sysfs-class-ubi UBI: Add ro-mode sysfs attribute 2016-05-24 15:15:26 +02:00
sysfs-class-udc Documentation: ABI: sysfs-class-udc: remove duplicated entry 2017-06-13 13:21:04 +03:00
sysfs-devices ABI: sysfs-devices: add /dev ABI 2021-09-28 12:48:15 +02:00
sysfs-devices-node mm: memory-failure: document memory failure stats 2023-02-02 22:33:28 -08:00
sysfs-devices-system-cpu topology/sysfs: Add PPIN in sysfs under cpu topology 2022-02-01 16:36:42 +01:00
sysfs-devices-system-xen_memory xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
sysfs-driver-aspeed-vuart drivers/tty/serial/8250: Make Aspeed VUART SIRQ polarity configurable 2019-10-04 15:05:20 +02:00
sysfs-driver-dma-idxd dmaengine: idxd: add wq driver name support for accel-config user tool 2023-10-04 13:00:34 +05:30
sysfs-driver-dma-ioatdma docs: ABI: sysfs-driver-dma-ioatdma: what starts with /sys 2020-11-02 13:45:37 +01:00
sysfs-driver-firmware-zynqmp firmware: zynqmp: Add documentation for runtime feature config 2022-02-25 12:13:20 +01:00
sysfs-driver-ib_srp docs: ABI: stable: make files ReST compatible 2020-10-30 13:07:01 +01:00
sysfs-driver-misc-cp500 misc: keba: Add basic KEBA CP500 system FPGA support 2024-07-04 12:29:07 +02:00
sysfs-driver-mlxreg-io Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces 2023-08-23 17:31:30 +02:00
sysfs-driver-qla2xxx [SCSI] qla2xxx: Add firmware-dump kobject uevent notification. 2009-12-04 12:00:10 -06:00
sysfs-driver-speakup accessibility: speakup: phonetic spelling while arrowing letter by letter 2022-11-23 19:47:15 +01:00
sysfs-driver-usb-usbtmc usb: usbtmc: Remove sysfs group TermChar and auto_abort 2018-09-20 13:04:03 +02:00
sysfs-driver-w1_ds28e04 docs: w1: convert to ReST and add to the kAPI group of docs 2019-07-31 14:16:17 -06:00
sysfs-driver-w1_ds28ea00 docs: w1: convert to ReST and add to the kAPI group of docs 2019-07-31 14:16:17 -06:00
sysfs-driver-w1_ds2438 w1: ds2438: support for writing to offset register 2021-05-21 14:51:33 +02:00
sysfs-firmware-opal-dump docs: ABI: stable: make files ReST compatible 2020-10-30 13:07:01 +01:00
sysfs-firmware-opal-elog docs: ABI: stable: make files ReST compatible 2020-10-30 13:07:01 +01:00
sysfs-fs-orangefs Orangefs: kernel client part 6 2015-10-03 11:39:59 -04:00
sysfs-hypervisor-xen drivers/xen/hypervisor: Expose Xen SIF flags to userspace 2023-02-13 06:53:19 +01:00
sysfs-kernel-notes docs: stable-ABI: Document /sys/kernel/notes 2020-09-16 12:17:47 -06:00
sysfs-module sysfs docs: ABI: Fix typo in comment 2022-07-28 16:32:33 +02:00
sysfs-platform-wmi-bmof Documentation/ABI: Fix typos 2023-08-18 11:28:40 -06:00
sysfs-transport-srp scsi_transport_srp: Add periodic reconnect support 2013-11-08 14:43:16 -08:00
thermal-notification thermal: Add event notification to thermal framework 2011-01-12 00:08:35 -05:00
vdso selftests: vDSO: fix the way vDSO functions are called for powerpc 2024-08-30 15:48:45 +02:00