Re: [PATCH] Set unknown_syscall differently on arm linux

Mike Frysinger
2016-06-30T12:58:44Z

[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]