Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 693704 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +8 lines)
Line  Link Here
fixes "Bad or missing usercopy whitelist? Kernel memory exposure attempt
fixes "Bad or missing usercopy whitelist? Kernel memory exposure attempt
1
detected from SLUB object 'nvidia_stack_cache'" on linux-image-4.16.0-2-*
1
detected from SLUB object 'nvidia_stack_cache'" on linux-image-4.16.0-2-*
2
or newer that have disabled CONFIG_HARDENED_USERCOPY_FALLBACK
2
or newer that have disabled CONFIG_HARDENED_USERCOPY_FALLBACK
3
-- a/kernel/nv-linux.h
3
++ b/kernel/nv-linux.h
Lines 757-767 extern nv_spinlock_t km_lock; Link Here
757
                        0, 0, NULL, NULL);                      \
757
                        0, 0, NULL, NULL);                      \
758
    }
758
    }
759
#elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
759
#elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
760
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
761
#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type)            \
762
    {                                                           \
763
        kmem_cache = kmem_cache_create_usercopy(name, sizeof(type), 0, 0, 0, sizeof(type), NULL); \
764
    }
765
#else
760
#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type)            \
766
#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type)            \
761
    {                                                           \
767
    {                                                           \
762
        kmem_cache = kmem_cache_create(name, sizeof(type),      \
768
        kmem_cache = kmem_cache_create(name, sizeof(type),      \
763
                        0, 0, NULL);                            \
769
                        0, 0, NULL);                            \
764
    }
770
    }
771
#endif
765
#else
772
#else
766
#error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"
773
#error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"
767
#endif
774
#endif

Return to bug 693704