9

Or more specifically, how do I ensure that /proc/cpuinfo and the CPUID opcode do not show that AVX is enabled?

(For context, there is a bug on some Amazon EC2 instances, where AVX is falsely reported as active which causes programs that dynamically use AVX instructions to crash with SIGILL).

I've seen this kernel patch: https://patchwork.kernel.org/patch/1521191/, but I'm not sure if that affects just the kernel's avx usage or also patches up CPUID and /proc/cpuinfo. Regardless, I am hoping to find a solution that works on the linux 2.6.x kernel series.

UsAaR33
  • 3,536
  • 2
  • 34
  • 55
  • Mount proc elsewhere, symlink everything else than cpuinfo to `/proc` and store a customized file called `cpuinfo` in the `/proc` directory. – Gunther Piez Dec 22 '12 at 10:12
  • 5
    Add `noxsave` to your kernel boot options (e.g. at the end of the linux line in Grub) when you boot. This will disable AVX. – Z boson Feb 13 '18 at 14:15
  • Add `clearcpuid=156` to you kernel boot options. NB: there is no options to disable respective CPUID flags but well-behaving applications check also XCR0 which changes. See [Are the xgetbv and CPUID checks sufficient to guarantee AVX2 support?](https://stackoverflow.com/questions/72522885) for some additional information about XCR0. – Pavel Shishpor Mar 14 '23 at 14:57

0 Answers0