mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
nehemiah: manually assemble xstore(-rng)
It seems that clang IAS erronously adds repz prefix which should not be there. Cpu would try to store around %ecx bytes of random, while we only expect a word. PR: 259218 Reported and tested by: Dennis Clarke <dclarke@blastwave.org> Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
5fff2859ec
commit
362c6d8dec
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ VIA_RNG_store(void *buf)
|
|||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile(
|
||||
"movl $0,%%edx\n\t"
|
||||
"xstore"
|
||||
".byte 0x0f, 0xa7, 0xc0"
|
||||
: "=a" (retval), "+d" (rate), "+D" (buf)
|
||||
:
|
||||
: "memory"
|
||||
|
|
|
|||
Loading…
Reference in a new issue