No description
Find a file
Ethan Tuttle 5ef7a3782d ARM: mvebu: declare asm symbols as character arrays in pmsu.c
[ Upstream commit d0d378ff45 ]

With CONFIG_FORTIFY_SOURCE, memcpy uses the declared size of operands to
detect buffer overflows.  If src or dest is declared as a char, attempts to
copy more than byte will result in a fortify_panic().

Address this problem in mvebu_setup_boot_addr_wa() by declaring
mvebu_boot_wa_start and mvebu_boot_wa_end as character arrays.  Also remove
a couple addressof operators to avoid "arithmetic on pointer to an
incomplete type" compiler error.

See commit 54a7d50b92 ("x86: mark kprobe templates as character arrays,
not single characters") for a similar fix.

Fixes "detected buffer overflow in memcpy" error during init on some mvebu
systems (armada-370-xp, armada-375):

(fortify_panic) from (mvebu_setup_boot_addr_wa+0xb0/0xb4)
(mvebu_setup_boot_addr_wa) from (mvebu_v7_cpu_pm_init+0x154/0x204)
(mvebu_v7_cpu_pm_init) from (do_one_initcall+0x7c/0x1a8)
(do_one_initcall) from (kernel_init_freeable+0x1bc/0x254)
(kernel_init_freeable) from (kernel_init+0x8/0x114)
(kernel_init) from (ret_from_fork+0x14/0x2c)

Signed-off-by: Ethan Tuttle <ethan@ethantuttle.com>
Tested-by: Ethan Tuttle <ethan@ethantuttle.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-03 17:00:52 -07:00
arch ARM: mvebu: declare asm symbols as character arrays in pmsu.c 2018-10-03 17:00:52 -07:00
block
certs
crypto crypto: skcipher - Fix -Wstringop-truncation warnings 2018-10-03 17:00:45 -07:00
Documentation
drivers wlcore: Add missing PM call for wlcore_cmd_wait_for_event_or_timeout() 2018-10-03 17:00:52 -07:00
firmware
fs
include posix-timers: Sanitize overrun handling 2018-10-03 17:00:50 -07:00
init
ipc
kernel posix-timers: Sanitize overrun handling 2018-10-03 17:00:50 -07:00
lib scsi: klist: Make it safe to use klists in atomic context 2018-10-03 17:00:48 -07:00
mm
net 6lowpan: iphc: reset mac_header after decompress to fix panic 2018-10-03 17:00:47 -07:00
samples
scripts
security
sound ALSA: hda: Add AZX_DCAPS_PM_RUNTIME for AMD Raven Ridge 2018-10-03 17:00:51 -07:00
tools
usr
virt
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.