From: "H. Peter Anvin" <hpa@zytor.com>
To: Borislav Petkov <bp@alien8.de>, Slawomir Rosek <srosek@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Shuah Khan <shuah@kernel.org>,
Betty Zhou <bettyzhou@google.com>, Wake Liu <wakel@google.com>,
Kazuhiro Inaba <kinaba@google.com>, Jeff Xu <jeffxu@google.com>,
Alistair Delva <adelva@google.com>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v1 1/2] selftests/x86/ldt_gdt: Skip int80 if not supported
Date: Fri, 23 Jan 2026 17:01:35 -0800 [thread overview]
Message-ID: <3e36b3d2-ab20-482e-b35d-0540f950eb72@zytor.com> (raw)
In-Reply-To: <20260123165411.GBaXOns6lupfE0pxX-@fat_crate.local>
On 2026-01-23 08:54, Borislav Petkov wrote:
>
> Hmmm, so, my gut feeling tells me that we need a proper ia32 emu support
> detection in the running kernel. I can't find one after a short grep, maybe it
> should be in /proc/cpuinfo, maybe it should be a syscall which fails when
> IA32_EMULATION is off or maybe ptrace(2) says somewhere in the depths of its
> countless ops that it does support IA32 emulation.
>
> And then you could put that in that helper and then put that helper in
> a header and not copy it in every test...
>
You can probe for it by trapping SIGSEGV and calling int $0x80. Not exactly
pretty, but...
Making it a sysfs entry would allow dynamically control it, too...
-hpa
next prev parent reply other threads:[~2026-01-24 1:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 13:59 [PATCH v1 0/2] selftests/x86: Skip int80 if not supported Slawomir Rosek
2025-12-17 13:59 ` [PATCH v1 1/2] selftests/x86/ldt_gdt: " Slawomir Rosek
2026-01-23 16:54 ` Borislav Petkov
2026-01-23 17:07 ` Dave Hansen
2026-01-24 1:01 ` H. Peter Anvin [this message]
2026-02-13 17:26 ` Sławomir Rosek
2025-12-17 13:59 ` [PATCH v1 2/2] selftests/x86/ptrace_syscall: " Slawomir Rosek
2026-01-12 11:23 ` [PATCH v1 0/2] selftests/x86: " Sławomir Rosek
2026-01-24 1:18 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e36b3d2-ab20-482e-b35d-0540f950eb72@zytor.com \
--to=hpa@zytor.com \
--cc=adelva@google.com \
--cc=bettyzhou@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=jeffxu@google.com \
--cc=kinaba@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=shuah@kernel.org \
--cc=srosek@google.com \
--cc=tglx@linutronix.de \
--cc=wakel@google.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox