All of lore.kernel.org
 help / color / mirror / Atom feed
* arm64 Kernel is overly verbose on user faults
@ 2014-07-25 12:22 Riku Voipio
  2014-07-25 13:45 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Riku Voipio @ 2014-07-25 12:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Arm64 kernel dmesg will print out a multiline message if any user
binary segfaults. We get "unhandled level X translation fault" with
pr_info, show_pte() with pr_alert and show_regs with default kernel
level:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/mm/fault.c#n111

Contrast to arm32 version, where it is only done if CONFIG_DEBUG_USER
is selected and user_debug=N is passed down from kernel command line:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/mm/fault.c#n161

The verboseness was useful in early platform bringup, but now it is
now a more source of confusion (people google for unhandled level
translation fault and find old linaro bugs..) . For end users pov, the
x86 version with single line on INFO level would probably be good:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x86/mm/fault.c#n729

example:

test[8901]: segfault at 0 ip 00007fe456a4621f sp 00007ffffd465a90
error 6 in libc-2.19.so[7fe4569db000+19f000]

Could the arm64 behavior be changed to match arm or x86 printouts?

Riku

^ permalink raw reply	[flat|nested] 2+ messages in thread

* arm64 Kernel is overly verbose on user faults
  2014-07-25 12:22 arm64 Kernel is overly verbose on user faults Riku Voipio
@ 2014-07-25 13:45 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2014-07-25 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 25, 2014 at 01:22:49PM +0100, Riku Voipio wrote:
> Arm64 kernel dmesg will print out a multiline message if any user
> binary segfaults. We get "unhandled level X translation fault" with
> pr_info, show_pte() with pr_alert and show_regs with default kernel
> level:

I agree show_pte() is not useful for user debugging but I'm not sure
about show_regs(), it may come in handy when debugging some user
application.

We could hide the extra information like show_pte behind a
CONFIG_DEBUG_USER while keeping the short reporting as it currently is
(based on show_unhandled_signals).

-- 
Catalin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-25 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-25 12:22 arm64 Kernel is overly verbose on user faults Riku Voipio
2014-07-25 13:45 ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.