From: Greg Kroah-Hartman Date: Mon, 22 Nov 2021 12:36:13 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v5.15.5~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2260f81f8bb904f1abd41783ed4918a57121e9c;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: hexagon-export-raw-i-o-routines-for-modules.patch mm-kmemleak-slob-respect-slab_noleaktrace-flag.patch --- diff --git a/queue-4.4/hexagon-export-raw-i-o-routines-for-modules.patch b/queue-4.4/hexagon-export-raw-i-o-routines-for-modules.patch new file mode 100644 index 00000000000..0a417c4515a --- /dev/null +++ b/queue-4.4/hexagon-export-raw-i-o-routines-for-modules.patch @@ -0,0 +1,70 @@ +From ffb92ce826fd801acb0f4e15b75e4ddf0d189bde Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Fri, 19 Nov 2021 16:43:28 -0800 +Subject: hexagon: export raw I/O routines for modules + +From: Nathan Chancellor + +commit ffb92ce826fd801acb0f4e15b75e4ddf0d189bde upstream. + +Patch series "Fixes for ARCH=hexagon allmodconfig", v2. + +This series fixes some issues noticed with ARCH=hexagon allmodconfig. + +This patch (of 3): + +When building ARCH=hexagon allmodconfig, the following errors occur: + + ERROR: modpost: "__raw_readsl" [drivers/i3c/master/svc-i3c-master.ko] undefined! + ERROR: modpost: "__raw_writesl" [drivers/i3c/master/dw-i3c-master.ko] undefined! + ERROR: modpost: "__raw_readsl" [drivers/i3c/master/dw-i3c-master.ko] undefined! + ERROR: modpost: "__raw_writesl" [drivers/i3c/master/i3c-master-cdns.ko] undefined! + ERROR: modpost: "__raw_readsl" [drivers/i3c/master/i3c-master-cdns.ko] undefined! + +Export these symbols so that modules can use them without any errors. + +Link: https://lkml.kernel.org/r/20211115174250.1994179-1-nathan@kernel.org +Link: https://lkml.kernel.org/r/20211115174250.1994179-2-nathan@kernel.org +Fixes: 013bf24c3829 ("Hexagon: Provide basic implementation and/or stubs for I/O routines.") +Signed-off-by: Nathan Chancellor +Acked-by: Brian Cain +Cc: Nick Desaulniers +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + arch/hexagon/lib/io.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/hexagon/lib/io.c ++++ b/arch/hexagon/lib/io.c +@@ -40,6 +40,7 @@ void __raw_readsw(const void __iomem *ad + *dst++ = *src; + + } ++EXPORT_SYMBOL(__raw_readsw); + + /* + * __raw_writesw - read words a short at a time +@@ -60,6 +61,7 @@ void __raw_writesw(void __iomem *addr, c + + + } ++EXPORT_SYMBOL(__raw_writesw); + + /* Pretty sure len is pre-adjusted for the length of the access already */ + void __raw_readsl(const void __iomem *addr, void *data, int len) +@@ -75,6 +77,7 @@ void __raw_readsl(const void __iomem *ad + + + } ++EXPORT_SYMBOL(__raw_readsl); + + void __raw_writesl(void __iomem *addr, const void *data, int len) + { +@@ -89,3 +92,4 @@ void __raw_writesl(void __iomem *addr, c + + + } ++EXPORT_SYMBOL(__raw_writesl); diff --git a/queue-4.4/mm-kmemleak-slob-respect-slab_noleaktrace-flag.patch b/queue-4.4/mm-kmemleak-slob-respect-slab_noleaktrace-flag.patch new file mode 100644 index 00000000000..3fe0a16be9f --- /dev/null +++ b/queue-4.4/mm-kmemleak-slob-respect-slab_noleaktrace-flag.patch @@ -0,0 +1,51 @@ +From 34dbc3aaf5d9e89ba6cc5e24add9458c21ab1950 Mon Sep 17 00:00:00 2001 +From: Rustam Kovhaev +Date: Fri, 19 Nov 2021 16:43:37 -0800 +Subject: mm: kmemleak: slob: respect SLAB_NOLEAKTRACE flag + +From: Rustam Kovhaev + +commit 34dbc3aaf5d9e89ba6cc5e24add9458c21ab1950 upstream. + +When kmemleak is enabled for SLOB, system does not boot and does not +print anything to the console. At the very early stage in the boot +process we hit infinite recursion from kmemleak_init() and eventually +kernel crashes. + +kmemleak_init() specifies SLAB_NOLEAKTRACE for KMEM_CACHE(), but +kmem_cache_create_usercopy() removes it because CACHE_CREATE_MASK is not +valid for SLOB. + +Let's fix CACHE_CREATE_MASK and make kmemleak work with SLOB + +Link: https://lkml.kernel.org/r/20211115020850.3154366-1-rkovhaev@gmail.com +Fixes: d8843922fba4 ("slab: Ignore internal flags in cache creation") +Signed-off-by: Rustam Kovhaev +Acked-by: Vlastimil Babka +Reviewed-by: Muchun Song +Cc: Christoph Lameter +Cc: Pekka Enberg +Cc: David Rientjes +Cc: Joonsoo Kim +Cc: Catalin Marinas +Cc: Greg Kroah-Hartman +Cc: Glauber Costa +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + mm/slab.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/slab.h ++++ b/mm/slab.h +@@ -133,7 +133,7 @@ static inline unsigned long kmem_cache_f + #define SLAB_CACHE_FLAGS (SLAB_NOLEAKTRACE | SLAB_RECLAIM_ACCOUNT | \ + SLAB_TEMPORARY | SLAB_NOTRACK) + #else +-#define SLAB_CACHE_FLAGS (0) ++#define SLAB_CACHE_FLAGS (SLAB_NOLEAKTRACE) + #endif + + #define CACHE_CREATE_MASK (SLAB_CORE_FLAGS | SLAB_DEBUG_FLAGS | SLAB_CACHE_FLAGS) diff --git a/queue-4.4/series b/queue-4.4/series index 0c447f1fa94..a4a94eaf9f9 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -139,3 +139,5 @@ nfc-reorganize-the-functions-in-nci_request.patch nfc-reorder-the-logic-in-nfc_-un-register_device.patch perf-bench-fix-two-memory-leaks-detected-with-asan.patch tun-fix-bonding-active-backup-with-arp-monitoring.patch +hexagon-export-raw-i-o-routines-for-modules.patch +mm-kmemleak-slob-respect-slab_noleaktrace-flag.patch