Skip to contentSkip to conversation

mmflags.h: add missing __GFP_ZEROTAGS and __GFP_SKIP_KASAN_POISON names

PATCH Applied Mike Rapoport 2 participants 3 messages Aug 16, 2021 – Aug 17, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmflags.h: add missing __GFP_ZEROTAGS and __GFP_SKIP_KASAN_POISON names

From: Mike Rapoport <[email protected]>

Add missing names of __GFP_ZEROTAGS and __GFP_SKIP_KASAN_POISON flags to __def_gfpflag_names.

Fixes 013bb59dbb7c ("arm64: mte: handle tags zeroing at page allocation time")
Fixes c275c5c6d50a ("kasan: disable freed user page poisoning with HW tags")
---
 include/trace/events/mmflags.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/trace/events/mmflags.h +3 -1
index 390270e00a1d..f160484afc5c 100644
@@ -48,7 +48,9 @@
 	{(unsigned long)__GFP_WRITE,		"__GFP_WRITE"},		\
 	{(unsigned long)__GFP_RECLAIM,		"__GFP_RECLAIM"},	\
 	{(unsigned long)__GFP_DIRECT_RECLAIM,	"__GFP_DIRECT_RECLAIM"},\
-	{(unsigned long)__GFP_KSWAPD_RECLAIM,	"__GFP_KSWAPD_RECLAIM"}\
+	{(unsigned long)__GFP_KSWAPD_RECLAIM,	"__GFP_KSWAPD_RECLAIM"},\
+	{(unsigned long)__GFP_ZEROTAGS,		"__GFP_ZEROTAGS"},	\
+	{(unsigned long)__GFP_SKIP_KASAN_POISON,"__GFP_SKIP_KASAN_POISON"}\
 
 #define show_gfp_flags(flags)						\
 	(flags) ? __print_flags(flags, "|",				\
Signature · 1 line
2.28.0
maintainer
#1 lore raw
Quoted 7 lines · On Mon, 16 Aug 2021 16:35:02 +0300 Mike Rapoport <[email protected]> wrote:

From: Mike Rapoport <[email protected]>

Add missing names of __GFP_ZEROTAGS and __GFP_SKIP_KASAN_POISON flags to __def_gfpflag_names.

Fixes 013bb59dbb7c ("arm64: mte: handle tags zeroing at page allocation time")
Fixes c275c5c6d50a ("kasan: disable freed user page poisoning with HW tags")

"fixes" in what way? ie, what problems were caused by the above commits?

include/trace/events/mmflags.h line 56

Quoted 13 lines
include/trace/events/mmflags.h +3 -1
@@ -48,7 +48,9 @@
 	{(unsigned long)__GFP_WRITE,		"__GFP_WRITE"},		\
 	{(unsigned long)__GFP_RECLAIM,		"__GFP_RECLAIM"},	\
 	{(unsigned long)__GFP_DIRECT_RECLAIM,	"__GFP_DIRECT_RECLAIM"},\
-	{(unsigned long)__GFP_KSWAPD_RECLAIM,	"__GFP_KSWAPD_RECLAIM"}\
+	{(unsigned long)__GFP_KSWAPD_RECLAIM,	"__GFP_KSWAPD_RECLAIM"},\
+	{(unsigned long)__GFP_ZEROTAGS,		"__GFP_ZEROTAGS"},	\
+	{(unsigned long)__GFP_SKIP_KASAN_POISON,"__GFP_SKIP_KASAN_POISON"}\
 
 #define show_gfp_flags(flags)						\
 	(flags) ? __print_flags(flags, "|",				\

I'm guessing that the tracing output was messed up in some fashion?

#2 lore raw
Quoted 23 lines · Andrew Morton
Quoted 7 lines · On Mon, 16 Aug 2021 16:35:02 +0300 Mike Rapoport <[email protected]> wrote:

From: Mike Rapoport <[email protected]>

Add missing names of __GFP_ZEROTAGS and __GFP_SKIP_KASAN_POISON flags to __def_gfpflag_names.

Fixes 013bb59dbb7c ("arm64: mte: handle tags zeroing at page allocation time")
Fixes c275c5c6d50a ("kasan: disable freed user page poisoning with HW tags")

"fixes" in what way? ie, what problems were caused by the above commits?

Quoted 11 lines
include/trace/events/mmflags.h +3 -1
@@ -48,7 +48,9 @@
 	{(unsigned long)__GFP_WRITE,		"__GFP_WRITE"},		\
 	{(unsigned long)__GFP_RECLAIM,		"__GFP_RECLAIM"},	\
 	{(unsigned long)__GFP_DIRECT_RECLAIM,	"__GFP_DIRECT_RECLAIM"},\
-	{(unsigned long)__GFP_KSWAPD_RECLAIM,	"__GFP_KSWAPD_RECLAIM"}\
+	{(unsigned long)__GFP_KSWAPD_RECLAIM,	"__GFP_KSWAPD_RECLAIM"},\
+	{(unsigned long)__GFP_ZEROTAGS,		"__GFP_ZEROTAGS"},	\
+	{(unsigned long)__GFP_SKIP_KASAN_POISON,"__GFP_SKIP_KASAN_POISON"}\
 
Quoted 4 lines

include/trace/events/mmflags.h line 56

Quoted 2 lines
include/trace/events/mmflags.h +0 -0
 #define show_gfp_flags(flags)						\
 	(flags) ? __print_flags(flags, "|",				\

I'm guessing that the tracing output was messed up in some fashion?

I didn't check tracing actually, but printk("%pGg") outputs these two flags as hexadecimal number, rather that string, e.g:

	GFP_KERNEL|0x1800000 
Signature · 2 lines
Sincerely yours,
Mike.