This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Set unknown_syscall differently on arm linux
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 30 Jun 2016 08:52:11 +0100
- Subject: Re: [PATCH] Set unknown_syscall differently on arm linux
- Authentication-results: sourceware.org; auth=none
- References: <1467105996-18063-1-git-send-email-yao dot qi at linaro dot org> <20160629174103 dot GW4685 at vapier dot lan>
On Wed, Jun 29, 2016 at 6:41 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On 28 Jun 2016 10:26, Yao Qi wrote:
>> Currently, we use 123456789 as unknown or illegal syscall number, and
>> expect program return ENOSYS. Although 123456789 is an illegal syscall
>> number on arm linux, kernel sends SIGILL rather than returns -ENOSYS.
>
> err, what ? calling random syscalls should not result in signals being
> generated (ignoring obvious ones like __NR_kill). is the kernel broken ?
> i think this needs more investigation & explanation.
I checked kernel source arch/arm/kernel/traps.c:arm_syscall, and that is how
I get the knowledge that kernel doesn't raise SIGIILL if sysno is within
0xf0001..0xf07ff. That is intentional, but I don't know why arm kernel behaves
this way.
--
Yao (éå)