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>] [day] [month] [year] [list]
Message-ID: <CAJHc60yoipTA7WywvPSM52X-NgCTgy2Dvxn8OrCT=vPJNNxNxw@mail.gmail.com>
Date: Wed, 16 Oct 2024 13:07:58 -0700
From: Raghavendra Rao Ananta <rananta@...gle.com>
To: subhasish.ghosh@....com, andrew.jones@...ux.dev, joey.gouly@....com
Cc: Oliver Upton <oliver.upton@...ux.dev>, Marc Zyngier <maz@...nel.org>, kvmarm@...ts.linux.dev, 
	Linux ARM <linux-arm-kernel@...ts.infradead.org>, linux-kernel@...r.kernel.org
Subject: [kvm-unit-tests] arm64: Build failures in fpu.c test with clang

Hello,

Compiling the kvm-unit-tests for arm64 with clang gives the following error:

arm/fpu.c:235:3: error: unknown register name 'q0' in asm
                fpu_reg_read(outdata);
                ^
arm/fpu.c:59:10: note: expanded from macro 'fpu_reg_read'
                     : "q0", "q1", "q2", "q3",          \
                       ^
arm/fpu.c:281:3: error: unknown register name 'q0' in asm
                fpu_reg_write(*indata);
                ^
arm/fpu.c:92:10: note: expanded from macro 'fpu_reg_write'
                     : "q0", "q1", "q2", "q3",          \
                       ^
2 errors generated.

It's likely that clang doesn't have "q" registers in its dictionary,
so I tried replacing it with "v" registers, only in the clobbered
list. However, I think this granted clang to optimize the code in a
way that causes data abort at in fpu_reg_read() at the first
instruction:

stp q0, q1, [%0], #32\n\t"

Although removing the optimization flag, -O2, generates correct code
and the test passes.

Any suggestions on how to deal with this in a better way?

Thank you.
Raghavendra

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