lkml.org 
[lkml]   [2018]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 06/14] arm64: ssbd: Add global mitigation state accessor
    On Tue, May 22, 2018 at 04:06:40PM +0100, Marc Zyngier wrote:
    > We're about to need the mitigation state in various parts of the
    > kernel in order to do the right thing for userspace and guests.
    >
    > Let's expose an accessor that will let other subsystems know
    > about the state.
    >
    > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

    Reviewed-by: Mark Rutland <mark.rutland@arm.com>

    Mark.

    > ---
    > arch/arm64/include/asm/cpufeature.h | 10 ++++++++++
    > 1 file changed, 10 insertions(+)
    >
    > diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
    > index 9bc548e22784..1bacdf57f0af 100644
    > --- a/arch/arm64/include/asm/cpufeature.h
    > +++ b/arch/arm64/include/asm/cpufeature.h
    > @@ -543,6 +543,16 @@ static inline u64 read_zcr_features(void)
    > #define ARM64_SSBD_FORCE_ENABLE 2
    > #define ARM64_SSBD_MITIGATED 3
    >
    > +static inline int arm64_get_ssbd_state(void)
    > +{
    > +#ifdef CONFIG_ARM64_SSBD
    > + extern int ssbd_state;
    > + return ssbd_state;
    > +#else
    > + return ARM64_SSBD_UNKNOWN;
    > +#endif
    > +}
    > +
    > #endif /* __ASSEMBLY__ */
    >
    > #endif
    > --
    > 2.14.2
    >

    \
     
     \ /
      Last update: 2018-05-24 13:42    [W:6.676 / U:0.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site