Skip to content
  • David Windsor's avatar
    usercopy: Mark kmalloc caches as usercopy caches · 6c0c21ad
    David Windsor authored
    Mark the kmalloc slab caches as entirely whitelisted. These caches
    are frequently used to fulfill kernel allocations that contain data
    to be copied to/from userspace. Internal-only uses are also common,
    but are scattered in the kernel. For now, mark all the kmalloc caches
    as whitelisted.
    This patch is modified from Brad Spengler/PaX Team's PAX_USERCOPY
    whitelisting code in the last public patch of grsecurity/PaX based on my
    understanding of the code. Changes or omissions from the original code are
    mine and don't reflect the original grsecurity/PaX code.
    Signed-off-by: default avatarDavid Windsor <>
    [kees: merged in moved kmalloc hunks, adjust commit log]
    Cc: Pekka Enberg <>
    Cc: David Rientjes <>
    Cc: Joonsoo Kim <>
    Cc: Andrew Morton <>
    Signed-off-by: default avatarKees Cook <>
    Acked-by: default avatarChristoph Lameter <>