lkml.org 
[lkml]   [2016]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.19.y-ckt 029/210] arm64: mdscr_el1: avoid exposing DCC to userspace
    Date
    3.19.8-ckt14 -stable review patch.  If anyone has any objections, please let me know.

    ---8<------------------------------------------------------------

    From: Will Deacon <will.deacon@arm.com>

    commit d8d23fa0f27f3b2942a7bbc7378c7735324ed519 upstream.

    We don't want to expose the DCC to userspace, particularly as there is
    a kernel console driver for it.

    This patch resets mdscr_el1 to disable userspace access to the DCC
    registers on the cold boot path.

    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    arch/arm64/mm/proc.S | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
    index 4e778b1..bccdaf5 100644
    --- a/arch/arm64/mm/proc.S
    +++ b/arch/arm64/mm/proc.S
    @@ -201,7 +201,8 @@ ENTRY(__cpu_setup)

    mov x0, #3 << 20
    msr cpacr_el1, x0 // Enable FP/ASIMD
    - msr mdscr_el1, xzr // Reset mdscr_el1
    + mov x0, #1 << 12 // Reset mdscr_el1 and disable
    + msr mdscr_el1, x0 // access to the DCC from EL0
    /*
    * Memory region attributes for LPAE:
    *
    --
    1.9.1
    \
     
     \ /
      Last update: 2016-01-29 03:41    [W:4.180 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site