mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: akpm@linux-foundation.org, alex.bou9@gmail.com,
	apw@canonical.com, cl@linux.com, danielmicay@gmail.com,
	dennis@kernel.org, dwaipayanray1@gmail.com,
	gustavoars@kernel.org, iamjoonsoo.kim@lge.com,
	ira.weiny@intel.com, jhubbard@nvidia.com,
	jingxiangfeng@huawei.com, joe@perches.com, jrdr.linux@gmail.com,
	keescook@chromium.org, linux-mm@kvack.org, lkp@intel.com,
	lukas.bulwahn@gmail.com, mm-commits@vger.kernel.org,
	mporter@kernel.crashing.org, nathan@kernel.org,
	ndesaulniers@google.com, ojeda@kernel.org, penberg@kernel.org,
	rdunlap@infradead.org, rientjes@google.com, tj@kernel.org,
	torvalds@linux-foundation.org, vbabka@suse.cz
Subject: [patch 033/262] Compiler Attributes: add __alloc_size() for better bounds checking
Date: Fri, 05 Nov 2021 13:36:19 -0700	[thread overview]
Message-ID: <20211105203619.7llAC4ARX%akpm@linux-foundation.org> (raw)
In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org>

From: Kees Cook <keescook@chromium.org>
Subject: Compiler Attributes: add __alloc_size() for better bounds checking

GCC and Clang can use the "alloc_size" attribute to better inform the
results of __builtin_object_size() (for compile-time constant values). 
Clang can additionally use alloc_size to inform the results of
__builtin_dynamic_object_size() (for run-time values).

Because GCC sees the frequent use of struct_size() as an allocator size
argument, and notices it can return SIZE_MAX (the overflow indication), it
complains about these call sites overflowing (since SIZE_MAX is greater
than the default -Walloc-size-larger-than=PTRDIFF_MAX).  This isn't
helpful since we already know a SIZE_MAX will be caught at run-time (this
was an intentional design).  To deal with this, we must disable this check
as it is both a false positive and redundant.  (Clang does not have this
warning option.)

Unfortunately, just checking the -Wno-alloc-size-larger-than is not
sufficient to make the __alloc_size attribute behave correctly under older
GCC versions.  The attribute itself must be disabled in those situations
too, as there appears to be no way to reliably silence the SIZE_MAX
constant expression cases for GCC versions less than 9.1:

In file included from ./include/linux/resource_ext.h:11,
                 from ./include/linux/pci.h:40,
                 from drivers/net/ethernet/intel/ixgbe/ixgbe.h:9,
                 from drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c:4:
In function 'kmalloc_node',
    inlined from 'ixgbe_alloc_q_vector' at ./include/linux/slab.h:743:9:
./include/linux/slab.h:618:9: error: argument 1 value '18446744073709551615' exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
  return __kmalloc_node(size, flags, node);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/slab.h: In function 'ixgbe_alloc_q_vector':
./include/linux/slab.h:455:7: note: in a call to allocation function '__kmalloc_node' declared here
 void *__kmalloc_node(size_t size, gfp_t flags, int node) __assume_slab_alignment __malloc;
       ^~~~~~~~~~~~~~

Specifically:
-Wno-alloc-size-larger-than is not correctly handled by GCC < 9.1
  https://godbolt.org/z/hqsfG7q84 (doesn't disable)
  https://godbolt.org/z/P9jdrPTYh (doesn't admit to not knowing about option)
  https://godbolt.org/z/465TPMWKb (only warns when other warnings appear)

-Walloc-size-larger-than=18446744073709551615 is not handled by GCC < 8.2
  https://godbolt.org/z/73hh1EPxz (ignores numeric value)

Since anything marked with __alloc_size would also qualify for marking
with __malloc, just include __malloc along with it to avoid redundant
markings. (Suggested by Linus Torvalds.)

Finally, make sure checkpatch.pl doesn't get confused about finding the
__alloc_size attribute on functions. (Thanks to Joe Perches.)

Link: https://lkml.kernel.org/r/20210930222704.2631604-3-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Daniel Micay <danielmicay@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Alexandre Bounine <alex.bou9@gmail.com>
Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Jing Xiangfeng <jingxiangfeng@huawei.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: kernel test robot <lkp@intel.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Souptick Joarder <jrdr.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Makefile                            |   15 +++++++++++++++
 include/linux/compiler-gcc.h        |    8 ++++++++
 include/linux/compiler_attributes.h |   10 ++++++++++
 include/linux/compiler_types.h      |   12 ++++++++++++
 scripts/checkpatch.pl               |    3 ++-
 5 files changed, 47 insertions(+), 1 deletion(-)

--- a/include/linux/compiler_attributes.h~compiler-attributes-add-__alloc_size-for-better-bounds-checking
+++ a/include/linux/compiler_attributes.h
@@ -34,6 +34,15 @@
 #define __aligned_largest               __attribute__((__aligned__))
 
 /*
+ * Note: do not use this directly. Instead, use __alloc_size() since it is conditionally
+ * available and includes other attributes.
+ *
+ *   gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute
+ * clang: https://clang.llvm.org/docs/AttributeReference.html#alloc-size
+ */
+#define __alloc_size__(x, ...)		__attribute__((__alloc_size__(x, ## __VA_ARGS__)))
+
+/*
  * Note: users of __always_inline currently do not write "inline" themselves,
  * which seems to be required by gcc to apply the attribute according
  * to its docs (and also "warning: always_inline function might not be
@@ -153,6 +162,7 @@
 
 /*
  *   gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-malloc-function-attribute
+ * clang: https://clang.llvm.org/docs/AttributeReference.html#malloc
  */
 #define __malloc                        __attribute__((__malloc__))
 
