Commit 51306806 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "18 patches.

  Subsystems affected by this patch series: mm (pagealloc, memcg, kasan,
  memory-failure, and highmem), ubsan, proc, and MAINTAINERS"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  MAINTAINERS: add a couple more files to the Clang/LLVM section
  proc_sysctl: fix oops caused by incorrect command parameters
  powerpc/mm/highmem: use __set_pte_at() for kmap_local()
  mips/mm/highmem: use set_pte() for kmap_local()
  mm/highmem: prepare for overriding set_pte_at()
  sparc/mm/highmem: flush cache and TLB
  mm: fix page reference leak in soft_offline_page()
  ubsan: disable unsigned-overflow check for i386
  kasan, mm: fix resetting page_alloc tags for HW_TAGS
  kasan, mm: fix conflicts with init_on_alloc/free
  kasan: fix HW_TAGS boot parameters
  kasan: fix incorrect arguments passing in kasan_add_zero_shadow
  kasan: fix unaligned address is unhandled in kasan_remove_zero_shadow
  mm: fix numa stats for thp migration
  mm: memcg: fix memcg file_dirty numa stat
  mm: memcg/slab: optimize objcg stock draining
  mm: fix initialization of struct page for holes in memory layout
  x86/setup: don't remove E820_TYPE_RAM for pfn 0
parents fdbc80bd e82d891a
Loading
Loading
Loading
Loading
+6 −21
Original line number Diff line number Diff line
@@ -160,29 +160,14 @@ intended for use in production as a security mitigation. Therefore it supports
boot parameters that allow to disable KASAN competely or otherwise control
particular KASAN features.

The things that can be controlled are:
- ``kasan=off`` or ``=on`` controls whether KASAN is enabled (default: ``on``).

1. Whether KASAN is enabled at all.
2. Whether KASAN collects and saves alloc/free stacks.
3. Whether KASAN panics on a detected bug or not.
- ``kasan.stacktrace=off`` or ``=on`` disables or enables alloc and free stack
  traces collection (default: ``on`` for ``CONFIG_DEBUG_KERNEL=y``, otherwise
  ``off``).

The ``kasan.mode`` boot parameter allows to choose one of three main modes:

- ``kasan.mode=off`` - KASAN is disabled, no tag checks are performed
- ``kasan.mode=prod`` - only essential production features are enabled
- ``kasan.mode=full`` - all KASAN features are enabled

The chosen mode provides default control values for the features mentioned
above. However it's also possible to override the default values by providing:

- ``kasan.stacktrace=off`` or ``=on`` - enable alloc/free stack collection
					(default: ``on`` for ``mode=full``,
					 otherwise ``off``)
- ``kasan.fault=report`` or ``=panic`` - only print KASAN report or also panic
					 (default: ``report``)

If ``kasan.mode`` parameter is not provided, it defaults to ``full`` when
``CONFIG_DEBUG_KERNEL`` is enabled, and to ``prod`` otherwise.
- ``kasan.fault=report`` or ``=panic`` controls whether to only print a KASAN
  report or also panic the kernel (default: ``report``).

For developers
~~~~~~~~~~~~~~
+2 −0
Original line number Diff line number Diff line
@@ -4311,7 +4311,9 @@ W: https://clangbuiltlinux.github.io/
B:	https://github.com/ClangBuiltLinux/linux/issues
C:	irc://chat.freenode.net/clangbuiltlinux
F:	Documentation/kbuild/llvm.rst
F:	include/linux/compiler-clang.h
F:	scripts/clang-tools/
F:	scripts/clang-version.sh
F:	scripts/lld-version.sh
K:	\b(?i:clang|llvm)\b
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ extern void kmap_flush_tlb(unsigned long addr);

#define flush_cache_kmaps()	BUG_ON(cpu_has_dc_aliases)

#define arch_kmap_local_set_pte(mm, vaddr, ptep, ptev)	set_pte(ptep, ptev)
#define arch_kmap_local_post_map(vaddr, pteval)	local_flush_tlb_one(vaddr)
#define arch_kmap_local_post_unmap(vaddr)	local_flush_tlb_one(vaddr)

+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ extern pte_t *pkmap_page_table;

#define flush_cache_kmaps()	flush_cache_all()

#define arch_kmap_local_set_pte(mm, vaddr, ptep, ptev)	\
	__set_pte_at(mm, vaddr, ptep, ptev, 1)
#define arch_kmap_local_post_map(vaddr, pteval)	\
	local_flush_tlb_page(NULL, vaddr)
#define arch_kmap_local_post_unmap(vaddr)	\
+5 −4
Original line number Diff line number Diff line
@@ -50,10 +50,11 @@ extern pte_t *pkmap_page_table;

#define flush_cache_kmaps()	flush_cache_all()

/* FIXME: Use __flush_tlb_one(vaddr) instead of flush_cache_all() -- Anton */
#define arch_kmap_local_post_map(vaddr, pteval)	flush_cache_all()
#define arch_kmap_local_post_unmap(vaddr)	flush_cache_all()

/* FIXME: Use __flush_*_one(vaddr) instead of flush_*_all() -- Anton */
#define arch_kmap_local_pre_map(vaddr, pteval)	flush_cache_all()
#define arch_kmap_local_pre_unmap(vaddr)	flush_cache_all()
#define arch_kmap_local_post_map(vaddr, pteval)	flush_tlb_all()
#define arch_kmap_local_post_unmap(vaddr)	flush_tlb_all()

#endif /* __KERNEL__ */

Loading