diff options
author | Kristina Martsenko <kristina.martsenko@arm.com> | 2022-12-09 20:34:41 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-12-31 15:33:07 +0300 |
commit | d7d99f1a0af0fafbb16123148859759580174e07 (patch) | |
tree | 008158f9c7fa16808ccd203921743ff3ac0674fc /fs/pstore | |
parent | 2c5e64f0a8d356616329ea26382b86dd191f9d70 (diff) | |
download | linux-d7d99f1a0af0fafbb16123148859759580174e07.tar.xz |
lkdtm: cfi: Make PAC test work with GCC 7 and 8
[ Upstream commit f68022ae0aeb0803450e05abc0e984027c33ef1b ]
The CFI test uses the branch-protection=none compiler attribute to
disable PAC return address protection on a function. While newer GCC
versions support this attribute, older versions (GCC 7 and 8) instead
supported the sign-return-address=none attribute, leading to a build
failure when the test is built with older compilers. Fix it by checking
which attribute is supported and using the correct one.
Fixes: 2e53b877dc12 ("lkdtm: Add CFI_BACKWARD to test ROP mitigations")
Reported-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/all/CAEUSe78kDPxQmQqCWW-_9LCgJDFhAeMoVBFnX9QLx18Z4uT4VQ@mail.gmail.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/pstore')
0 files changed, 0 insertions, 0 deletions