• Mark Brown's avatar
    kselftest/arm64: Run BTI selftests on systems without BTI · 1c3b6145
    Mark Brown authored
    The BTI selftests are built both with and without BTI support, validating
    both the generation of BTI signals as expected for binaries without BTI
    support. Both versions of the binary currently skip all their tests when
    the system does not support BTI, however this is excessive since we do have
    a defined ABI for how the programs should function in this case (especially
    for the non-BTI binary). Update the test program to run all the tests
    unconditionally, adding a runtime adjustment of the expected results on
    systems that don't support BTI where we currently handle the build time
    case.
    
    The tests all use HINT space instructions, BTI itself is a HINT as is
    are the PAC instructions that function as landing pads, so nothing in the
    tests depends on support for BTI in the kernel or hardware.
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    Link: https://lore.kernel.org/r/20230110-arm64-bti-selftest-skip-v1-2-143ecdc84567@kernel.orgSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    1c3b6145
test.c 4.88 KB