lkml.org 
[lkml]   [2018]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 40/61] powerpc/64s: Wire up cpu_show_spectre_v1()
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Michael Ellerman <mpe@ellerman.id.au>

    commit 56986016cb8cd9050e601831fe89f332b4e3c46e upstream.

    Add a definition for cpu_show_spectre_v1() to override the generic
    version. Currently this just prints "Not affected" or "Vulnerable"
    based on the firmware flag.

    Although the kernel does have array_index_nospec() in a few places, we
    haven't yet audited all the powerpc code to see where it's necessary,
    so for now we don't list that as a mitigation.

    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    arch/powerpc/kernel/security.c | 8 ++++++++
    1 file changed, 8 insertions(+)

    --- a/arch/powerpc/kernel/security.c
    +++ b/arch/powerpc/kernel/security.c
    @@ -50,3 +50,11 @@ ssize_t cpu_show_meltdown(struct device

    return sprintf(buf, "Vulnerable\n");
    }
    +
    +ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, char *buf)
    +{
    + if (!security_ftr_enabled(SEC_FTR_BNDS_CHK_SPEC_BAR))
    + return sprintf(buf, "Not affected\n");
    +
    + return sprintf(buf, "Vulnerable\n");
    +}

    \
     
     \ /
      Last update: 2018-06-05 19:14    [W:4.142 / U:0.688 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site