]> git.baikalelectronics.ru Git - kernel.git/commit
Return ENODEV when the selected speculation misfeature is unsupported
authorAnthony Steinhauser <asteinhauser@google.com>
Mon, 16 Dec 2019 22:53:47 +0000 (14:53 -0800)
committerWill Deacon <will@kernel.org>
Wed, 8 Jan 2020 17:27:41 +0000 (17:27 +0000)
commit2d09aa63901f8db6adcbfccb6caba828af5a2bb5
tree975c442aff849d5ba08c6a6e372d6650439622a1
parent75e273687aee789166c077bbe05d67c0252abf3f
Return ENODEV when the selected speculation misfeature is unsupported

When the control of the selected speculation misbehavior is unsupported,
the kernel should return ENODEV according to the documentation:
https://www.kernel.org/doc/html/v4.17/userspace-api/spec_ctrl.html
Current aarch64 implementation of SSB control sometimes returns EINVAL
which is reserved for unimplemented prctl and for violations of reserved
arguments. This change makes the aarch64 implementation consistent with
the x86 implementation and with the documentation.

Signed-off-by: Anthony Steinhauser <asteinhauser@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/ssbd.c