]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Merge branch 'akpm-current/current'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 Apr 2021 11:33:33 +0000 (21:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 Apr 2021 11:33:33 +0000 (21:33 +1000)
88 files changed:
1  2 
Documentation/admin-guide/kernel-parameters.txt
Documentation/dev-tools/kasan.rst
Documentation/filesystems/proc.rst
MAINTAINERS
arch/Kconfig
arch/arm/Kconfig
arch/arm/mm/init.c
arch/arm64/Kconfig
arch/arm64/include/asm/memory.h
arch/arm64/include/asm/mte-kasan.h
arch/arm64/mm/init.c
arch/arm64/mm/mmu.c
arch/microblaze/mm/init.c
arch/mips/Kconfig
arch/mips/loongson64/numa.c
arch/powerpc/Kconfig
arch/powerpc/mm/book3s64/radix_pgtable.c
arch/powerpc/mm/mem.c
arch/powerpc/platforms/Kconfig.cputype
arch/riscv/Kconfig
arch/riscv/mm/init.c
arch/x86/Kconfig
arch/x86/kernel/cpu/resctrl/pseudo_lock.c
arch/x86/mm/init_64.c
arch/x86/mm/pat/set_memory.c
arch/xtensa/Kconfig
block/blk-settings.c
drivers/gpu/drm/i915/gem/i915_gem_mman.c
drivers/gpu/drm/i915/i915_drv.h
drivers/infiniband/core/umem.c
drivers/md/bcache/super.c
drivers/nvdimm/pmem.c
drivers/pci/pci.c
drivers/scsi/esas2r/esas2r_main.c
fs/Kconfig
fs/block_dev.c
fs/btrfs/compression.c
fs/btrfs/extent_io.c
fs/btrfs/inode.c
fs/btrfs/reflink.c
fs/buffer.c
fs/eventpoll.c
fs/gfs2/glock.c
fs/hfsplus/dir.c
fs/inode.c
fs/nilfs2/ioctl.c
fs/ocfs2/namei.c
fs/proc/proc_sysctl.c
include/linux/bitmap.h
include/linux/blkdev.h
include/linux/compat.h
include/linux/cred.h
include/linux/fs.h
include/linux/io.h
include/linux/kasan.h
include/linux/mm.h
include/linux/pagemap.h
include/linux/sched.h
include/linux/slab.h
include/linux/smp.h
include/linux/vmalloc.h
init/Kconfig
init/main.c
kernel/fork.c
kernel/sysctl.c
kernel/task_work.c
lib/Kconfig.debug
lib/Makefile
lib/iov_iter.c
lib/list_sort.c
lib/test_kasan.c
mm/Kconfig
mm/filemap.c
mm/internal.h
mm/kasan/kasan.h
mm/memory.c
mm/mmap.c
mm/oom_kill.c
mm/page_alloc.c
mm/slab.c
mm/slab.h
mm/slab_common.c
mm/slub.c
mm/util.c
mm/vmalloc.c
net/sunrpc/svc_xprt.c
scripts/checkpatch.pl
tools/scripts/Makefile.include

index e5d1040fad6c8133e25e919e9e9835eb098b24da,ca425070190db31132bddd8df7714e359136ea96..3bf052d145045331fd438fc61dcf629f97e536f9
                        seconds.  Use this parameter to check at some
                        other rate.  0 disables periodic checking.
  
 -      memtest=        [KNL,X86,ARM,PPC] Enable memtest
+       memory_hotplug.memmap_on_memory
+                       [KNL,X86,ARM] Boolean flag to enable this feature.
+                       Format: {on | off (default)}
+                       When enabled, memory to build the pages tables for the
+                       memmap array describing the hot-added range will be taken
+                       from the range itself, so the memmap page tables will be
+                       self-hosted.
+                       Since only single memory device ranges are supported at
+                       the moment, this option is disabled by default because
+                       it might have an impact on workloads that needs large
+                       contiguous memory chunks.
+                       The state of the flag can be read in
+                       /sys/module/memory_hotplug/parameters/memmap_on_memory.
+                       Note that even when enabled, there are a few cases where
+                       the feature is not effective.
 +      memtest=        [KNL,X86,ARM,PPC,RISCV] Enable memtest
                        Format: <integer>
                        default : 0 <disable>
                        Specifies the number of memtest passes to be
Simple merge
Simple merge
diff --cc MAINTAINERS
Simple merge
diff --cc arch/Kconfig
Simple merge
Simple merge
Simple merge
index 570fa52eb6f0ac828be171f8765ebb8099305476,b36023ae770c4e3dba127285c6045159a1b4bddc..f0b17d7589129e8d389cb635c857b7853d72e932
@@@ -1069,18 -1068,6 +1075,9 @@@ config HW_PERF_EVENT
        def_bool y
        depends on ARM_PMU
  
- config SYS_SUPPORTS_HUGETLBFS
-       def_bool y
- config ARCH_HAS_CACHE_LINE_SIZE
-       def_bool y
 +config ARCH_HAS_FILTER_PGPROT
 +      def_bool y
 +
- config ARCH_ENABLE_SPLIT_PMD_PTLOCK
-       def_bool y if PGTABLE_LEVELS > 2
  # Supported by clang >= 7.0
  config CC_HAVE_SHADOW_CALL_STACK
        def_bool $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18)
