This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SIGILL in 32bit chroot on Cortex-A57

I'm getting a SIGILL when running a ARMv6 program in a chroot environment.

The instruction that triggers it is

Program received signal SIGILL, Illegal instruction.
0x000104f0 in f ()
(gdb) disassemble $pc
Dump of assembler code for function f:
=> 0x000104f0 <+0>:     mcr     15, 0, r0, cr7, cr10, {5}
   0x000104f4 <+4>:     str     r1, [r0]
   0x000104f8 <+8>:     bx      lr
End of assembler dump.

which is a memory barrier AFAIK.

Hardware is AMD A1170, kernel is 4.7.4 (despite the config file saying it's 4.7.0) with config file here and the user space is ArchLinuxARM.

The same code runs fine on another cortex-a57 device (Jetson TX1 with the original kernel provided by Nvidia) and I had some problem with the ArchlinuxARM kernel running 32bit programs before so it could be a kernel config problem. So I'd like to know, is this a hardware problem or is it a software (kernel) one. Is there a way I can check that and if it is a kernel config problem, what should I enable to make it working? (I'd also like to know the kernel option responsible for 32bit ELF support but that's a different question).

The corresponding C code (compiled with GCC) just for the reference.

__attribute__((noinline)) void f(void **p, void *v)
{
    __atomic_store_n(p, v, __ATOMIC_RELEASE);
}
Parents Reply Children
No data