--- a/include/linux/compiler-gcc.h~compiler-attributes-add-__alloc_size-for-better-bounds-checking
+++ a/include/linux/compiler-gcc.h
@@ -144,3 +144,11 @@
 #else
 #define __diag_GCC_8(s)
 #endif
+
+/*
+ * Prior to 9.1, -Wno-alloc-size-larger-than (and therefore the "alloc_size"
+ * attribute) do not work, and must be disabled.
+ */
+#if GCC_VERSION < 90100
+#undef __alloc_size__
+#endif
--- a/include/linux/compiler_types.h~compiler-attributes-add-__alloc_size-for-better-bounds-checking
+++ a/include/linux/compiler_types.h
@@ -250,6 +250,18 @@ struct ftrace_likely_data {
 # define __cficanonical
 #endif
 
+/*
+ * Any place that could be marked with the "alloc_size" attribute is also
+ * a place to be marked with the "malloc" attribute. Do this as part of the
+ * __alloc_size macro to avoid redundant attributes and to avoid missing a
+ * __malloc marking.
+ */
+#ifdef __alloc_size__
+# define __alloc_size(x, ...)	__alloc_size__(x, ## __VA_ARGS__) __malloc
+#else
+# define __alloc_size(x, ...)	__malloc
+#endif
+
 #ifndef asm_volatile_goto
 #define asm_volatile_goto(x...) asm goto(x)
 #endif
--- a/Makefile~compiler-attributes-add-__alloc_size-for-better-bounds-checking
+++ a/Makefile
@@ -1008,6 +1008,21 @@ ifdef CONFIG_CC_IS_GCC
 KBUILD_CFLAGS += -Wno-maybe-uninitialized
 endif
 
+ifdef CONFIG_CC_IS_GCC
+# The allocators already balk at large sizes, so silence the compiler
+# warnings for bounds checks involving those possible values. While
+# -Wno-alloc-size-larger-than would normally be used here, earlier versions
+# of gcc (<9.1) weirdly don't handle the option correctly when _other_
+# warnings are produced (?!). Using -Walloc-size-larger-than=SIZE_MAX
+# doesn't work (as it is documented to), silently resolving to "0" prior to
+# version 9.1 (and producing an error more recently). Numeric values larger
+# than PTRDIFF_MAX also don't work prior to version 9.1, which are silently
+# ignored, continuing to default to PTRDIFF_MAX. So, left with no other
+# choice, we must perform a versioned check to disable this warning.
+# https://lore.kernel.org/lkml/20210824115859.187f272f@canb.auug.org.au
+KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0901, -Wno-alloc-size-larger-than)
+endif
+
 # disable invalid "can't wrap" optimizations for signed / pointers
 KBUILD_CFLAGS	+= -fno-strict-overflow
 
--- a/scripts/checkpatch.pl~compiler-attributes-add-__alloc_size-for-better-bounds-checking
+++ a/scripts/checkpatch.pl
@@ -489,7 +489,8 @@ our $Attribute	= qr{
 			____cacheline_aligned|
 			____cacheline_aligned_in_smp|
 			____cacheline_internodealigned_in_smp|
-			__weak
+			__weak|
+			__alloc_size\s*\(\s*\d+\s*(?:,\s*\d+\s*)?\)
 		  }x;
 our $Modifier;
 our $Inline	= qr{inline|__always_inline|noinline|__inline|__inline__};
_

  parent reply	other threads:[~2021-11-05 20:36 UTC|newest]

