Re: [PATCH] x86: add hintable NOPs emulation
From: Marcos Del Sol Vives
Date: Thu Aug 21 2025 - 05:35:53 EST
El 21/08/2025 a las 3:43, H. Peter Anvin escribió:
> On August 19, 2025 6:34:46 PM PDT, Marcos Del Sol Vives <marcos@xxxxxxxx> wrote:
>> One such software is sudo in Debian bookworm, which is compiled with
>> GCC -fcf-protection=branch and contains ENDBR32 instructions. It crashes
>> on my Vortex86DX3 processor and VIA C3 Nehalem processors [1].
>>
>> This patch is a much simplified version of my previous patch for x86
>> instruction emulation [2], that only emulates hintable NOPs.
>>
>> [1]: https://lists.debian.org/debian-devel/2023/10/msg00118.html
>> [2]: https://lore.kernel.org/all/20210626130313.1283485-1-marcos@xxxxxxxx/
>
> Do those processors support FCOMI?
The Vortex86DX3, at the very least, does. Unlike the Vortex86MX I wrote the
previous patch for, this one seems to support all standard i686
instructions. It's modern enough to support SSE1, even.
I have tested it using the program I wrote for testing it on the -MX
last time: https://lore.kernel.org/all/b69e0c78-81eb-0d4d-dce5-076b5f239e28@xxxxxxxx/.
> marcos@vdx3:~$ LANG=C gcc -Wall fucomi-test.c -o fucomi-test
> marcos@vdx3:~$ ./fucomi-test
> Float value: 6.210000
> FPU status: 3800 EFLAGS: 00000242
Which matches 1:1 my current desktop Ryzen 8645H.
Greetings,
Marcos