Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD502C433F5 for ; Mon, 1 Nov 2021 20:46:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 572F160F3A for ; Mon, 1 Nov 2021 20:46:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 572F160F3A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9C8A86B00BE; Mon, 1 Nov 2021 16:46:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 978D794000F; Mon, 1 Nov 2021 16:46:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8672E6B00C0; Mon, 1 Nov 2021 16:46:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 7897B6B00BE for ; Mon, 1 Nov 2021 16:46:23 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 327B4183D88D6 for ; Mon, 1 Nov 2021 20:46:23 +0000 (UTC) X-FDA: 78761544246.14.F44CFCA Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf18.hostedemail.com (Postfix) with ESMTP id CD882400208F for ; Mon, 1 Nov 2021 20:46:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ryZuy65dlIe4cvCN4a2FYofG6Kwun01n04uoix87XZ0=; b=HnN7OHfFI7zr8D01JpCXHxZKGP 7M5+QmccwelXqHNuzrv3e93vvEYZLAp54na89ZXpM8v0aQB7eb5S3R21ZqAqZiSOpKygoILyHlQ1X TcdIOWmJoHzY+kCtoAHChAg65yIS5mgwtfp4flTcaIoybA5yXrYKxGsMUDMde1olCLU++OcW4HL/6 x/YpvavbJm3h3JXzbusgP4mHr9Jp/d4Nr8jMt6GxKX1VSGvCC1SKn3DI0Yv5kkcbyrrTVJPKBH79z daxWwGDIiVJPWpP/28Rnx2wS8ZoFXPsRZOOoF6ShRLd3IRvjYByIh7i1ydyt/XS9rZ1ot2+gSxTbN IvlFbHlA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhe9Y-0040Vl-G5; Mon, 01 Nov 2021 20:43:57 +0000 Date: Mon, 1 Nov 2021 20:43:36 +0000 From: Matthew Wilcox To: Yang Shi Cc: Linus Torvalds , naresh.kamboju@linaro.org, kirill.shutemov@linux.intel.com, naoya.horiguchi@nec.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: page-flags: fix build failure due to missing parameter for HasHWPoisoned flag Message-ID: References: <20211101194336.305546-1-shy828301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211101194336.305546-1-shy828301@gmail.com> Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=HnN7OHfF; dmarc=none; spf=none (imf18.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam03 X-Stat-Signature: jizdpqicfbi4mydiazz4g7fm3ixzu7pa X-Rspamd-Queue-Id: CD882400208F X-HE-Tag: 1635799582-67823 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 > Cc: Naresh Kamboju > Cc: Matthew Wilcox > Cc: Kirill A. Shutemov > Cc: Naoya Horiguchi > Signed-off-by: Yang Shi > --- > 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 > >