bad syscall <0x15b> on x86_64

Jan Kiszka jan.kiszka at
Wed Jan 30 08:34:36 CET 2019

On 29.01.19 23:14, Richard Weinberger via Xenomai wrote:
> Hi!
> When running a ia32 application on x86_64 I get bad syscall errors.
> This happens with ipipe-core-4.14.89-x86-2.patch and xenomai 3.0.8.
> The problem seems to be that both ipipe_handle_syscall() and
> handle_head_syscall()
> check for syscall-nr being >= NR_syscalls.
> On ia32 the syscall table is larger and therefore the check is wrong.

Hmm, the kernel's tracer also only checks for NR_syscalls. Strange.

> So the code has to check the TS_COMPAT flag and then compare either to
> NR_syscalls or IA32_NR_syscalls.
> I gave this already a short try and things seem to work better.

There are more places where we check for NR_syscalls, some in ipipe itself. 
Problem is that IA32_NR_syscalls is, well, IA32-specific while we are testing in 
generic code. We need to abstract that first, in ipipe. Then we can fix also 

Philippe, any better idea?


Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

More information about the Xenomai mailing list