From mboxrd@z Thu Jan 1 00:00:00 1970 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 6D752C433EF for ; Wed, 10 Nov 2021 02:48:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D5151610CF for ; Wed, 10 Nov 2021 02:48:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D5151610CF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3FC8A6B007B; Tue, 9 Nov 2021 21:48:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AC116B007D; Tue, 9 Nov 2021 21:48:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C2886B007E; Tue, 9 Nov 2021 21:48:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0070.hostedemail.com [216.40.44.70]) by kanga.kvack.org (Postfix) with ESMTP id 1DBDA6B007B for ; Tue, 9 Nov 2021 21:48:33 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C061C18132D0B for ; Wed, 10 Nov 2021 02:48:32 +0000 (UTC) X-FDA: 78791487264.30.C9B188B Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf30.hostedemail.com (Postfix) with ESMTP id 0A266E002115 for ; Wed, 10 Nov 2021 02:48:10 +0000 (UTC) Date: Wed, 10 Nov 2021 11:48:19 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1636512509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RxY5kptRyDJl4YZiQPKt2AYkrx5yOZw38PsL55n6oDI=; b=nOFOhjaai3f73yJLzhGFt8G30m+FKJ8YfKso0aKdGh0g1Hm2ij6bQqAlS6EoNsSaPKhx+A cacIqK4ieucHZ+U34uOQW8D83daTIMXfDsHsOKQfVUsm3ZNoDhtM2rMxT09Wv+CFMlL8yB SiAoMhsK5weDa/wxQGh/uYrTQJDPIw8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Naoya Horiguchi To: kernel test robot Cc: linux-mm@kvack.org, kbuild-all@lists.01.org, Andrew Morton , David Hildenbrand , Oscar Salvador , Michal Hocko , Ding Hui , Tony Luck , "Aneesh Kumar K.V" , Miaohe Lin Subject: Re: [PATCH v3 3/3] mm/hwpoison: fix unpoison_memory() Message-ID: <20211110024819.GA3407501@u2004> References: <20211105055058.3152564-4-naoya.horiguchi@linux.dev> <202111070746.4o7PrdFj-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202111070746.4o7PrdFj-lkp@intel.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: naoya.horiguchi@linux.dev X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 0A266E002115 X-Stat-Signature: rwj4unwy9q8qg6xbp561koj1sgr4fu1f Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=nOFOhjaa; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf30.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev X-HE-Tag: 1636512490-991296 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: On Sun, Nov 07, 2021 at 07:25:13AM +0800, kernel test robot wrote: > Hi Naoya, > > I love your patch! Yet something to improve: > > [auto build test ERROR on hnaz-mm/master] > > url: https://github.com/0day-ci/linux/commits/Naoya-Horiguchi/mm-hwpoison-fix-unpoison_memory/20211105-135311 > base: https://github.com/hnaz/linux-mm master > config: i386-allyesconfig (attached as .config) > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 > reproduce (this is a W=1 build): > # https://github.com/0day-ci/linux/commit/1b78bd027ee061f9378cf47687f9f4649a160fa4 > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Naoya-Horiguchi/mm-hwpoison-fix-unpoison_memory/20211105-135311 > git checkout 1b78bd027ee061f9378cf47687f9f4649a160fa4 > # save the attached .config to linux build tree > make W=1 ARCH=i386 I can't reproduce the same error with the above procedure (maybe because I use newer version of gcc?), but anyway I suspect that memory-failure.c should be compiled for i386 (which should not support software-recoverable memory error). X86_SUPPORTS_MEMORY_FAILURE depends on (X86_64 || !SPARSEMEM) in arch/x86/Kconfig, where according to commit d949f36f1865 ("x86: Fix hwpoison code related build failure on 32-bit NUMAQ"), dependency on !SPRASEMEM is just to avoid exhaustion of page flag field. So I'm thinking of fixing this error by removing the dependency on !SPARSEMEM like below. diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index bc9503674249..9a047cb71bba 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -717,11 +717,10 @@ config X86_32_NON_STANDARD config X86_SUPPORTS_MEMORY_FAILURE def_bool y # MCE code calls memory_failure(): depends on X86_MCE - # On 32-bit this adds too big of NODES_SHIFT and we run out of page flags: - # On 32-bit SPARSEMEM adds too big of SECTIONS_WIDTH: - depends on X86_64 || !SPARSEMEM + # On 32-bit software recoverable memory error is not supported: + depends on X86_64 select ARCH_SUPPORTS_MEMORY_FAILURE config STA2X11 bool "STA2X11 Companion Chip Support" > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot I'll add the tag. Thank you for the report. - Naoya Horiguchi > > All errors (new ones prefixed by >>): > > In file included from include/linux/mmzone.h:22, > from include/linux/gfp.h:6, > from include/linux/mm.h:10, > from mm/memory-failure.c:37: > mm/memory-failure.c: In function 'SetPageHWPoisonTakenOff': > >> include/linux/page-flags.h:525:24: error: unsigned conversion from 'long long int' to 'long unsigned int' changes value from '5212723395167473486' to '1230196558' [-Werror=overflow] > 525 | #define MAGIC_HWPOISON 0x4857504f49534f4e > | ^~~~~~~~~~~~~~~~~~ > mm/memory-failure.c:1170:25: note: in expansion of macro 'MAGIC_HWPOISON' > 1170 | set_page_private(page, MAGIC_HWPOISON); > | ^~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > > vim +525 include/linux/page-flags.h > > 520 > 521 #ifdef CONFIG_MEMORY_FAILURE > 522 PAGEFLAG(HWPoison, hwpoison, PF_ANY) > 523 TESTSCFLAG(HWPoison, hwpoison, PF_ANY) > 524 #define __PG_HWPOISON (1UL << PG_hwpoison) > > 525 #define MAGIC_HWPOISON 0x4857504f49534f4e > 526 extern void SetPageHWPoisonTakenOff(struct page *page); > 527 extern void ClearPageHWPoisonTakenOff(struct page *page); > 528 extern bool take_page_off_buddy(struct page *page); > 529 extern bool put_page_back_buddy(struct page *page); > 530 #else > 531 PAGEFLAG_FALSE(HWPoison, hwpoison) > 532 #define __PG_HWPOISON 0 > 533 #endif > 534 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org