Skip to content

Commit 0af643f

Browse files
keesgregkh
authored andcommitted
lkdtm/bugs: XFAIL UNALIGNED_LOAD_STORE_WRITE
commit a15676a upstream. When built under CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, this test is expected to fail (i.e. not trip an exception). Fixes: 46d1a0f ("selftests/lkdtm: Add tests for LKDTM targets") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210623203936.3151093-5-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent baedb1f commit 0af643f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/misc/lkdtm/bugs.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ void lkdtm_UNALIGNED_LOAD_STORE_WRITE(void)
144144
if (*p == 0)
145145
val = 0x87654321;
146146
*p = val;
147+
148+
if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
149+
pr_err("XFAIL: arch has CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS\n");
147150
}
148151

149152
void lkdtm_SOFTLOCKUP(void)

0 commit comments

Comments
 (0)