[PATCH] Set unknown_syscall differently on arm linux

Mike Frysinger vapier@gentoo.org
Thu Jun 30 12:58:00 GMT 2016


On 30 Jun 2016 08:52, Yao Qi wrote:
> 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.

wow, that code is messed up.  can you raise a bug with them ?  there's
even more code paths in there that result in SIGSEGV too.  the history
predates 2.4.0 afaict.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20160630/6e572c52/attachment.sig>


More information about the Gdb-patches mailing list