[PATCH v1 0/2] selftests/x86: Skip int80 if not supported

Slawomir Rosek posted 2 patches 1 month, 3 weeks ago
tools/testing/selftests/x86/ldt_gdt.c        | 21 +++++++++++++++++++-
tools/testing/selftests/x86/ptrace_syscall.c | 20 +++++++++++++++++--
2 files changed, 38 insertions(+), 3 deletions(-)
[PATCH v1 0/2] selftests/x86: Skip int80 if not supported
Posted by Slawomir Rosek 1 month, 3 weeks ago
The IA32 Emulation support can be either removed from the kernel,
disabled by default or disabled at runtime. Some of x86 selftests
are crashing for all of above thus is_32bit_syscall_supported()
helper is added to skip int80 syscalls if they are not supported.

Slawomir Rosek (2):
  selftests/x86/ldt_gdt: Skip int80 if not supported
  selftests/x86/ptrace_syscall: Skip int80 if not supported

 tools/testing/selftests/x86/ldt_gdt.c        | 21 +++++++++++++++++++-
 tools/testing/selftests/x86/ptrace_syscall.c | 20 +++++++++++++++++--
 2 files changed, 38 insertions(+), 3 deletions(-)

-- 
2.52.0.305.g3fc767764a-goog
Re: [PATCH v1 0/2] selftests/x86: Skip int80 if not supported
Posted by Sławomir Rosek 3 weeks, 5 days ago
On Wed, Dec 17, 2025 at 2:59 PM Slawomir Rosek <srosek@google.com> wrote:
>
> The IA32 Emulation support can be either removed from the kernel,
> disabled by default or disabled at runtime. Some of x86 selftests
> are crashing for all of above thus is_32bit_syscall_supported()
> helper is added to skip int80 syscalls if they are not supported.
>
> Slawomir Rosek (2):
>   selftests/x86/ldt_gdt: Skip int80 if not supported
>   selftests/x86/ptrace_syscall: Skip int80 if not supported

Hi all,

Just a gentle reminder, it would be really great if someone could take
a look. Thanks in advance.

Best regards,
S. Rosek

>
>  tools/testing/selftests/x86/ldt_gdt.c        | 21 +++++++++++++++++++-
>  tools/testing/selftests/x86/ptrace_syscall.c | 20 +++++++++++++++++--
>  2 files changed, 38 insertions(+), 3 deletions(-)
>
> --
> 2.52.0.305.g3fc767764a-goog
>
Re: [PATCH v1 0/2] selftests/x86: Skip int80 if not supported
Posted by H. Peter Anvin 2 weeks, 1 day ago
On 2026-01-12 03:23, Sławomir Rosek wrote:
> On Wed, Dec 17, 2025 at 2:59 PM Slawomir Rosek <srosek@google.com> wrote:
>>
>> The IA32 Emulation support can be either removed from the kernel,
>> disabled by default or disabled at runtime. Some of x86 selftests
>> are crashing for all of above thus is_32bit_syscall_supported()
>> helper is added to skip int80 syscalls if they are not supported.
>>
>> Slawomir Rosek (2):
>>   selftests/x86/ldt_gdt: Skip int80 if not supported
>>   selftests/x86/ptrace_syscall: Skip int80 if not supported
> 
> Hi all,
> 
> Just a gentle reminder, it would be really great if someone could take
> a look. Thanks in advance.

I think grepping the configuration and cmdline files is definitely not the way
to go.

For a solution that works on existing kernels, trapping SIGSEGV and calling
int $0x80 is probably the best way to probe.

	-hpa