Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

admin-guide/hw-vuln/core-scheduling: fix return type of PR_SCHED_CORE_GET

sched_core_share_pid() copies the cookie to userspace with
put_user(id, (u64 __user *)uaddr), expecting 64 bits of space.
The "unsigned long" datatype that is documented in core-scheduling.rst
however is only 32 bits large on 32 bit architectures.

Document "unsigned long long" as the correct data type that is always
64bits large.

This matches what the selftest cs_prctl_test.c has been doing all along.

Fixes: 0159bb020ca9 ("Documentation: Add usecases, design and interface for core scheduling")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/util-linux/df7a25a0-7923-4f8b-a527-5e6f0064074d@t-8ch.de/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Chris Hyser <chris.hyser@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240423-core-scheduling-cookie-v1-1-5753a35f8dfc@weissschuh.net

authored by

Thomas Weißschuh and committed by
Jonathan Corbet
8af2d1ab 8819b60e

+2 -2
+2 -2
Documentation/admin-guide/hw-vuln/core-scheduling.rst
··· 67 67 will be performed for all tasks in the task group of ``pid``. 68 68 69 69 arg5: 70 - userspace pointer to an unsigned long for storing the cookie returned by 71 - ``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands. 70 + userspace pointer to an unsigned long long for storing the cookie returned 71 + by ``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands. 72 72 73 73 In order for a process to push a cookie to, or pull a cookie from a process, it 74 74 is required to have the ptrace access mode: `PTRACE_MODE_READ_REALCREDS` to the