From: Naveen N. Rao <hidden> Date: 2018-10-31 17:20:41
We are using 'dscr_insn' as a label in inline asm to identify if a
SIGILL was generated by the mtspr instruction at that point. However,
with inline assembly, the compiler is still free to duplicate the asm
statement for optimization purposes, which results in the label being
defined twice with the error:
/tmp/ccerQCql.s:874: Error: symbol `dscr_insn' is already defined
With different compiler versions, we may also see:
/tmp/ccJzLDlN.o:(.toc+0x0): undefined reference to `dscr_insn'
Remove the use of the label in the inline assembly. Instead, just look
for the offending instruction in the signal handler.
Reported-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Naveen N. Rao <redacted>
---
tools/testing/selftests/powerpc/utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: Naveen N. Rao <hidden> Date: 2018-10-31 17:26:58
Naveen N. Rao wrote:
We are using 'dscr_insn' as a label in inline asm to identify if a
SIGILL was generated by the mtspr instruction at that point. However,
with inline assembly, the compiler is still free to duplicate the asm
statement for optimization purposes, which results in the label being
defined twice with the error:
/tmp/ccerQCql.s:874: Error: symbol `dscr_insn' is already defined
With different compiler versions, we may also see:
/tmp/ccJzLDlN.o:(.toc+0x0): undefined reference to `dscr_insn'
Remove the use of the label in the inline assembly. Instead, just look
for the offending instruction in the signal handler.
Reported-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Naveen N. Rao <redacted>
---
Missed adding:
Fixes: d2bf793237b3aa9c ("selftests/powerpc: Add test to verify rfi flush across a system call")
- Naveen
hi Naveen,
On 10/31/18 2:24 PM, Naveen N. Rao wrote:
Naveen N. Rao wrote:
quoted
We are using 'dscr_insn' as a label in inline asm to identify if a
SIGILL was generated by the mtspr instruction at that point. However,
with inline assembly, the compiler is still free to duplicate the asm
statement for optimization purposes, which results in the label being
defined twice with the error:
/tmp/ccerQCql.s:874: Error: symbol `dscr_insn' is already defined
With different compiler versions, we may also see:
/tmp/ccJzLDlN.o:(.toc+0x0): undefined reference to `dscr_insn'
Remove the use of the label in the inline assembly. Instead, just look
for the offending instruction in the signal handler.
Cool, I've tested this patch on my mainline tree and selftests are being
able to build again. I also tested the rfi_flush_test selftest as other
tests (ptrace/ and tm/) and everything seems to be normal again.
Thank you!
quoted
Reported-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Naveen N. Rao <redacted>
From: Michael Ellerman <hidden> Date: 2018-11-01 12:59:25
On Wed, 2018-10-31 at 17:18:13 UTC, "Naveen N. Rao" wrote:
We are using 'dscr_insn' as a label in inline asm to identify if a
SIGILL was generated by the mtspr instruction at that point. However,
with inline assembly, the compiler is still free to duplicate the asm
statement for optimization purposes, which results in the label being
defined twice with the error:
/tmp/ccerQCql.s:874: Error: symbol `dscr_insn' is already defined
With different compiler versions, we may also see:
/tmp/ccJzLDlN.o:(.toc+0x0): undefined reference to `dscr_insn'
Remove the use of the label in the inline assembly. Instead, just look
for the offending instruction in the signal handler.
Reported-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Naveen N. Rao <redacted>
Tested-by: Breno Leitao <leitao@debian.org>