]> www.infradead.org Git - users/jedix/linux-maple.git/commit
retpoline: Show correct spectrev2 mitigation after loading non-retpoline module
authorAlejandro Jimenez <alejandro.j.jimenez@oracle.com>
Tue, 13 Aug 2019 15:40:58 +0000 (11:40 -0400)
committerBrian Maly <brian.maly@oracle.com>
Wed, 21 Aug 2019 17:05:46 +0000 (13:05 -0400)
commit751f0307d534f0cd33110de4ba1c86a8499cee65
tree269edf4681e0f97e73ead7089895d5e1544d1e48
parent2ad9d506b3da3c62063af99a7bc07d78a2825c83
retpoline: Show correct spectrev2 mitigation after loading non-retpoline module

If a loaded kernel module is not built with retpoline capabilities,
the kernel is tainted and sysfs reports the system as "Vulnerable"
to spectre v2, even though the retpoline mitigation is still enabled.

Change the message displayed in sysfs to report when a non-retpoline
module has been loaded using the new format:

Mitigation: Full generic retpoline (non-retpoline module(s) has been loaded), IBRS_FW, IBPB

This enables more precise tracking of the security status by
differentiating the cases where no spectre v2 mitigation is
available (Vulnerable), and when retpoline is available/active but
a vulnerable module has introduced a potential attack vector.

Orabug: 30185537

Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/kernel/cpu/bugs_64.c