Linux kernel source tree
Go to file
Qian Cai 1091b1b93c UPSTREAM: mm/page_alloc: silence a KASAN false positive
kernel_init_free_pages() will use memset() on s390 to clear all pages from
kmalloc_order() which will override KASAN redzones because a redzone was
setup from the end of the allocation size to the end of the last page.
Silence it by not reporting it there.  An example of the report is,

 BUG: KASAN: slab-out-of-bounds in __free_pages_ok
 Write of size 4096 at addr 000000014beaa000
 Call Trace:
 show_stack+0x152/0x210
 dump_stack+0x1f8/0x248
 print_address_description.isra.13+0x5e/0x4d0
 kasan_report+0x130/0x178
 check_memory_region+0x190/0x218
 memset+0x34/0x60
 __free_pages_ok+0x894/0x12f0
 kfree+0x4f2/0x5e0
 unpack_to_rootfs+0x60e/0x650
 populate_rootfs+0x56/0x358
 do_one_initcall+0x1f4/0xa20
 kernel_init_freeable+0x758/0x7e8
 kernel_init+0x1c/0x170
 ret_from_fork+0x24/0x28
 Memory state around the buggy address:
 000000014bea9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 000000014bea9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>000000014beaa000: 03 fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
                    ^
 000000014beaa080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 000000014beaa100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe

Fixes: 6471384af2 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options")
Signed-off-by: Qian Cai <cai@lca.pw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Vasily Gorbik <gor@linux.ibm.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Link: http://lkml.kernel.org/r/20200610052154.5180-1-cai@lca.pw
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 9e15afa5a8)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9375f117c1aa08c0d5d0e881bb5a917458f97c99
2020-11-15 15:06:07 +01:00
android ANDROID: GKI: update the ABI xml 2020-10-30 12:21:53 +08:00
arch UPSTREAM: ARM64: vdso32: Install vdso32 from vdso_install 2020-11-15 15:06:05 +01:00
block This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
certs
crypto This is the 4.19.153 stable release 2020-10-29 11:36:20 +01:00
Documentation This is the 4.19.155 stable release 2020-11-05 14:02:27 +01:00
drivers UPSTREAM: coresight: tmc: Fix bad register address for CLAIM 2020-11-15 15:06:03 +01:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs UPSTREAM: fscrypt: restrict IV_INO_LBLK_32 to ino_bits <= 32 2020-11-15 15:06:04 +01:00
include This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
init This is the 4.19.155 stable release 2020-11-05 14:02:27 +01:00
ipc Revert "ANDROID: vfs: Add permission2 for filesystems with per mount permissions" 2020-06-27 15:17:42 +02:00
kernel This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
lib This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm UPSTREAM: mm/page_alloc: silence a KASAN false positive 2020-11-15 15:06:07 +01:00
net This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
samples This is the 4.19.154 stable release 2020-10-30 11:43:26 +01:00
scripts Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
security This is the 4.19.155 stable release 2020-11-05 14:02:27 +01:00
sound This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
tools This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch 2020-10-01 13:14:54 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
build.config.aarch64 Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
build.config.allmodconfig Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
build.config.allmodconfig.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.arm ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.arm Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
build.config.common ANDROID: clang: update to 11.0.5 2020-10-27 11:18:23 -07:00
build.config.gki ANDROID: gki: Removed cf modules from gki_defconfig 2020-01-31 16:23:38 -08:00
build.config.gki_kasan ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki-debug.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki-debug.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki.aarch64 ANDROID: GKI: prevent removal of monitored symbols 2020-09-29 11:48:43 +01:00
build.config.gki.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.x86_64 Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS UPSTREAM: net: WireGuard secure network tunnel 2020-10-25 11:48:12 +01:00
Makefile This is the 4.19.157 stable release 2020-11-11 11:16:11 +01:00
README

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

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

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.