lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 30 Jun 2021 11:38:07 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Marcos Del Sol Vives <marcos@...a.pet>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] x86: add NOPL and CMOV emulation

On Tue, Jun 29, 2021 at 10:45:17PM +0200, Marcos Del Sol Vives wrote:
> All the documentation I had previously read suggested that only CMOV and
> NOPL had been introduced with the i686, and hence these were the two
> instructions I emulated only. As stated previously this is also enough to
> boot Debian mostly flawless.
> 
> However, and contrary to what I thought, the i686 also saw the introduction
> of a handful of other x87 instructions (FCMOVB, FCMOVBE, FCMOVE, FCMOVNB,
> FCMOVNBE, FCMOVNE, FCMOVNU, FCMOVU, FCOMI, FCOMIP, FUCOMI, FUCOMIP)

Yah, looka here:

https://en.wikipedia.org/wiki/FCMOV

So before we play with this further, you could try to add a "nofpu"
kernel cmdline param which does what fpu__init_system_early_generic()
does:

	setup_clear_cpu_cap(X86_FEATURE_FPU)

to stop the kernel from setting up FPU support and see how far you can
get there.

I'm afraid glibc does its own feature detection so it will see the FPU
CPUID bit but if the kernel doesn't support an FPU - and glibc needs
the kernel to handle the context - then maybe it'll stop using FPU
instructions.

But you'll have to try it because I fear no one even tested such a
thing.

Good luck. :)

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