VirtualBox

Ticket #13961: 0001-x86_64-smap-call-stac-before-touching-user-memory.patch

File 0001-x86_64-smap-call-stac-before-touching-user-memory.patch, 791 bytes (added by Christian Hesse, 9 years ago)

x86_64, smap: call stac() before touching user memory

  • arch/x86/lib/usercopy_64.c

    From bfe41af303c53b0262e8d04cdf44bc4b35a36621 Mon Sep 17 00:00:00 2001
    From: Christian Hesse <mail@eworm.de>
    Date: Fri, 22 May 2015 13:59:19 +0200
    Subject: [PATCH 1/1] x86_64, smap: call stac() before touching user memory
    
    In copy_user_handle_tail() we call clac() after access, but there is no
    stac() before.
    
    Signed-off-by: Christian Hesse <mail@eworm.de>
    ---
     arch/x86/lib/usercopy_64.c | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/arch/x86/lib/usercopy_64.c b/arch/x86/lib/usercopy_64.c
    index 0a42327..098dfd9 100644
    a b EXPORT_SYMBOL(copy_in_user);  
    7171__visible unsigned long
    7272copy_user_handle_tail(char *to, char *from, unsigned len)
    7373{
     74        stac();
    7475        for (; len; --len, to++) {
    7576                char c;
    7677

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy