Skip to content
  • Vincenzo Frascino's avatar
    kasan: Add KASAN mode kernel parameter · d85e6bac
    Vincenzo Frascino authored
    
    
    Architectures supported by KASAN_HW_TAGS can provide a sync or async mode
    of execution. On an MTE enabled arm64 hw for example this can be identified
    with the synchronous or asynchronous tagging mode of execution.
    In synchronous mode, an exception is triggered if a tag check fault occurs.
    In asynchronous mode, if a tag check fault occurs, the TFSR_EL1 register is
    updated asynchronously. The kernel checks the corresponding bits
    periodically.
    
    KASAN requires a specific kernel command line parameter to make use of this
    hw features.
    
    Add KASAN HW execution mode kernel command line parameter.
    
    Note: This patch adds the kasan.mode kernel parameter and the
    sync/async kernel command line options to enable the described features.
    
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Andrey Konovalov <andreyknvl@google.com>
    Reviewed-by: default avatarAndrey Konovalov <andreyknvl@google.com>
    Signed-off-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
    [ Add a new var instead of exposing kasan_arg_mode to be consistent with
      flags for other command line arguments. ]
    Signed-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
    d85e6bac