* [PATCH] mm: page-flags: fix build failure due to missing parameter for HasHWPoisoned flag
@ 2021-11-01 19:43 Yang Shi
2021-11-01 20:43 ` Matthew Wilcox
0 siblings, 1 reply; 4+ messages in thread
From: Yang Shi @ 2021-11-01 19:43 UTC (permalink / raw)
To: naresh.kamboju, willy, kirill.shutemov, naoya.horiguchi, akpm
Cc: shy828301, linux-mm, linux-kernel
The below build failure when !CONFIG_MEMORY_FAILURE was reported for
v5.16 merge window:
In file included from include/linux/mmzone.h:22,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
include/linux/page-flags.h:806:29: error: macro "PAGEFLAG_FALSE"
requires 2 arguments, but only 1 given
806 | PAGEFLAG_FALSE(HasHWPoisoned)
| ^
include/linux/page-flags.h:411: note: macro "PAGEFLAG_FALSE" defined here
411 | #define PAGEFLAG_FALSE(uname, lname) TESTPAGEFLAG_FALSE(uname, lname) \
|
include/linux/page-flags.h:807:39: error: macro "TESTSCFLAG_FALSE"
requires 2 arguments, but only 1 given
807 | TESTSCFLAG_FALSE(HasHWPoisoned)
| ^
include/linux/page-flags.h:414: note: macro "TESTSCFLAG_FALSE" defined here
414 | #define TESTSCFLAG_FALSE(uname, lname)
\
|
include/linux/page-flags.h:806:1: error: unknown type name 'PAGEFLAG_FALSE'
806 | PAGEFLAG_FALSE(HasHWPoisoned)
| ^~~~~~~~~~~~~~
include/linux/page-flags.h:807:25: error: expected ';' before 'static'
807 | TESTSCFLAG_FALSE(HasHWPoisoned)
| ^
| ;
......
815 | static inline bool is_page_hwpoison(struct page *page)
| ~~~~~~
make[2]: *** [scripts/Makefile.build:121: arch/x86/kernel/asm-offsets.s] Error 1
The commit d389a4a81155 ("mm: Add folio flag manipulation functions")
changed the definition of PAGEFLAG macros, this caused the build failure
for HasHWPoisoned flag. The new flag was introduced by commit
eac96c3efdb5 ("mm: filemap: check if THP has hwpoisoned subpage for PMD
page fault") in v5.15-rc7. But the folio series pull request was
prepared before v5.15, so this new flag was missed.
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Yang Shi <shy828301@gmail.com>
---
include/linux/page-flags.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index d8623d6e1141..981341a3c3c4 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -803,8 +803,8 @@ PAGEFLAG_FALSE(DoubleMap, double_map)
PAGEFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
TESTSCFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
#else
-PAGEFLAG_FALSE(HasHWPoisoned)
- TESTSCFLAG_FALSE(HasHWPoisoned)
+PAGEFLAG_FALSE(HasHWPoisoned, has_hwpoisoned)
+ TESTSCFLAG_FALSE(HasHWPoisoned, has_hwpoisoned)
#endif
/*
--
2.26.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: page-flags: fix build failure due to missing parameter for HasHWPoisoned flag
2021-11-01 19:43 [PATCH] mm: page-flags: fix build failure due to missing parameter for HasHWPoisoned flag Yang Shi
@ 2021-11-01 20:43 ` Matthew Wilcox
2021-11-01 21:06 ` Yang Shi
2021-11-01 21:34 ` Linus Torvalds
0 siblings, 2 replies; 4+ messages in thread
From: Matthew Wilcox @ 2021-11-01 20:43 UTC (permalink / raw)
To: Yang Shi
Cc: Linus Torvalds, naresh.kamboju, kirill.shutemov, naoya.horiguchi,
akpm, linux-mm, linux-kernel
Should probbaly cc Linus, and also note that Stephen noticed & fixed
this problem already.
https://lore.kernel.org/lkml/20211101174846.2b1097d7@canb.auug.org.au/
I didn't know about it at the time I sent the pull request because it
hadn't been merged at that point.
On Mon, Nov 01, 2021 at 12:43:36PM -0700, Yang Shi wrote:
> The below build failure when !CONFIG_MEMORY_FAILURE was reported for
> v5.16 merge window:
> In file included from include/linux/mmzone.h:22,
> from include/linux/gfp.h:6,
> from include/linux/slab.h:15,
> from include/linux/crypto.h:20,
> from arch/x86/kernel/asm-offsets.c:9:
> include/linux/page-flags.h:806:29: error: macro "PAGEFLAG_FALSE"
> requires 2 arguments, but only 1 given
> 806 | PAGEFLAG_FALSE(HasHWPoisoned)
> | ^
> include/linux/page-flags.h:411: note: macro "PAGEFLAG_FALSE" defined here
> 411 | #define PAGEFLAG_FALSE(uname, lname) TESTPAGEFLAG_FALSE(uname, lname) \
> |
> include/linux/page-flags.h:807:39: error: macro "TESTSCFLAG_FALSE"
> requires 2 arguments, but only 1 given
> 807 | TESTSCFLAG_FALSE(HasHWPoisoned)
> | ^
> include/linux/page-flags.h:414: note: macro "TESTSCFLAG_FALSE" defined here
> 414 | #define TESTSCFLAG_FALSE(uname, lname)
> \
> |
> include/linux/page-flags.h:806:1: error: unknown type name 'PAGEFLAG_FALSE'
> 806 | PAGEFLAG_FALSE(HasHWPoisoned)
> | ^~~~~~~~~~~~~~
> include/linux/page-flags.h:807:25: error: expected ';' before 'static'
> 807 | TESTSCFLAG_FALSE(HasHWPoisoned)
> | ^
> | ;
> ......
> 815 | static inline bool is_page_hwpoison(struct page *page)
> | ~~~~~~
> make[2]: *** [scripts/Makefile.build:121: arch/x86/kernel/asm-offsets.s] Error 1
>
> The commit d389a4a81155 ("mm: Add folio flag manipulation functions")
> changed the definition of PAGEFLAG macros, this caused the build failure
> for HasHWPoisoned flag. The new flag was introduced by commit
> eac96c3efdb5 ("mm: filemap: check if THP has hwpoisoned subpage for PMD
> page fault") in v5.15-rc7. But the folio series pull request was
> prepared before v5.15, so this new flag was missed.
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
> Cc: Matthew Wilcox <willy@infradead.org>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
> Signed-off-by: Yang Shi <shy828301@gmail.com>
> ---
> include/linux/page-flags.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> index d8623d6e1141..981341a3c3c4 100644
> --- a/include/linux/page-flags.h
> +++ b/include/linux/page-flags.h
> @@ -803,8 +803,8 @@ PAGEFLAG_FALSE(DoubleMap, double_map)
> PAGEFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
> TESTSCFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
> #else
> -PAGEFLAG_FALSE(HasHWPoisoned)
> - TESTSCFLAG_FALSE(HasHWPoisoned)
> +PAGEFLAG_FALSE(HasHWPoisoned, has_hwpoisoned)
> + TESTSCFLAG_FALSE(HasHWPoisoned, has_hwpoisoned)
> #endif
>
> /*
> --
> 2.26.2
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: page-flags: fix build failure due to missing parameter for HasHWPoisoned flag
2021-11-01 20:43 ` Matthew Wilcox
@ 2021-11-01 21:06 ` Yang Shi
2021-11-01 21:34 ` Linus Torvalds
1 sibling, 0 replies; 4+ messages in thread
From: Yang Shi @ 2021-11-01 21:06 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Linus Torvalds, Naresh Kamboju, Kirill A. Shutemov,
HORIGUCHI NAOYA(堀口 直也),
Andrew Morton, Linux MM, Linux Kernel Mailing List
On Mon, Nov 1, 2021 at 1:45 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> Should probbaly cc Linus, and also note that Stephen noticed & fixed
> this problem already.
> https://lore.kernel.org/lkml/20211101174846.2b1097d7@canb.auug.org.au/
Oh, yes, I forgot that fix. Anyway picking either one is fine to me.
>
> I didn't know about it at the time I sent the pull request because it
> hadn't been merged at that point.
It is fine. I really don't mean blame to you.
>
> On Mon, Nov 01, 2021 at 12:43:36PM -0700, Yang Shi wrote:
> > The below build failure when !CONFIG_MEMORY_FAILURE was reported for
> > v5.16 merge window:
> > In file included from include/linux/mmzone.h:22,
> > from include/linux/gfp.h:6,
> > from include/linux/slab.h:15,
> > from include/linux/crypto.h:20,
> > from arch/x86/kernel/asm-offsets.c:9:
> > include/linux/page-flags.h:806:29: error: macro "PAGEFLAG_FALSE"
> > requires 2 arguments, but only 1 given
> > 806 | PAGEFLAG_FALSE(HasHWPoisoned)
> > | ^
> > include/linux/page-flags.h:411: note: macro "PAGEFLAG_FALSE" defined here
> > 411 | #define PAGEFLAG_FALSE(uname, lname) TESTPAGEFLAG_FALSE(uname, lname) \
> > |
> > include/linux/page-flags.h:807:39: error: macro "TESTSCFLAG_FALSE"
> > requires 2 arguments, but only 1 given
> > 807 | TESTSCFLAG_FALSE(HasHWPoisoned)
> > | ^
> > include/linux/page-flags.h:414: note: macro "TESTSCFLAG_FALSE" defined here
> > 414 | #define TESTSCFLAG_FALSE(uname, lname)
> > \
> > |
> > include/linux/page-flags.h:806:1: error: unknown type name 'PAGEFLAG_FALSE'
> > 806 | PAGEFLAG_FALSE(HasHWPoisoned)
> > | ^~~~~~~~~~~~~~
> > include/linux/page-flags.h:807:25: error: expected ';' before 'static'
> > 807 | TESTSCFLAG_FALSE(HasHWPoisoned)
> > | ^
> > | ;
> > ......
> > 815 | static inline bool is_page_hwpoison(struct page *page)
> > | ~~~~~~
> > make[2]: *** [scripts/Makefile.build:121: arch/x86/kernel/asm-offsets.s] Error 1
> >
> > The commit d389a4a81155 ("mm: Add folio flag manipulation functions")
> > changed the definition of PAGEFLAG macros, this caused the build failure
> > for HasHWPoisoned flag. The new flag was introduced by commit
> > eac96c3efdb5 ("mm: filemap: check if THP has hwpoisoned subpage for PMD
> > page fault") in v5.15-rc7. But the folio series pull request was
> > prepared before v5.15, so this new flag was missed.
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
> > Cc: Matthew Wilcox <willy@infradead.org>
> > Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
> > Signed-off-by: Yang Shi <shy828301@gmail.com>
> > ---
> > include/linux/page-flags.h | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> > index d8623d6e1141..981341a3c3c4 100644
> > --- a/include/linux/page-flags.h
> > +++ b/include/linux/page-flags.h
> > @@ -803,8 +803,8 @@ PAGEFLAG_FALSE(DoubleMap, double_map)
> > PAGEFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
> > TESTSCFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
> > #else
> > -PAGEFLAG_FALSE(HasHWPoisoned)
> > - TESTSCFLAG_FALSE(HasHWPoisoned)
> > +PAGEFLAG_FALSE(HasHWPoisoned, has_hwpoisoned)
> > + TESTSCFLAG_FALSE(HasHWPoisoned, has_hwpoisoned)
> > #endif
> >
> > /*
> > --
> > 2.26.2
> >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: page-flags: fix build failure due to missing parameter for HasHWPoisoned flag
2021-11-01 20:43 ` Matthew Wilcox
2021-11-01 21:06 ` Yang Shi
@ 2021-11-01 21:34 ` Linus Torvalds
1 sibling, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2021-11-01 21:34 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Yang Shi, Naresh Kamboju, Kirill A . Shutemov,
HORIGUCHI NAOYA(堀口 直也),
Andrew Morton, Linux-MM, Linux Kernel Mailing List
On Mon, Nov 1, 2021 at 1:45 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> Should probbaly cc Linus, and also note that Stephen noticed & fixed
> this problem already.
> https://lore.kernel.org/lkml/20211101174846.2b1097d7@canb.auug.org.au/
Oops. And both my "small" and "large" config have MEMORY_FAILURE and
TRANSPARENT_HUGEPAGE enabled, which seems to be why my build tests
didn't trigger the failure case.
Will fix up.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-01 21:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01 19:43 [PATCH] mm: page-flags: fix build failure due to missing parameter for HasHWPoisoned flag Yang Shi
2021-11-01 20:43 ` Matthew Wilcox
2021-11-01 21:06 ` Yang Shi
2021-11-01 21:34 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox