linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: arm64: Unimplemented syscall kernel message
Date: Mon, 22 Jan 2018 13:18:51 +0000	[thread overview]
Message-ID: <20180122131851.GA28638@arm.com> (raw)
In-Reply-To: <20180121174401.GA44039@dinsnail.net>

Hi Michael,

On Sun, Jan 21, 2018 at 06:44:01PM +0100, Michael Weiser wrote:
> I'd like ask your opinion as arm64 Linux port maintainers and initial
> authors of the code in question regarding kernel messages on
> unimplemented system calls. I apologise in advance if that isn't the
> right approach (and Cc: linux-arm :).
> 
> Currently, a programm doing an unimplemented syscall triggers a rather
> scary looking kernel message:
> 
> [  189.143682] glibc-test[2118]: syscall 1000
> [  189.143728] Code: aa0503e4 aa0603e5 aa0703e6 d4000001 (b13ffc1f) 
> [  189.143750] CPU: 1 PID: 2118 Comm: glibc-test Not tainted 4.15.0-rc7-00232-g2c1cfa499018 #3
> [  189.143755] Hardware name: SoPine with baseboard (DT)
> [  189.143762] pstate: 80000000 (Nzcv daif -PAN -UAO)
> [  189.143774] pc : 0xffffb8fb0104
> [  189.143779] lr : 0xaaaab43c563c
> [  189.143781] sp : 0000ffffd4fa1180
> [  189.143786] x29: 0000ffffd4fa1190 x28: 0000000000000000 
> [  189.143795] x27: 0000000000000000 x26: 0000000000000000 
> [  189.143802] x25: 0000000000000000 x24: 0000000000000000 
> [  189.143809] x23: 0000000000000000 x22: 0000000000000000 
> [  189.143816] x21: 0000aaaab43c564c x20: 0000000000000000 
> [  189.143823] x19: 0000aaaab43c5770 x18: 0000000000000a03 
> [  189.143829] x17: 0000aaaab43d6020 x16: 0000ffffb8fb00e0 
> [  189.143837] x15: 0000ffffb8ed4000 x14: 0000ffffb8ed7540 
> [  189.143844] x13: 0000ffffb8ee45d8 x12: 0000000000000000 
> [  189.143851] x11: 0000000000000020 x10: 0000000000000000 
> [  189.143857] x9 : 00000000000000ff x8 : 00000000000003e8 
> [  189.143864] x7 : e607cc2262a01600 x6 : e607cc2262a01600 
> [  189.143872] x5 : 0000ffffd4fa12c0 x4 : 0000000000000000 
> [  189.143879] x3 : 0000000000000000 x2 : 0000aaaab43c5630 
> [  189.143886] x1 : 0000ffffd4fa12d8 x0 : 0000ffffd4fa12c8 
> 
> It requires some digging to find that this basically is a
> debugging/warning message and can be disabled using
> /proc/sys/debug/exception-trace
> (arm64/kernel/traps.c:do_ni_syscall,show_unhandled_signals_ratelimited).
> 
> Other platforms do not seem to do this, even with exception-trace
> enabled - x86_64 and arm for sure. Instead they silently return -ENOSYS.
> 
> There are a number of other kernel messages governed by the same sysctl
> (fault.c:__do_user_fault,do_sp_pc_abort, traps.c:force_signal_inject,
> signal.c:sys_rt_sigreturn).
> 
> Can I in good conscience disable exception-trace on the affected
> (production) systems or would this mask other, more critical
> misbehaviour?
> 
> Is it actually considered misbehaviour for arm64 userland to even
> attempt such a call? Or is the message maybe just a left-over development
> aid?
> 
> Can it perhaps be removed or disabled by default, considering that with
> future addition of syscalls userland will likely start triggering this
> message a lot when run on older kernels?

I agree that printing this stuff is bogus. We should instead just return
-ENOSYS via a redirect to sys_ni_syscall. The only corner case is for the
compat private syscalls, where we should match 32-bit and dispatch SIGILL
for that range (and then probably print the warning based on
show_unhandled_signals_ratelimited because there's a signal involved).

Will

  reply	other threads:[~2018-01-22 13:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-21 17:44 arm64: Unimplemented syscall kernel message Michael Weiser
2018-01-22 13:18 ` Will Deacon [this message]
2018-01-22 21:20   ` [PATCH 0/2] " Michael Weiser
2018-01-22 21:20     ` [PATCH 1/2] arm64: Remove unimplemented syscall log message Michael Weiser
2018-01-29 15:38       ` Will Deacon
2018-01-22 21:20     ` [PATCH 2/2] arm64: Mirror arm for unimplemented compat syscalls Michael Weiser
2018-01-29 15:37       ` Will Deacon
2018-02-01 22:13   ` [PATCH v2 0/2] arm64: Unimplemented syscall kernel message Michael Weiser
2018-02-01 22:13     ` [PATCH v2 1/3] arm64: Remove unimplemented syscall log message Michael Weiser
2018-02-01 22:13     ` [PATCH v2 2/3] arm64: Mirror arm for unimplemented compat syscalls Michael Weiser
2018-02-01 22:13     ` [PATCH v2 3/3] arm64: Disable unhandled signal log messages by default Michael Weiser
2018-02-19 15:39     ` [PATCH v2 0/2] arm64: Unimplemented syscall kernel message Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180122131851.GA28638@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).