linux-stable/arch/openrisc/kernel
Eric W. Biederman 34ad59099e signal/openrisc: Fix do_unaligned_access to send the proper signal
commit 500d583005 upstream.

While reviewing the signal sending on openrisc the do_unaligned_access
function stood out because it is obviously wrong.  A comment about an
si_code set above when actually si_code is never set.  Leading to a
random si_code being sent to userspace in the event of an unaligned
access.

Looking further SIGBUS BUS_ADRALN is the proper pair of signal and
si_code to send for an unaligned access. That is what other
architectures do and what is required by posix.

Given that do_unaligned_access is broken in a way that no one can be
relying on it on openrisc fix the code to just do the right thing.

Fixes: 769a8a9622 ("OpenRISC: Traps")
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: openrisc@lists.librecores.org
Acked-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 20:23:06 +01:00
..
.gitignore openrisc: Add .gitignore 2017-02-25 04:14:36 +09:00
asm-offsets.c openrisc: use kbuild.h instead of defining macros in asm-offset.c 2012-10-25 15:54:33 +02:00
dma.c treewide: Constify most dma_map_ops structures 2017-01-24 12:23:35 -05:00
entry.S scripts/spelling.txt: add "efective" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
head.S scripts/spelling.txt: add "aligment" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
irq.c openrisc: Get rid of handle_IRQ 2014-09-03 13:11:02 +00:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
module.c openrisc: Refactor 16-bit constant relocation 2013-11-05 16:27:55 +01:00
or32_ksyms.c openrisc: Switch to use export.h instead of module.h 2017-05-15 22:02:33 +09:00
process.c OpenRISC fixes for 4.13 2017-07-07 13:58:49 -07:00
prom.c openrisc: remove unnecessary prom.c includes 2013-10-09 11:39:01 -05:00
ptrace.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
setup.c openrisc: add cache way information to cpuinfo 2017-02-06 21:50:41 +09:00
signal.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
sys_call_table.c OpenRISC: System calls 2011-07-22 18:46:34 +02:00
time.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
traps.c signal/openrisc: Fix do_unaligned_access to send the proper signal 2018-02-16 20:23:06 +01:00
vmlinux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmlinux.lds.S scripts/spelling.txt: add "aligment" pattern and fix typo instances 2017-02-27 18:43:46 -08:00