linux/arch/unicore32
Eric W. Biederman d8f7f3228a signal/unicore32: Use FPE_FLTUNK instead of 0 in ucf64_raise_sigfpe
The si_code of 0 (aka SI_USER) has fields si_pid and si_uid not
si_addr so it so only by luck would the appropriate fields by copied
to userspace by copy_siginfo_to_user.

This is just broken and wrong.

Make it obvious what is happening by moving the si_code from a
parameter of the one call to ucf64_raise_sigfpe to a constant value
that info.si_code gets set to.

Explicitly set the si_code to FPE_FLTUNK the newly reserved floating
point si_code for an unknown floating point exception.

It looks like there is a fair chance that this is a code path that has
never been used in real life on unicore32.  The bad si_code and the
print statement that calls it an unhandled exception.  So I really
don't expect anyone will mind if this just gets fixed.

In similar situations on more popular architectures the conclusion was
just fix it.

Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Arnd Bergmann <arnd@arndb.de>
Fixes: d9bc15794d ("unicore32 additional architecture files: float point handling")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-04-25 10:40:56 -05:00
..
boot kbuild: drop redundant "PHONY += FORCE" 2016-04-20 10:38:40 +02:00
configs unicore32: use the new LED disk activity trigger 2016-06-27 08:58:42 +02:00
include unicore32: turn flush_dcache_mmap_lock into a no-op 2018-04-11 10:28:39 -07:00
kernel signal/unicore32: Use FPE_FLTUNK instead of 0 in ucf64_raise_sigfpe 2018-04-25 10:40:56 -05:00
lib License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm signal: Ensure every siginfo we send has all bits initialized 2018-04-25 10:40:51 -05:00
.gitignore
Kconfig Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-11-15 10:14:11 -08:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile unicore32: Use full path in KBUILD_IMAGE definition 2017-03-20 22:42:21 +09:00