linux-brain/arch/mn10300
Eric W. Biederman 2dab221939 mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy
commit 6ac1dc736b upstream.

Setting si_code to 0 is the same a setting si_code to SI_USER which is definitely
not correct.  With si_code set to SI_USER si_pid and si_uid will be copied to
userspace instead of si_addr.  Which is very wrong.

So fix this by using a sensible si_code (SEGV_MAPERR) for this failure.

Fixes: b920de1b77 ("mn10300: add the MN10300/AM33 architecture to the kernel")
Cc: David Howells <dhowells@redhat.com>
Cc: Masakazu Urade <urade.masakazu@jp.panasonic.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 20:09:47 +01:00
..
boot MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
configs cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
include mn10300: failing __get_user() and get_user() should zero 2016-09-24 10:07:43 +02:00
kernel Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-01 14:33:35 -07:00
lib mn10300: copy_from_user() should zero on access_ok() failure... 2016-09-24 10:07:45 +02:00
mm mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy 2018-02-16 20:09:47 +01:00
oprofile MN10300: Kill MN10300's own profiling Kconfig 2009-04-09 10:53:16 -07:00
proc-mn2ws0050 Disintegrate asm/system.h for MN10300 2012-03-28 18:30:02 +01:00
proc-mn103e010 MN10300: Create general kernel debugger cache flushing 2011-03-18 16:54:30 +00:00
unit-asb2303 mn10300: don't use module_init in non-modular flash.c code 2015-06-16 14:12:30 -04:00
unit-asb2305 PCI: Revert "PCI: Call pci_read_bridge_bases() from core instead of arch code" 2015-09-15 13:18:04 -05:00
unit-asb2364 mn10300: Remove deprecated IRQF_DISABLED 2014-03-04 21:47:51 +01:00
Kconfig mn10300: Select CONFIG_HAVE_UID16 to fix build failure 2015-11-30 07:01:40 -08:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Makefile mn10300: Remove redundant debugging info flag 2014-01-28 10:57:06 +01:00