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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4862A25C.2060703@agner.org>
Date:	Wed, 25 Jun 2008 21:54:04 +0200
From:	Agner Fog <agner@...er.org>
To:	Arjan van de Ven <arjan@...radead.org>
CC:	linux-kernel@...r.kernel.org
Subject: Re: ABI change for device drivers using future AVX instruction set

Arjan van de Ven wrote:
 >Let me repeat this loud and clear:
 >It is not allowed to use floating point, SSE of AVX in device drivers.

Thank you for a clear answer. Re-reading the ABI:
 >A.2.4 Miscellaneous Remarks
 >Linux Kernel code is not allowed to change the x87 and SSE units. If 
those are
 >changed by kernel code, they have to be restored properly before 
sleeping or leaving
 >the kernel. On preemptive kernels also more precautions may be needed.

This states your point, but certainly not "loud and clear" :-)

This ABI statement has to be amended, however, because it is allowed to 
use any register as long it is "restored properly". A programmer can 
save a single XMM register, use it, and restore it. A programmer might 
think that it is possible to do the same with a YMM register, but this 
will not work on future systems that extend the 256-bit YMM registers to 
512-bit ZMM or whatever. This has to be said "loud and clear" because 
nobody would discover the error until a distant future when we have ZMM.

Let me explain the background for this as I understand it:
Intel have decided to make two versions of every existing XMM 
instruction in the new AVX: A legacy version that leaves the upper half 
of the YMM register unchanged, and a new AVX version that clears the 
upper part of the YMM register in order to avoid false dependencies. 
This very expensive decision was necessary for only one reason: To 
prevent existing device drivers from destroying the upper part of the 
YMM registers. Learning from past mistakes, they are saying already now 
that they will not use the same fix next time the registers are made 
bigger. When ZMM and still bigger registers are introduced, the YMM 
instructions will clear bit number 256 and up of the ZMM or whatever 
registers.

Note: Please Cc: me of any replies. I am not on the mailing list.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