• Hugh Dickins's avatar
    kaiser: fix perf crashes · 20cbe9a3
    Hugh Dickins authored
    
    Avoid perf crashes: place debug_store in the user-mapped per-cpu area
    instead of allocating, and use page allocator plus kaiser_add_mapping()
    to keep the BTS and PEBS buffers user-mapped (that is, present in the
    user mapping, though visible only to kernel and hardware).  The PEBS
    fixup buffer does not need this treatment.
    
    The need for a user-mapped struct debug_store showed up before doing
    any conscious perf testing: in a couple of kernel paging oopses on
    Westmere, implicating the debug_store offset of the per-cpu area.
    Signed-off-by: default avatarHugh Dickins <hughd@google.com>
    Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    20cbe9a3
perf_event_intel_ds.c 36.9 KB