Thread overview: 278+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 20:34 incoming Andrew Morton
2021-11-05 20:34 ` [patch 001/262] scripts/spelling.txt: add more spellings to spelling.txt Andrew Morton
2021-11-05 20:34 ` [patch 002/262] scripts/spelling.txt: fix "mistake" version of "synchronization" Andrew Morton
2021-11-05 20:34 ` [patch 003/262] scripts/decodecode: fix faulting instruction no print when opps.file is DOS format Andrew Morton
2021-11-05 20:34 ` [patch 004/262] ocfs2: fix handle refcount leak in two exception handling paths Andrew Morton
2021-11-05 20:34 ` [patch 005/262] ocfs2: cleanup journal init and shutdown Andrew Morton
2021-11-05 20:34 ` [patch 006/262] ocfs2/dlm: remove redundant assignment of variable ret Andrew Morton
2021-11-05 20:34 ` [patch 007/262] ocfs2: fix data corruption on truncate Andrew Morton
2021-11-05 20:34 ` [patch 008/262] ocfs2: do not zero pages beyond i_size Andrew Morton
2021-11-05 20:35 ` [patch 009/262] fs/posix_acl.c: avoid -Wempty-body warning Andrew Morton
2021-11-05 20:35 ` [patch 010/262] d_path: fix Kernel doc validator complaining Andrew Morton
2021-11-05 20:35 ` [patch 011/262] mm: move kvmalloc-related functions to slab.h Andrew Morton
2021-11-05 20:35 ` [patch 012/262] mm/slab.c: remove useless lines in enable_cpucache() Andrew Morton
2021-11-05 20:35 ` [patch 013/262] slub: add back check for free nonslab objects Andrew Morton
2021-11-05 20:35 ` [patch 014/262] mm, slub: change percpu partial accounting from objects to pages Andrew Morton
2021-11-05 20:35 ` [patch 015/262] mm/slub: increase default cpu partial list sizes Andrew Morton
2021-11-05 20:35 ` [patch 016/262] mm, slub: use prefetchw instead of prefetch Andrew Morton
2021-11-05 20:35 ` [patch 017/262] mm: disable NUMA_BALANCING_DEFAULT_ENABLED and TRANSPARENT_HUGEPAGE on PREEMPT_RT Andrew Morton
2021-11-05 20:35 ` [patch 018/262] mm: don't include <linux/dax.h> in <linux/mempolicy.h> Andrew Morton
2021-11-05 20:35 ` [patch 019/262] lib/stackdepot: include gfp.h Andrew Morton
2021-11-05 20:35 ` [patch 020/262] lib/stackdepot: remove unused function argument Andrew Morton
2021-11-05 20:35 ` [patch 021/262] lib/stackdepot: introduce __stack_depot_save() Andrew Morton
2021-11-05 20:35 ` [patch 022/262] kasan: common: provide can_alloc in kasan_save_stack() Andrew Morton
2021-11-05 20:35 ` [patch 023/262] kasan: generic: introduce kasan_record_aux_stack_noalloc() Andrew Morton
2021-11-05 20:35 ` [patch 024/262] workqueue, kasan: avoid alloc_pages() when recording stack Andrew Morton
2021-11-05 20:35 ` [patch 025/262] kasan: fix tag for large allocations when using CONFIG_SLAB Andrew Morton
2021-11-05 20:35 ` [patch 026/262] kasan: test: add memcpy test that avoids out-of-bounds write Andrew Morton
2021-11-05 20:35 ` [patch 027/262] mm/smaps: fix shmem pte hole swap calculation Andrew Morton
2021-11-05 20:36 ` [patch 028/262] mm/smaps: use vma->vm_pgoff directly when counting partial swap Andrew Morton
2021-11-05 20:36 ` [patch 029/262] mm/smaps: simplify shmem handling of pte holes Andrew Morton
2021-11-05 20:36 ` [patch 030/262] mm: debug_vm_pgtable: don't use __P000 directly Andrew Morton
2021-11-05 20:36 ` [patch 031/262] kasan: test: bypass __alloc_size checks Andrew Morton
2021-11-05 20:36 ` [patch 032/262] rapidio: avoid bogus __alloc_size warning Andrew Morton
2021-11-05 20:36 ` Andrew Morton [this message]
2021-11-05 20:36 ` [patch 034/262] slab: clean up function prototypes Andrew Morton
2021-11-05 20:36 ` [patch 035/262] slab: add __alloc_size attributes for better bounds checking Andrew Morton
2021-11-05 20:36 ` [patch 036/262] mm/kvmalloc: " Andrew Morton
2021-11-05 20:36 ` [patch 037/262] mm/vmalloc: " Andrew Morton
2021-11-05 20:36 ` [patch 038/262] mm/page_alloc: " Andrew Morton
2021-11-05 20:36 ` [patch 039/262] percpu: " Andrew Morton
2021-11-05 20:36 ` [patch 040/262] mm/page_ext.c: fix a comment Andrew Morton
2021-11-05 20:36 ` [patch 041/262] mm: stop filemap_read() from grabbing a superfluous page Andrew Morton
2021-11-05 20:36 ` [patch 042/262] mm: export bdi_unregister Andrew Morton
2021-11-05 20:36 ` [patch 043/262] mtd: call bdi_unregister explicitly Andrew Morton
2021-11-05 20:36 ` [patch 044/262] fs: explicitly unregister per-superblock BDIs Andrew Morton
2021-11-05 20:37 ` [patch 045/262] mm: don't automatically unregister bdis Andrew Morton
2021-11-05 20:37 ` [patch 046/262] mm: simplify bdi refcounting Andrew Morton
2021-11-05 20:37 ` [patch 047/262] mm: don't read i_size of inode unless we need it Andrew Morton
2021-11-05 20:37 ` [patch 048/262] mm/filemap.c: remove bogus VM_BUG_ON Andrew Morton
2021-11-05 20:37 ` [patch 049/262] mm: move more expensive part of XA setup out of mapping check Andrew Morton
2021-11-05 20:37 ` [patch 050/262] mm/gup: further simplify __gup_device_huge() Andrew Morton
2021-11-05 20:37 ` [patch 051/262] mm/swapfile: remove needless request_queue NULL pointer check Andrew Morton
2021-11-05 20:37 ` [patch 052/262] mm/swapfile: fix an integer overflow in swap_show() Andrew Morton
2021-11-05 20:37 ` [patch 053/262] mm: optimise put_pages_list() Andrew Morton
2021-11-05 20:37 ` [patch 054/262] mm/memcg: drop swp_entry_t* in mc_handle_file_pte() Andrew Morton
2021-11-05 20:37 ` [patch 055/262] memcg: flush stats only if updated Andrew Morton
2021-11-05 20:37 ` [patch 056/262] memcg: unify memcg stat flushing Andrew Morton
2021-11-05 20:37 ` [patch 057/262] mm/memcg: remove obsolete memcg_free_kmem() Andrew Morton
2021-11-05 20:37 ` [patch 058/262] mm/list_lru.c: prefer struct_size over open coded arithmetic Andrew Morton
2021-11-05 20:37 ` [patch 059/262] memcg, kmem: further deprecate kmem.limit_in_bytes Andrew Morton
2021-11-05 20:37 ` [patch 060/262] mm: list_lru: remove holding lru lock Andrew Morton
2021-11-05 20:37 ` [patch 061/262] mm: list_lru: fix the return value of list_lru_count_one() Andrew Morton
2021-11-05 20:37 ` [patch 062/262] mm: memcontrol: remove kmemcg_id reparenting Andrew Morton
2021-11-05 20:37 ` [patch 063/262] mm: memcontrol: remove the kmem states Andrew Morton
2021-11-05 20:37 ` [patch 064/262] mm: list_lru: only add memcg-aware lrus to the global lru list Andrew Morton
2021-11-05 20:38 ` [patch 065/262] mm, oom: pagefault_out_of_memory: don't force global OOM for dying tasks Andrew Morton
2021-11-05 20:38 ` [patch 066/262] mm, oom: do not trigger out_of_memory from the #PF Andrew Morton
2021-11-05 20:38 ` [patch 067/262] memcg: prohibit unconditional exceeding the limit of dying tasks Andrew Morton
2021-11-05 20:38 ` [patch 068/262] mm/mmap.c: fix a data race of mm->total_vm Andrew Morton
2021-11-05 20:38 ` [patch 069/262] mm: use __pfn_to_section() instead of open coding it Andrew Morton
2021-11-05 20:38 ` [patch 070/262] mm/memory.c: avoid unnecessary kernel/user pointer conversion Andrew Morton
2021-11-05 20:38 ` [patch 071/262] mm/memory.c: use correct VMA flags when freeing page-tables Andrew Morton
2021-11-05 20:57   ` Nadav Amit
2021-11-06 18:54     ` Linus Torvalds
2021-11-05 20:38 ` [patch 072/262] mm/shmem: unconditionally set pte dirty in mfill_atomic_install_pte Andrew Morton
2021-11-05 20:38 ` [patch 073/262] mm: clear vmf->pte after pte_unmap_same() returns Andrew Morton
2021-11-05 20:38 ` [patch 074/262] mm: drop first_index/last_index in zap_details Andrew Morton
2021-11-05 20:38 ` [patch 075/262] mm: add zap_skip_check_mapping() helper Andrew Morton
2021-11-05 20:38 ` [patch 076/262] mm: introduce pmd_install() helper Andrew Morton
2021-11-05 20:38 ` [patch 077/262] mm: remove redundant smp_wmb() Andrew Morton
2021-11-05 20:38 ` [patch 078/262] Documentation: update pagemap with shmem exceptions Andrew Morton
2021-11-05 20:38 ` [patch 079/262] lazy tlb: introduce lazy mm refcount helper functions Andrew Morton
2021-11-05 20:38 ` [patch 080/262] lazy tlb: allow lazy tlb mm refcounting to be configurable Andrew Morton
2021-11-06  4:29   ` Andy Lutomirski
2021-11-06 19:10     ` Linus Torvalds
2021-11-05 20:38 ` [patch 081/262] lazy tlb: shoot lazies, a non-refcounting lazy tlb option Andrew Morton
2021-11-05 20:38 ` [patch 082/262] powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN Andrew Morton
2021-11-05 20:39 ` [patch 083/262] memory: remove unused CONFIG_MEM_BLOCK_SIZE Andrew Morton
2021-11-05 20:39 ` [patch 084/262] mm/mprotect.c: avoid repeated assignment in do_mprotect_pkey() Andrew Morton
2021-11-05 20:39 ` [patch 085/262] mm/mremap: don't account pages in vma_to_resize() Andrew Morton
2021-11-05 20:39 ` [patch 086/262] include/linux/io-mapping.h: remove fallback for writecombine Andrew Morton
2021-11-05 20:39 ` [patch 087/262] mm: mmap_lock: remove redundant newline in TP_printk Andrew Morton
2021-11-05 20:39 ` [patch 088/262] mm: mmap_lock: use DECLARE_EVENT_CLASS and DEFINE_EVENT_FN Andrew Morton
2021-11-05 20:39 ` [patch 089/262] mm/vmalloc: repair warn_alloc()s in __vmalloc_area_node() Andrew Morton
2021-11-05 20:39 ` [patch 090/262] mm/vmalloc: don't allow VM_NO_GUARD on vmap() Andrew Morton
2021-11-05 20:39 ` [patch 091/262] mm/vmalloc: make show_numa_info() aware of hugepage mappings Andrew Morton
2021-11-05 20:39 ` [patch 092/262] mm/vmalloc: make sure to dump unpurged areas in /proc/vmallocinfo Andrew Morton
2021-11-05 20:39 ` [patch 093/262] mm/vmalloc: do not adjust the search size for alignment overhead Andrew Morton
2021-11-05 20:39 ` [patch 094/262] mm/vmalloc: check various alignments when debugging Andrew Morton
2021-11-05 20:39 ` [patch 095/262] vmalloc: back off when the current task is OOM-killed Andrew Morton
2021-11-05 20:39 ` [patch 096/262] vmalloc: choose a better start address in vm_area_register_early() Andrew Morton
2021-11-05 20:39 ` [patch 097/262] arm64: support page mapping percpu first chunk allocator Andrew Morton
2021-11-05 20:39 ` [patch 098/262] kasan: arm64: fix pcpu_page_first_chunk crash with KASAN_VMALLOC Andrew Morton
2021-11-05 20:39 ` [patch 099/262] mm/vmalloc: be more explicit about supported gfp flags Andrew Morton
2021-11-08  9:25   ` Michal Hocko
2021-11-08 17:15     ` Linus Torvalds
2021-11-08 17:30       ` Michal Hocko
2021-11-05 20:39 ` [patch 100/262] mm/vmalloc: introduce alloc_pages_bulk_array_mempolicy to accelerate memory allocation Andrew Morton
2021-11-05 20:39 ` [patch 101/262] lib/test_vmalloc.c: use swap() to make code cleaner Andrew Morton
2021-11-05 20:39 ` [patch 102/262] mm/large system hash: avoid possible NULL deref in alloc_large_system_hash Andrew Morton
2021-11-05 20:40 ` [patch 103/262] mm/page_alloc.c: remove meaningless VM_BUG_ON() in pindex_to_order() Andrew Morton
2021-11-05 20:40 ` [patch 104/262] mm/page_alloc.c: simplify the code by using macro K() Andrew Morton
2021-11-05 20:40 ` [patch 105/262] mm/page_alloc.c: fix obsolete comment in free_pcppages_bulk() Andrew Morton
2021-11-05 20:40 ` [patch 106/262] mm/page_alloc.c: use helper function zone_spans_pfn() Andrew Morton
2021-11-05 20:40 ` [patch 107/262] mm/page_alloc.c: avoid allocating highmem pages via alloc_pages_exact[_nid] Andrew Morton
2021-11-05 20:40 ` [patch 108/262] mm/page_alloc: print node fallback order Andrew Morton
2021-11-05 20:40 ` [patch 109/262] mm/page_alloc: use accumulated load when building node fallback list Andrew Morton
2021-11-05 20:40 ` [patch 110/262] mm: move node_reclaim_distance to fix NUMA without SMP Andrew Morton
2021-11-05 20:40 ` [patch 111/262] mm: move fold_vm_numa_events() " Andrew Morton
2021-11-05 20:40 ` [patch 112/262] mm/page_alloc.c: do not acquire zone lock in is_free_buddy_page() Andrew Morton
2021-11-05 20:40 ` [patch 113/262] mm/page_alloc: detect allocation forbidden by cpuset and bail out early Andrew Morton
2021-11-05 20:40 ` [patch 114/262] mm/page_alloc.c: show watermark_boost of zone in zoneinfo Andrew Morton
2021-11-05 20:40 ` [patch 115/262] mm: create a new system state and fix core_kernel_text() Andrew Morton
2021-11-05 20:40 ` [patch 116/262] mm: make generic arch_is_kernel_initmem_freed() do what it says Andrew Morton
2021-11-05 20:40 ` [patch 117/262] powerpc: use generic version of arch_is_kernel_initmem_freed() Andrew Morton
2021-11-05 20:40 ` [patch 118/262] s390: " Andrew Morton
2021-11-05 20:40 ` [patch 119/262] mm: page_alloc: use migrate_disable() in drain_local_pages_wq() Andrew Morton
2021-11-05 20:40 ` [patch 120/262] mm/page_alloc: use clamp() to simplify code Andrew Morton
2021-11-05 20:40 ` [patch 121/262] mm: fix data race in PagePoisoned() Andrew Morton
2021-11-05 20:41 ` [patch 122/262] mm/memory_failure: constify static mm_walk_ops Andrew Morton
2021-11-05 20:41 ` [patch 123/262] mm: filemap: coding style cleanup for filemap_map_pmd() Andrew Morton
2021-11-05 20:41 ` [patch 124/262] mm: hwpoison: refactor refcount check handling Andrew Morton
2021-11-05 20:41 ` [patch 125/262] mm: shmem: don't truncate page if memory failure happens Andrew Morton
2021-11-05 20:41 ` [patch 126/262] mm: hwpoison: handle non-anonymous THP correctly Andrew Morton
2021-11-05 20:41 ` [patch 127/262] mm/hugetlb: drop __unmap_hugepage_range definition from hugetlb.h Andrew Morton
2021-11-05 20:41 ` [patch 128/262] hugetlb: add demote hugetlb page sysfs interfaces Andrew Morton
2021-11-05 20:41 ` [patch 129/262] mm/cma: add cma_pages_valid to determine if pages are in CMA Andrew Morton
2021-11-05 20:41 ` [patch 130/262] hugetlb: be sure to free demoted CMA pages to CMA Andrew Morton
2021-11-05 20:41 ` [patch 131/262] hugetlb: add demote bool to gigantic page routines Andrew Morton
2021-11-05 20:41 ` [patch 132/262] hugetlb: add hugetlb demote page support Andrew Morton
2021-11-05 20:41 ` [patch 133/262] mm: khugepaged: recalculate min_free_kbytes after stopping khugepaged Andrew Morton
2021-11-05 20:41 ` [patch 134/262] mm, hugepages: add mremap() support for hugepage backed vma Andrew Morton
2021-11-05 20:41 ` [patch 135/262] mm, hugepages: add hugetlb vma mremap() test Andrew Morton
2021-11-05 20:41 ` [patch 136/262] hugetlb: support node specified when using cma for gigantic hugepages Andrew Morton
2021-11-05 20:41 ` [patch 137/262] mm: remove duplicate include in hugepage-mremap.c Andrew Morton
2021-11-05 20:41 ` [patch 138/262] hugetlb_cgroup: remove unused hugetlb_cgroup_from_counter macro Andrew Morton
2021-11-05 20:41 ` [patch 139/262] hugetlb: replace the obsolete hugetlb_instantiation_mutex in the comments Andrew Morton
2021-11-05 20:41 ` [patch 140/262] hugetlb: remove redundant validation in has_same_uncharge_info() Andrew Morton
2021-11-05 20:42 ` [patch 141/262] hugetlb: remove redundant VM_BUG_ON() in add_reservation_in_range() Andrew Morton
2021-11-05 20:42 ` [patch 142/262] hugetlb: remove unnecessary set_page_count in prep_compound_gigantic_page Andrew Morton
2021-11-05 20:42 ` [patch 143/262] userfaultfd/selftests: don't rely on GNU extensions for random numbers Andrew Morton
2021-11-05 20:42 ` [patch 144/262] userfaultfd/selftests: fix feature support detection Andrew Morton
2021-11-05 20:42 ` [patch 145/262] userfaultfd/selftests: fix calculation of expected ioctls Andrew Morton
2021-11-05 20:42 ` [patch 146/262] mm/page_isolation: fix potential missing call to unset_migratetype_isolate() Andrew Morton
2021-11-05 20:42 ` [patch 147/262] mm/page_isolation: guard against possible putback unisolated page Andrew Morton
2021-11-05 20:42 ` [patch 148/262] mm/vmscan.c: fix -Wunused-but-set-variable warning Andrew Morton
2021-11-05 20:42 ` [patch 149/262] mm/vmscan: throttle reclaim until some writeback completes if congested Andrew Morton
2021-11-05 21:02   ` Matthew Wilcox
2021-11-06 20:49     ` Linus Torvalds
2021-11-06 21:12       ` Linus Torvalds
2021-11-06 21:13         ` Vlastimil Babka
2021-11-06 21:20           ` Andrew Morton
2021-11-06 21:20           ` Linus Torvalds
2021-11-06 22:45         ` Matthew Wilcox
2021-11-06 23:26           ` Linus Torvalds
2021-11-05 20:42 ` [patch 150/262] mm/vmscan: throttle reclaim and compaction when too may pages are isolated Andrew Morton
2021-11-05 20:42 ` [patch 151/262] mm/vmscan: throttle reclaim when no progress is being made Andrew Morton
2021-11-05 20:42 ` [patch 152/262] mm/writeback: throttle based on page writeback instead of congestion Andrew Morton
2021-11-05 20:42 ` [patch 153/262] mm/page_alloc: remove the throttling logic from the page allocator Andrew Morton
2021-11-05 20:42 ` [patch 154/262] mm/vmscan: centralise timeout values for reclaim_throttle Andrew Morton
2021-11-05 20:42 ` [patch 155/262] mm/vmscan: increase the timeout if page reclaim is not making progress Andrew Morton
2021-11-05 20:42 ` [patch 156/262] mm/vmscan: delay waking of tasks throttled on NOPROGRESS Andrew Morton
2021-11-05 20:42 ` [patch 157/262] mm/vmpressure: fix data-race with memcg->socket_pressure Andrew Morton
2021-11-05 20:42 ` [patch 158/262] tools/vm/page_owner_sort.c: count and sort by mem Andrew Morton
2021-11-05 20:42 ` [patch 159/262] tools/vm/page-types.c: make walk_file() aware of address range option Andrew Morton
2021-11-05 20:43 ` [patch 160/262] tools/vm/page-types.c: move show_file() to summary output Andrew Morton
2021-11-05 20:43 ` [patch 161/262] tools/vm/page-types.c: print file offset in hexadecimal Andrew Morton
2021-11-05 20:43 ` [patch 162/262] arch_numa: simplify numa_distance allocation Andrew Morton
2021-11-05 20:43 ` [patch 163/262] xen/x86: free_p2m_page: use memblock_free_ptr() to free a virtual pointer Andrew Morton
2021-11-05 20:43 ` [patch 164/262] memblock: drop memblock_free_early_nid() and memblock_free_early() Andrew Morton
2021-11-05 20:43 ` [patch 165/262] memblock: stop aliasing __memblock_free_late with memblock_free_late Andrew Morton
2021-11-05 20:43 ` [patch 166/262] memblock: rename memblock_free to memblock_phys_free Andrew Morton
2021-11-05 20:43 ` [patch 167/262] memblock: use memblock_free for freeing virtual pointers Andrew Morton
2021-11-05 20:43 ` [patch 168/262] mm: mark the OOM reaper thread as freezable Andrew Morton
2021-11-05 20:43 ` [patch 169/262] hugetlbfs: extend the definition of hugepages parameter to support node allocation Andrew Morton
2021-11-05 20:43 ` [patch 170/262] mm/migrate: de-duplicate migrate_reason strings Andrew Morton
2021-11-05 20:43 ` [patch 171/262] mm: migrate: make demotion knob depend on migration Andrew Morton
2021-11-05 20:43 ` [patch 172/262] selftests/vm/transhuge-stress: fix ram size thinko Andrew Morton
2021-11-05 20:43 ` [patch 173/262] mm, thp: lock filemap when truncating page cache Andrew Morton
2021-11-05 20:43 ` [patch 174/262] mm, thp: fix incorrect unmap behavior for private pages Andrew Morton
2021-11-05 20:43 ` [patch 175/262] mm/readahead.c: fix incorrect comments for get_init_ra_size Andrew Morton
2021-11-05 20:43 ` [patch 176/262] mm: nommu: kill arch_get_unmapped_area() Andrew Morton
2021-11-05 20:43 ` [patch 177/262] selftest/vm: fix ksm selftest to run with different NUMA topologies Andrew Morton
2021-11-05 20:43 ` [patch 178/262] selftests: vm: add KSM huge pages merging time test Andrew Morton
2021-11-05 20:43 ` [patch 179/262] mm/vmstat: annotate data race for zone->free_area[order].nr_free Andrew Morton
2021-11-05 20:44 ` [patch 180/262] mm: vmstat.c: make extfrag_index show more pretty Andrew Morton
2021-11-05 20:44 ` [patch 181/262] selftests/vm: make MADV_POPULATE_(READ|WRITE) use in-tree headers Andrew Morton
2021-11-05 20:44 ` [patch 182/262] mm/memory_hotplug: add static qualifier for online_policy_to_str() Andrew Morton
2021-11-05 20:44 ` [patch 183/262] memory-hotplug.rst: fix two instances of "movablecore" that should be "movable_node" Andrew Morton
2021-11-05 20:44 ` [patch 184/262] memory-hotplug.rst: fix wrong /sys/module/memory_hotplug/parameters/ path Andrew Morton
2021-11-05 20:44 ` [patch 185/262] memory-hotplug.rst: document the "auto-movable" online policy Andrew Morton
2021-11-05 20:44 ` [patch 186/262] mm/memory_hotplug: remove CONFIG_X86_64_ACPI_NUMA dependency from CONFIG_MEMORY_HOTPLUG Andrew Morton
2021-11-05 20:44 ` [patch 187/262] mm/memory_hotplug: remove CONFIG_MEMORY_HOTPLUG_SPARSE Andrew Morton
2021-11-05 20:44 ` [patch 188/262] mm/memory_hotplug: restrict CONFIG_MEMORY_HOTPLUG to 64 bit Andrew Morton
2021-11-05 20:44 ` [patch 189/262] mm/memory_hotplug: remove HIGHMEM leftovers Andrew Morton
2021-11-05 20:44 ` [patch 190/262] mm/memory_hotplug: remove stale function declarations Andrew Morton
2021-11-05 20:44 ` [patch 191/262] x86: remove memory hotplug support on X86_32 Andrew Morton
2021-11-05 20:44 ` [patch 192/262] mm/memory_hotplug: handle memblock_add_node() failures in add_memory_resource() Andrew Morton
2021-11-05 20:44 ` [patch 193/262] memblock: improve MEMBLOCK_HOTPLUG documentation Andrew Morton
2021-11-05 20:44 ` [patch 194/262] memblock: allow to specify flags with memblock_add_node() Andrew Morton
2021-11-05 20:44 ` [patch 195/262] memblock: add MEMBLOCK_DRIVER_MANAGED to mimic IORESOURCE_SYSRAM_DRIVER_MANAGED Andrew Morton
2021-11-05 20:44 ` [patch 196/262] mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with IORESOURCE_SYSRAM_DRIVER_MANAGED Andrew Morton
2021-11-05 20:45 ` [patch 197/262] mm/rmap.c: avoid double faults migrating device private pages Andrew Morton
2021-11-05 20:45 ` [patch 198/262] mm/zsmalloc.c: close race window between zs_pool_dec_isolated() and zs_unregister_migration() Andrew Morton
2021-11-05 20:45 ` [patch 199/262] mm/highmem: remove deprecated kmap_atomic Andrew Morton
2021-11-05 20:45 ` [patch 200/262] zram_drv: allow reclaim on bio_alloc Andrew Morton
2021-11-05 20:45 ` [patch 201/262] zram: off by one in read_block_state() Andrew Morton
2021-11-05 20:45 ` [patch 202/262] zram: introduce an aged idle interface Andrew Morton
2021-11-05 20:45 ` [patch 203/262] mm: remove HARDENED_USERCOPY_FALLBACK Andrew Morton
2021-11-05 20:45 ` [patch 204/262] include/linux/mm.h: move nr_free_buffer_pages from swap.h to mm.h Andrew Morton
2021-11-05 20:45 ` [patch 205/262] stacktrace: move filter_irq_stacks() to kernel/stacktrace.c Andrew Morton
2021-11-05 20:45 ` [patch 206/262] kfence: count unexpectedly skipped allocations Andrew Morton
2021-11-05 20:45 ` [patch 207/262] kfence: move saving stack trace of allocations into __kfence_alloc() Andrew Morton
2021-11-05 20:45 ` [patch 208/262] kfence: limit currently covered allocations when pool nearly full Andrew Morton
2021-11-05 20:45 ` [patch 209/262] kfence: add note to documentation about skipping covered allocations Andrew Morton
2021-11-05 20:45 ` [patch 210/262] kfence: test: use kunit_skip() to skip tests Andrew Morton
2021-11-05 20:45 ` [patch 211/262] kfence: shorten critical sections of alloc/free Andrew Morton
2021-11-05 20:45 ` [patch 212/262] kfence: always use static branches to guard kfence_alloc() Andrew Morton
2021-11-05 20:45 ` [patch 213/262] kfence: default to dynamic branch instead of static keys mode Andrew Morton
2021-11-05 20:45 ` [patch 214/262] mm/damon: grammar s/works/work/ Andrew Morton
2021-11-05 20:45 ` [patch 215/262] Documentation/vm: move user guides to admin-guide/mm/ Andrew Morton
2021-11-05 20:45 ` [patch 216/262] MAINTAINERS: update SeongJae's email address Andrew Morton
2021-11-05 20:46 ` [patch 217/262] docs/vm/damon: remove broken reference Andrew Morton
2021-11-05 20:46 ` [patch 218/262] include/linux/damon.h: fix kernel-doc comments for 'damon_callback' Andrew Morton
2021-11-05 20:46 ` [patch 219/262] mm/damon/core: print kdamond start log in debug mode only Andrew Morton
2021-11-05 20:46 ` [patch 220/262] mm/damon: remove unnecessary do_exit() from kdamond Andrew Morton
2021-11-05 20:46 ` [patch 221/262] mm/damon: needn't hold kdamond_lock to print pid of kdamond Andrew Morton
2021-11-05 20:46 ` [patch 222/262] mm/damon/core: nullify pointer ctx->kdamond with a NULL Andrew Morton
2021-11-05 20:46 ` [patch 223/262] mm/damon/core: account age of target regions Andrew Morton
2021-11-05 20:46 ` [patch 224/262] mm/damon/core: implement DAMON-based Operation Schemes (DAMOS) Andrew Morton
2021-11-05 20:46 ` [patch 225/262] mm/damon/vaddr: support DAMON-based Operation Schemes Andrew Morton
2021-11-05 20:46 ` [patch 226/262] mm/damon/dbgfs: " Andrew Morton
2021-11-05 20:46 ` [patch 227/262] mm/damon/schemes: implement statistics feature Andrew Morton
2021-11-05 20:46 ` [patch 228/262] selftests/damon: add 'schemes' debugfs tests Andrew Morton
2021-11-05 20:46 ` [patch 229/262] Docs/admin-guide/mm/damon: document DAMON-based Operation Schemes Andrew Morton
2021-11-05 20:46 ` [patch 230/262] mm/damon/dbgfs: allow users to set initial monitoring target regions Andrew Morton
2021-11-05 20:46 ` [patch 231/262] mm/damon/dbgfs-test: add a unit test case for 'init_regions' Andrew Morton
2021-11-05 20:46 ` [patch 232/262] Docs/admin-guide/mm/damon: document 'init_regions' feature Andrew Morton
2021-11-05 20:46 ` [patch 233/262] mm/damon/vaddr: separate commonly usable functions Andrew Morton
2021-11-05 20:46 ` [patch 234/262] mm/damon: implement primitives for physical address space monitoring Andrew Morton
2021-11-05 20:47 ` [patch 235/262] mm/damon/dbgfs: support physical memory monitoring Andrew Morton
2021-11-05 20:47 ` [patch 236/262] Docs/DAMON: document physical memory monitoring support Andrew Morton
2021-11-05 20:47 ` [patch 237/262] mm/damon/vaddr: constify static mm_walk_ops Andrew Morton
2021-11-05 20:47 ` [patch 238/262] mm/damon/dbgfs: remove unnecessary variables Andrew Morton
2021-11-05 20:47 ` [patch 239/262] mm/damon/paddr: support the pageout scheme Andrew Morton
2021-11-05 20:47 ` [patch 240/262] mm/damon/schemes: implement size quota for schemes application speed control Andrew Morton
2021-11-05 20:47 ` [patch 241/262] mm/damon/schemes: skip already charged targets and regions Andrew Morton
2021-11-05 20:47 ` [patch 242/262] mm/damon/schemes: implement time quota Andrew Morton
2021-11-05 20:47 ` [patch 243/262] mm/damon/dbgfs: support quotas of schemes Andrew Morton
2021-11-05 20:47 ` [patch 244/262] mm/damon/selftests: support schemes quotas Andrew Morton
2021-11-05 20:47 ` [patch 245/262] mm/damon/schemes: prioritize regions within the quotas Andrew Morton
2021-11-05 20:47 ` [patch 246/262] mm/damon/vaddr,paddr: support pageout prioritization Andrew Morton
2021-11-05 20:47 ` [patch 247/262] mm/damon/dbgfs: support prioritization weights Andrew Morton
2021-11-05 20:47 ` [patch 248/262] tools/selftests/damon: update for regions prioritization of schemes Andrew Morton
2021-11-05 20:47 ` [patch 249/262] mm/damon/schemes: activate schemes based on a watermarks mechanism Andrew Morton
2021-11-05 20:47 ` [patch 250/262] mm/damon/dbgfs: support watermarks Andrew Morton
2021-11-05 20:47 ` [patch 251/262] selftests/damon: " Andrew Morton
2021-11-05 20:47 ` [patch 252/262] mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM) Andrew Morton
2021-11-05 20:48 ` [patch 253/262] Documentation/admin-guide/mm/damon: add a document for DAMON_RECLAIM Andrew Morton
2021-11-05 20:48 ` [patch 254/262] mm/damon: remove unnecessary variable initialization Andrew Morton
2021-11-05 20:48 ` [patch 255/262] mm/damon/dbgfs: add adaptive_targets list check before enable monitor_on Andrew Morton
2021-11-05 20:48 ` [patch 256/262] Docs/admin-guide/mm/damon/start: fix wrong example commands Andrew Morton
2021-11-05 20:48 ` [patch 257/262] Docs/admin-guide/mm/damon/start: fix a wrong link Andrew Morton
2021-11-05 20:48 ` [patch 258/262] Docs/admin-guide/mm/damon/start: simplify the content Andrew Morton
2021-11-05 20:48 ` [patch 259/262] Docs/admin-guide/mm/pagemap: wordsmith page flags descriptions Andrew Morton
2021-11-05 20:48 ` [patch 260/262] mm/damon: simplify stop mechanism Andrew Morton
2021-11-05 20:48 ` [patch 261/262] mm/damon: fix a few spelling mistakes in comments and a pr_debug message Andrew Morton
2021-11-05 20:48 ` [patch 262/262] mm/damon: remove return value from before_terminate callback Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211105203619.7llAC4ARX%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=alex.bou9@gmail.com \
    --cc=apw@canonical.com \
    --cc=cl@linux.com \
    --cc=danielmicay@gmail.com \
    --cc=dennis@kernel.org \
    --cc=dwaipayanray1@gmail.com \
    --cc=gustavoars@kernel.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=ira.weiny@intel.com \
    --cc=jhubbard@nvidia.com \
    --cc=jingxiangfeng@huawei.com \
    --cc=joe@perches.com \
    --cc=jrdr.linux@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=mporter@kernel.crashing.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=ojeda@kernel.org \
    --cc=penberg@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rientjes@google.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).