[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e36b3d2-ab20-482e-b35d-0540f950eb72@zytor.com>
Date: Fri, 23 Jan 2026 17:01:35 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Borislav Petkov <bp@...en8.de>, Slawomir Rosek <srosek@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
Shuah Khan <shuah@...nel.org>, Betty Zhou <bettyzhou@...gle.com>,
Wake Liu <wakel@...gle.com>, Kazuhiro Inaba <kinaba@...gle.com>,
Jeff Xu <jeffxu@...gle.com>, Alistair Delva <adelva@...gle.com>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v1 1/2] selftests/x86/ldt_gdt: Skip int80 if not supported
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
Powered by blists - more mailing lists