Simple merge
index 4acf8bf41cade68d70e48a0a05f95b7fe25f2aea,570af3e9929664b362566756bc2a70ad21360186..ddd4d17cf9a07b2a057ab4734e383c17309ff0b1
@@@ -63,22 -64,30 +64,31 @@@ static inline void mte_set_mem_tag_rang
        curr = (u64)__tag_set(addr, tag);
        end = curr + size;
  
-       do {
-               /*
-                * 'asm volatile' is required to prevent the compiler to move
-                * the statement outside of the loop.
-                */
-               asm volatile(__MTE_PREAMBLE "stg %0, [%0]"
-                            :
-                            : "r" (curr)
-                            : "memory");
-               curr += MTE_GRANULE_SIZE;
-       } while (curr != end);
+       /*
+        * 'asm volatile' is required to prevent the compiler to move
+        * the statement outside of the loop.
+        */
+       if (init) {
+               do {
+                       asm volatile(__MTE_PREAMBLE "stzg %0, [%0]"
+                                    :
+                                    : "r" (curr)
+                                    : "memory");
+                       curr += MTE_GRANULE_SIZE;
+               } while (curr != end);
+       } else {
+               do {
+                       asm volatile(__MTE_PREAMBLE "stg %0, [%0]"
+                                    :
+                                    : "r" (curr)
+                                    : "memory");
+                       curr += MTE_GRANULE_SIZE;
+               } while (curr != end);
+       }
  }
  
 -void mte_enable_kernel(void);
 +void mte_enable_kernel_sync(void);
 +void mte_enable_kernel_async(void);
  void mte_init_tags(u64 max_tag);
  
  void mte_set_report_once(bool state);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 0b1b6732d8af2107c125b9f0b7c6f1a9af8559ae,00e22821937575a4cf5d3fb841cb571ced2d87ec..ec30434e1ad8d196a1e41539c437062632ff2ee0
@@@ -118,8 -118,9 +118,10 @@@ config PP
        # Please keep this list sorted alphabetically.
        #
        select ARCH_32BIT_OFF_T if PPC32
+       select ARCH_ENABLE_MEMORY_HOTPLUG
+       select ARCH_ENABLE_MEMORY_HOTREMOVE
        select ARCH_HAS_DEBUG_VIRTUAL
 +      select ARCH_HAS_DEBUG_VM_PGTABLE
        select ARCH_HAS_DEVMEM_IS_ALLOWED
        select ARCH_HAS_ELF_RANDOMIZE
        select ARCH_HAS_FORTIFY_SOURCE
        select GENERIC_GETTIMEOFDAY
        select HAVE_ARCH_AUDITSYSCALL
        select HAVE_ARCH_HUGE_VMAP              if PPC_BOOK3S_64 && PPC_RADIX_MMU
