• Mark Rutland's avatar
    arm64: perf: strip PAC when unwinding userspace · ccc43810
    Mark Rutland authored
    When the kernel is unwinding userspace callchains, we can't expect that
    the userspace consumer of these callchains has the data necessary to
    strip the PAC from the stored LR.
    
    This patch has the kernel strip the PAC from user stackframes when the
    in-kernel unwinder is used. This only affects the LR value, and not the
    FP.
    
    This only affects the in-kernel unwinder. When userspace performs
    unwinding, it is up to userspace to strip PACs as necessary (which can
    be determined from DWARF information).
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarKristina Martsenko <kristina.martsenko@arm.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    ccc43810
perf_callchain.c 5.05 KB