Re: [PATCH v5 2/3] selftests/lam: Skip test if LAM is disabled

2025-01-24 Thread Maciej Wieczor-Retman
On 2025-01-24 at 08:23:09 -0800, Dave Hansen wrote: >On 11/27/24 09:35, Maciej Wieczor-Retman wrote: >> +static inline int kernel_has_lam(void) >> +{ >> +unsigned long bits; >> + >> +syscall(SYS_arch_prctl, ARCH_GET_MAX_TAG_BITS, &bits); >> +return !!bits; >> +} > >Generally, I'm less p

Re: [PATCH v5 2/3] selftests/lam: Skip test if LAM is disabled

2025-01-24 Thread Dave Hansen
On 11/27/24 09:35, Maciej Wieczor-Retman wrote: > +static inline int kernel_has_lam(void) > +{ > + unsigned long bits; > + > + syscall(SYS_arch_prctl, ARCH_GET_MAX_TAG_BITS, &bits); > + return !!bits; > +} Generally, I'm less picky about selftest/ code than in-kernel code. But people r

[PATCH v5 2/3] selftests/lam: Skip test if LAM is disabled

2024-11-27 Thread Maciej Wieczor-Retman
Until LASS is merged into the kernel [1], LAM is left disabled in the config file. Running the LAM selftest with disabled LAM only results in unhelpful output. Use one of LAM syscalls() to determine whether the kernel was compiled with LAM support (CONFIG_ADDRESS_MASKING) or not. Skip running the