+       select HAVE_ARCH_HUGE_VMALLOC           if HAVE_ARCH_HUGE_VMAP
        select HAVE_ARCH_JUMP_LABEL
 +      select HAVE_ARCH_JUMP_LABEL_RELATIVE
        select HAVE_ARCH_KASAN                  if PPC32 && PPC_PAGE_SHIFT <= 14
        select HAVE_ARCH_KASAN_VMALLOC          if PPC32 && PPC_PAGE_SHIFT <= 14
        select HAVE_ARCH_KGDB
Simple merge
index c338f82428a1e70ddb292ec4f5cdb4adbaa647da,10064af9e6f395d16947d886eb75eb51bb2653b4..424b7353554d1c9727209a0fd7b3b5348b488b9f
@@@ -29,9 -28,9 +29,10 @@@ config RISC
        select ARCH_HAS_SET_DIRECT_MAP
        select ARCH_HAS_SET_MEMORY
        select ARCH_HAS_STRICT_KERNEL_RWX if MMU
 +      select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
        select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
        select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
+       select ARCH_SUPPORTS_HUGETLBFS if MMU
        select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
        select ARCH_WANT_FRAME_POINTERS
        select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
Simple merge
index 413a60054d11e9e8d2d7f0207dad02527cf363aa,e4ea17fed32adf2c8938c804ef972aec77b5e20d..9464c8cc7c4e0adb11c555012734827876e9317c
@@@ -164,8 -171,8 +171,9 @@@ config X8
        select HAVE_ARCH_TRANSPARENT_HUGEPAGE
        select HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD if X86_64
        select HAVE_ARCH_USERFAULTFD_WP         if X86_64 && USERFAULTFD
+       select HAVE_ARCH_USERFAULTFD_MINOR      if X86_64 && USERFAULTFD
        select HAVE_ARCH_VMAP_STACK             if X86_64
 +      select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
        select HAVE_ARCH_WITHIN_STACK_FRAMES
        select HAVE_ASM_MODVERSIONS
        select HAVE_CMPXCHG_DOUBLE
Simple merge
Simple merge
Simple merge
index 9c009090c4b5bf58168564cf62e8d7b08011d08e,976085a44fb8d977e301c872e1bf35daa4a1530d..902c40d67120251564b1c17529f0557cea76d872
@@@ -7,6 -7,8 +7,7 @@@
  #include <linux/init.h>
  #include <linux/bio.h>
  #include <linux/blkdev.h>
 -#include <linux/memblock.h>   /* for max_pfn/max_low_pfn */
+ #include <linux/pagemap.h>
  #include <linux/gcd.h>
  #include <linux/lcm.h>
  #include <linux/jiffies.h>
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/Kconfig
Simple merge
diff --cc fs/block_dev.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/buffer.c
Simple merge
diff --cc fs/eventpoll.c
Simple merge
diff --cc fs/gfs2/glock.c
Simple merge
Simple merge
diff --cc fs/inode.c
Simple merge
Simple merge
Simple merge
Simple merge
index 73d039476fa490b2a0c76e6d467e2a05283bf9e5,f57f4473bbe495e2a8622e014cd4cc2c4d2d2ca8..a36cfcec4e779d0361afc2610e1569eabcbf279e
@@@ -4,12 -4,11 +4,13 @@@
  
  #ifndef __ASSEMBLY__
  
 -#include <linux/types.h>
+ #include <linux/align.h>
  #include <linux/bitops.h>
- #include <linux/kernel.h>
+ #include <linux/limits.h>
  #include <linux/string.h>
 +#include <linux/types.h>
 +
 +struct device;
  
  /*
   * bitmaps provide bit arrays that consume one or more unsigned
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 84a0b4828f6618910a05a80f4b3ada218a68878a,27008a1c8111f38e76fb4628aab347caf118d023..669e35c03be283808a93b19c6a1b9bdcb9f636d6
@@@ -50,11 -50,14 +50,19 @@@ extern unsigned int total_cpus
  int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
                             int wait);
  
 +void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
 +                         void *info, bool wait, const struct cpumask *mask);
 +
 +int smp_call_function_single_async(int cpu, call_single_data_t *csd);
 +
+ /*
+  * Cpus stopping functions in panic. All have default weak definitions.
+  * Architecture-dependent code may override them.
+  */
+ void panic_smp_self_stop(void);
+ void nmi_panic_self_stop(struct pt_regs *regs);
+ void crash_smp_send_stop(void);
  /*
   * Call a function on all processors
   */
