public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the mm tree with the slab tree
@ 2022-09-06 10:26 Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2022-09-06 10:26 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka
  Cc: Alexander Potapenko, Hyeonggon Yoo, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1904 bytes --]

Hi all,

Today's linux-next merge of the mm tree got a conflict in:

  mm/slub.c

between commits:

  a0c3b940023e ("mm/slub: move kmalloc_large_node() to slab_common.c")
  d6a71648dbc0 ("mm/slab: kmalloc: pass requests larger than order-1 page to page allocator")

from the slab tree and commit:

  47dd2b0d3e37 ("mm: kmsan: call KMSAN hooks from SLUB code")

from the mm tree.

I fixed it up (I used the former version of this file and applied the
following patch) and can carry the fix as necessary. This is now fixed
as far as linux-next is concerned, but any non trivial conflicts should
be mentioned to your upstream maintainer when your tree is submitted for
merging.  You may also want to consider cooperating with the maintainer
of the conflicting tree to minimise any particularly complex conflicts.

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Tue, 6 Sep 2022 19:42:49 +1000
Subject: [PATCH] mm/slab: fix up for "mm: kmsan: call KMSAN hooks from SLUB code"

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 mm/slab_common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/slab_common.c b/mm/slab_common.c
index 6a76c496e7e0..2e28a551b8d3 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -901,6 +901,7 @@ void free_large_kmalloc(struct folio *folio, void *object)
 
 	kmemleak_free(object);
 	kasan_kfree_large(object);
+	kmsan_kfree_large(object);
 
 	mod_lruvec_page_state(folio_page(folio, 0), NR_SLAB_UNRECLAIMABLE_B,
 			      -(PAGE_SIZE << order));
@@ -1078,6 +1079,7 @@ static void *__kmalloc_large_node(size_t size, gfp_t flags, int node)
 	ptr = kasan_kmalloc_large(ptr, size, flags);
 	/* As ptr might get tagged, call kmemleak hook after KASAN. */
 	kmemleak_alloc(ptr, size, 1, flags);
+	kmsan_kmalloc_large(ptr, size, flags);
 
 	return ptr;
 }
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread
* linux-next: manual merge of the mm tree with the slab tree
@ 2022-05-02  9:25 Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2022-05-02  9:25 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka
  Cc: Andrey Konovalov, Andrey Konovalov, Linux Kernel Mailing List,
	Linux Next Mailing List, Peter Collingbourne

[-- Attachment #1: Type: text/plain, Size: 1993 bytes --]

Hi all,

Today's linux-next merge of the mm tree got a conflict in:

  include/linux/slab.h

between commit:

  71aeb554a274 ("mm: slab: fix comment for __assume_kmalloc_alignment")

from the slab tree and commits:

  3f0cd9a623ec ("mm: make minimum slab alignment a runtime property")
  78c0585fdbac ("mm-make-minimum-slab-alignment-a-runtime-property-fix")

from the mm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/slab.h
index 58bb9392775d,3d2f2a3ca17e..000000000000
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@@ -216,10 -209,22 +216,22 @@@ void kmem_dump_obj(void *object)
  #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
  #endif
  
+ /*
+  * Arches can define this function if they want to decide the minimum slab
+  * alignment at runtime. The value returned by the function must be a power
+  * of two and >= ARCH_SLAB_MINALIGN.
+  */
+ #ifndef arch_slab_minalign
+ static inline unsigned int arch_slab_minalign(void)
+ {
+ 	return ARCH_SLAB_MINALIGN;
+ }
+ #endif
+ 
  /*
 - * kmalloc and friends return ARCH_KMALLOC_MINALIGN aligned
 - * pointers. kmem_cache_alloc and friends return ARCH_SLAB_MINALIGN
 - * aligned pointers.
 + * kmem_cache_alloc and friends return pointers aligned to ARCH_SLAB_MINALIGN.
 + * kmalloc and friends return pointers aligned to both ARCH_KMALLOC_MINALIGN
 + * and ARCH_SLAB_MINALIGN, but here we only assume the former alignment.
   */
  #define __assume_kmalloc_alignment __assume_aligned(ARCH_KMALLOC_MINALIGN)
  #define __assume_slab_alignment __assume_aligned(ARCH_SLAB_MINALIGN)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-06 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-06 10:26 linux-next: manual merge of the mm tree with the slab tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2022-05-02  9:25 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox