On Thu, May 05, 2022 at 01:45:37PM +0100, Mark Rutland wrote: > Hi Kees, > > I hadn't realised the LKDTM STACKLEAK test could be built with > CONFIG_STACKLEAK=n, and my rework of that depends upon helpers that only exist > when CONFIG_STACKLEAK=y. > > IMO the test is nonsensical for CONFIG_STACKLEAK=n, and I reckon we should > either: > > a) Not build the stackleak test at all when CONFIG_STACKLEAK=n > > b) Have a small stub that just logs that CONFIG_STACKLEAK=n and the test is > being skipped. > > Do you have any preference between the two? Since it's looking for a specific poison, it doesn't make sense to look for this property as magically appearing (where as this kind of thing sometimes exists for other tests: did the hypervisor block it instead of the kernel, etc) So, yeah, I'd wrap it in an ifdef with an else: XFAIL. -- Kees Cook