Simple merge
diff --cc init/Kconfig
Simple merge
diff --cc init/main.c
Simple merge
diff --cc kernel/fork.c
Simple merge
diff --cc kernel/sysctl.c
Simple merge
Simple merge
Simple merge
diff --cc lib/Makefile
Simple merge
diff --cc lib/iov_iter.c
Simple merge
diff --cc lib/list_sort.c
Simple merge
index 785e724ce0d8881b780ca4602d2b871d90ff9093,bf9225002a7ec5b28a2aa19d896a1df5fdd84d17..10f7bd918010fc9eab8aa57008bda13532318824
@@@ -78,33 -83,30 +83,35 @@@ static void kasan_test_exit(struct kuni
   * fields, it can reorder or optimize away the accesses to those fields.
   * Use READ/WRITE_ONCE() for the accesses and compiler barriers around the
   * expression to prevent that.
+  *
+  * In between KUNIT_EXPECT_KASAN_FAIL checks, fail_data.report_found is kept as
+  * false. This allows detecting KASAN reports that happen outside of the checks
+  * by asserting !fail_data.report_found at the start of KUNIT_EXPECT_KASAN_FAIL
+  * and in kasan_test_exit.
   */
- #define KUNIT_EXPECT_KASAN_FAIL(test, expression) do {                \
-       if (IS_ENABLED(CONFIG_KASAN_HW_TAGS) &&                 \
-           !kasan_async_mode_enabled())                        \
-               migrate_disable();                              \
-       WRITE_ONCE(fail_data.report_expected, true);            \
-       WRITE_ONCE(fail_data.report_found, false);              \
-       kunit_add_named_resource(test,                          \
-                               NULL,                           \
-                               NULL,                           \
-                               &resource,                      \
-                               "kasan_data", &fail_data);      \
-       barrier();                                              \
-       expression;                                             \
-       barrier();                                              \
-       if (kasan_async_mode_enabled())                         \
-               kasan_force_async_fault();                      \
-       barrier();                                              \
-       KUNIT_EXPECT_EQ(test,                                   \
-                       READ_ONCE(fail_data.report_expected),   \
-                       READ_ONCE(fail_data.report_found));     \
-       if (IS_ENABLED(CONFIG_KASAN_HW_TAGS) &&                 \
-           !kasan_async_mode_enabled()) {                      \
-               if (READ_ONCE(fail_data.report_found))          \
-                       kasan_enable_tagging_sync();            \
-               migrate_enable();                               \
-       }                                                       \
+ #define KUNIT_EXPECT_KASAN_FAIL(test, expression) do {                        \
 -      if (IS_ENABLED(CONFIG_KASAN_HW_TAGS))                           \
++      if (IS_ENABLED(CONFIG_KASAN_HW_TAGS) &&                         \
++          !kasan_async_mode_enabled())                                \
+               migrate_disable();                                      \
+       KUNIT_EXPECT_FALSE(test, READ_ONCE(fail_data.report_found));    \
+       WRITE_ONCE(fail_data.report_expected, true);                    \
+       barrier();                                                      \
+       expression;                                                     \
+       barrier();                                                      \
++      if (kasan_async_mode_enabled())                                 \
++              kasan_force_async_fault();                              \
++      barrier();                                                      \
+       KUNIT_EXPECT_EQ(test,                                           \
+                       READ_ONCE(fail_data.report_expected),           \
+                       READ_ONCE(fail_data.report_found));             \
 -      if (IS_ENABLED(CONFIG_KASAN_HW_TAGS)) {                         \
++      if (IS_ENABLED(CONFIG_KASAN_HW_TAGS) &&                         \
++          !kasan_async_mode_enabled()) {                              \
+               if (READ_ONCE(fail_data.report_found))                  \
 -                      kasan_enable_tagging();                         \
++                      kasan_enable_tagging_sync();                    \
+               migrate_enable();                                       \
+       }                                                               \
+       WRITE_ONCE(fail_data.report_found, false);                      \
+       WRITE_ONCE(fail_data.report_expected, false);                   \
  } while (0)
  
  #define KASAN_TEST_NEEDS_CONFIG_ON(test, config) do {                 \
diff --cc mm/Kconfig
Simple merge
diff --cc mm/filemap.c
Simple merge
diff --cc mm/internal.h
Simple merge
index 2d29069ae9777b527dea5707c47f6624785ae4ee,038c5c1ef592b9f4e1cf0dc5e91f461ecb3ee5c8..3820ca54743b54ecefbdc042cf65f2c1f7cec325
@@@ -314,17 -291,16 +314,18 @@@ static inline const void *arch_kasan_se
  #define arch_get_mem_tag(addr)        (0xFF)
  #endif
  #ifndef arch_set_mem_tag_range
- #define arch_set_mem_tag_range(addr, size, tag) ((void *)(addr))
+ #define arch_set_mem_tag_range(addr, size, tag, init) ((void *)(addr))
  #endif
  
 -#define hw_enable_tagging()                   arch_enable_tagging()
 +#define hw_enable_tagging_sync()              arch_enable_tagging_sync()
 +#define hw_enable_tagging_async()             arch_enable_tagging_async()
  #define hw_init_tags(max_tag)                 arch_init_tags(max_tag)
  #define hw_set_tagging_report_once(state)     arch_set_tagging_report_once(state)
 +#define hw_force_async_tag_fault()            arch_force_async_tag_fault()
  #define hw_get_random_tag()                   arch_get_random_tag()
  #define hw_get_mem_tag(addr)                  arch_get_mem_tag(addr)
- #define hw_set_mem_tag_range(addr, size, tag) arch_set_mem_tag_range((addr), (size), (tag))
+ #define hw_set_mem_tag_range(addr, size, tag, init) \
+                       arch_set_mem_tag_range((addr), (size), (tag), (init))
  
  #else /* CONFIG_KASAN_HW_TAGS */
  
diff --cc mm/memory.c
Simple merge
diff --cc mm/mmap.c
Simple merge
diff --cc mm/oom_kill.c
Simple merge
diff --cc mm/page_alloc.c
Simple merge
diff --cc mm/slab.c
Simple merge
diff --cc mm/slab.h
Simple merge
Simple merge
diff --cc mm/slub.c
Simple merge
diff --cc mm/util.c
index 8fc87930968688eca098a77b4a35907cfa814ee3,44a26f8a9b34c36b6d3ad4d8f10d66de75db802f..0b6dd9d81da797b5c7bf9a86808175db42981e05
+++ b/mm/util.c
@@@ -1001,18 -992,18 +993,20 @@@ void mem_dump_obj(void *object
                kmem_dump_obj(object);
                return;
        }
        if (vmalloc_dump_obj(object))
                return;
-       if (!virt_addr_valid(object)) {
-               if (object == NULL)
-                       pr_cont(" NULL pointer.\n");
-               else if (object == ZERO_SIZE_PTR)
-                       pr_cont(" zero-size pointer.\n");
-               else
-                       pr_cont(" non-paged memory.\n");
-               return;
-       }
-       pr_cont(" non-slab/vmalloc memory.\n");
+       if (virt_addr_valid(object))
+               type = "non-slab/vmalloc memory";
+       else if (object == NULL)
+               type = "NULL pointer";
+       else if (object == ZERO_SIZE_PTR)
+               type = "zero-size pointer";
+       else
+               type = "non-paged memory";
+       pr_cont(" %s\n", type);
  }
 +EXPORT_SYMBOL_GPL(mem_dump_obj);
 +#endif
diff --cc mm/vmalloc.c
Simple merge
Simple merge
Simple merge
Simple merge