]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/bugs: rename ssbd_ibrs_selected to ssbd_userspace_selected
authorDaniel Jordan <daniel.m.jordan@oracle.com>
Wed, 18 Jul 2018 16:23:29 +0000 (09:23 -0700)
committerBrian Maly <brian.maly@oracle.com>
Tue, 20 Nov 2018 19:48:08 +0000 (14:48 -0500)
commit293813ce43a6bf4b828b2a18f161db5ffea9ac5e
tree9608efa5b800f775111872f9cea4528104352070
parent41cfc0d26f211844f546c24da728217efc50dfe4
x86/bugs: rename ssbd_ibrs_selected to ssbd_userspace_selected

The name of ssbd_ibrs_selected referred to how CPUs vulnerable to
Speculative Store Bypass automatically enable the SSB mitigation in
userspace, provided that the CPU is also using IBRS.[*]    However, the
function doesn't test for IBRS, so the name may be confusing, and there
are unusual combinations of options where the function returns true
without IBRS being enabled (say spectre_v2=off and
spec_store_bypass_disable=userspace).

Rename the function, as brought up by Boris.  The new name reflects what
it's testing.  While at it, make it static to match its declaration
because it's not used outside the file.  No functional change.

[*] The rationale is that setting the SPEC_CTRL MSR's SSBD bit in
    addition to the IBRS bit is free.

Suggested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
(cherry picked from commit 5342c8c0879f2ce6318139baaa3358c4d16f482e)

Orabug: 28271063

Signed-off-by: Anjali Kulkarni <anjali.k.kulkarni@oracle.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/kernel/cpu/bugs_64.c