Home GnuPG

hwf-x86: fix use of wrong operand type

Description

hwf-x86: fix use of wrong operand type

* src/hwf-x86.c (get_cpuid): Use xchg for swapping %ebx back
and forth between operand register.

HW feature routine was giving wrong results with certain compiler &
compiler flag combinations on i386. Issue was that "=g" operand was
used which caused problem if compiler allocated %ebx register for
this operand. CPUID assembly block attempts to save %ebx as in older
GCC versions this register was fixed for GOT pointer use and could
not be modified otherwise (could not be used as operand or clobber).

  • Reported-by: Iru Cai <vimacs@disroot.org>
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Apr 28 2021, 6:19 PM
Parents
rC060c378c050e: ecc: Check the input length for the point.
Branches
Unknown
Tags
Unknown