| PR_SET_SPECULATION_CTRL(2const) | PR_SET_SPECULATION_CTRL(2const) |
PR_SET_SPECULATION_CTRL - set the state of a speculation misfeature for the calling thread
Standard C library (libc, -lc)
#include <linux/prctl.h> /* Definition of PR_* constants */ #include <sys/prctl.h>
int prctl(PR_SET_SPECULATION_CTRL, long misfeature, long val, 0L, 0L);
Sets the state of the speculation misfeature specified in misfeature. The speculation-misfeature settings are per-thread attributes.
Currently, misfeature must be one of:
The val argument is used to hand in the control value, which is one of the following:
The speculation feature can also be controlled by the spec_store_bypass_disable boot parameter. This parameter may enforce a read-only policy which will result in the prctl() call failing with the error ENXIO. For further details, see the kernel source file Documentation/admin-guide/kernel-parameters.txt.
On success, 0 is returned. On error, -1 is returned, and errno is set to indicate the error.
Linux.
Linux 4.17.
| 2024-06-01 | Linux man-pages 6.9.1 |