On Tue, Jun 18, 2019 at 09:10:13AM +0200, Rasmus Villemoes wrote: > On 18/06/2019 06.55, Kees Cook wrote: > > > +#else > > + pr_err("FAIL: this test is x86_64-only\n"); > > +#endif > > +} > > Why expose it at all on all other architectures? If you wrap the > CRASHTYPE() in an #ifdef, you can also guard the whole lkdtm_UNSET_SMEP > definition (the declaration in lkdtm.h can stay, possibly with a comment > saying /* x86-64 only */). My preference for LKDTM is for all the tests to be visible regardless of architecture so that the testing "environment" doesn't have to change depending on architecture. I've found it easier to deal with when I ran test harnesses on Chrome OS where I had cross-architectural scripts. Doing a side-by-side with a PASS and an XFAIL was more sensible to compare than a PASS and a missing test. -- Kees Cook