On Thu, Feb 19, 2026 at 02:13:04AM -0800, Harshit Mogalapalli wrote:
> Hi stable maintainers,
> 
> When pkey_sighandler_tests_64 is run on machines with CPUs that don't
> support pkeys, instead of skipping the tests return SIGILL(illegal
> instruction).
> 
> # gdb  ./pkey_sighandler_tests_64
> 
> (gdb) info registers rip
> rip            0x402779            0x402779 
> <thread_segv_with_pkey0_disabled+9>
> (gdb) disassemble /r $rip-8,$rip+8
> Dump of assembler code from 0x402771 to 0x402781:
>    0x0000000000402771 <thread_segv_with_pkey0_disabled+1>:    c9              
>         leave
>    0x0000000000402772 <thread_segv_with_pkey0_disabled+2>:    b8 55 55 55 55  
>         mov    $0x55555555,%eax
>    0x0000000000402777 <thread_segv_with_pkey0_disabled+7>:    89 ca           
>         mov    %ecx,%edx
> => 0x0000000000402779 <thread_segv_with_pkey0_disabled+9>:    0f 01 ef        
>         wrpkru
>    0x000000000040277c <thread_segv_with_pkey0_disabled+12>:   0f 01 ee        
>         rdpkru
>    0x000000000040277f <thread_segv_with_pkey0_disabled+15>:   3d 55 55 55 55  
>         cmp
> 
> Tests result in:
> 
> ./pkey_sighandler_tests_64
> TAP version 13
> 1..5
> Illegal instruction (core dumped)
> 
> This is because 6.12.y commit: 1c6b1d4889d7 ("selftests/mm: skip
> pkey_sighandler_tests if support is missing") like upstream and
> backporting that needed few prerequsites, during this process I have
> seen a few build warnings, so also included patches that help fix these
> build warnings in the selftests.
> 
> All are clean cherry-picks. After patching the selftests the test is
> correctly skipped. These additional backports cleansup the code and
> avoids the need for conflict resolution and might help future backports.

Shouldn't you be always running the latest selftests on older kernels?
We don't always keep selftests up to date at all, as you can see here,
but newer selftests should ALWAYS work with older kernels.

I think trying to keep these all up to date is going to be "a lot", are
you sure it is going to be worth it?

thanks,

greg k-h

Reply via email to