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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2CACC433EF for ; Thu, 16 Jun 2022 12:45:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 06F1C6B0071; Thu, 16 Jun 2022 08:45:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 01E606B0072; Thu, 16 Jun 2022 08:45:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E280A6B0074; Thu, 16 Jun 2022 08:45:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D27976B0071 for ; Thu, 16 Jun 2022 08:45:05 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 8DC2660483 for ; Thu, 16 Jun 2022 12:45:05 +0000 (UTC) X-FDA: 79584068970.14.6BFB0AA Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by imf14.hostedemail.com (Postfix) with ESMTP id 70884100076 for ; Thu, 16 Jun 2022 12:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655383504; x=1686919504; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=2Z5Da896Eo94KjFbVdgpWXCi2n2dzVGb+t3oq6zgE4Q=; b=Zn3pV9KnTG8K3XIhCw4R4FgzHIQqKJ156OC6+HTXTYAUyVqv7bER9HN5 bL8nxyAej+XVU7s/Wc/wM/watCX0echKvSHXjg1OZPokXfsu0XG+y5uwY JccJgXZrJjirzM2JW6Dlmgh4jqYcPXm4azAmQyM3RmP6d5rAVccDUqmHa vWV/PbBaVWEkSpAhGGD/TSnZKh/9Nqpmnhf7BuUcMOE4eegKwMato9Bz/ rmbdg1AqEsbfG1ukx9+zqb79xdQ5VJP7BoJF/PP+LPHH+gy7Uq4ZMrcnN 90iQYA7vnmL7gcRdXWlSz6PiT4vSFwQgq7IKLEmNGTmpc7ikeFUWuiN7j Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="340894330" X-IronPort-AV: E=Sophos;i="5.91,305,1647327600"; d="scan'208";a="340894330" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 05:45:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,305,1647327600"; d="scan'208";a="641522693" Received: from lkp-server01.sh.intel.com (HELO 60dabacc1df6) ([10.239.97.150]) by fmsmga008.fm.intel.com with ESMTP; 16 Jun 2022 05:44:59 -0700 Received: from kbuild by 60dabacc1df6 with local (Exim 4.95) (envelope-from ) id 1o1orr-000ONl-8r; Thu, 16 Jun 2022 12:44:59 +0000 Date: Thu, 16 Jun 2022 20:44:06 +0800 From: kernel test robot To: Anshuman Khandual , linux-mm@kvack.org Cc: kbuild-all@lists.01.org, hch@infradead.org, Anshuman Khandual , Andrew Morton , Linux Memory Management List , linux-kernel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH V3 1/2] mm/mmap: Restrict generic protection_map[] array visibility Message-ID: <202206162004.ak9KTfMD-lkp@intel.com> References: <20220616040924.1022607-2-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220616040924.1022607-2-anshuman.khandual@arm.com> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655383505; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=or1YexVs0buTdQIV696OTsbDDPhV54+VPag7Uod8FRE=; b=op8WgOZ95SqOAjJdDnrv+FKDXPUCu8ETltIDMEXiTk+UQMylEQd7PjfXC17THN6ZxIomOn w3s7ekHeGyTZi0JI1kWz8NFimZ+FsWwyMmQWNnbLVjhToePBrQ+gGhnNymn7qNxh6SoQR3 4AHFE17J+IvzprcWaKE54ccl9RIJw04= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Zn3pV9Kn; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf14.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.31) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655383505; a=rsa-sha256; cv=none; b=50rYeKmbXRk/HgRk4Q8/ASSY0uiITApwR+66qPBG53t5E2O6dc2bCQdMmfKtlgh+z0dMtc uWAsjemJM9wva/wpNLGHQ1hpy3Srxe/HYCt2FUKFk2wG6W6v479xpIIh6rTukYGuHMA5PU ziIARHHIoo7rvGPrC5nMYq19dPtY5VI= X-Rspamd-Queue-Id: 70884100076 X-Rspam-User: X-Stat-Signature: gjdyyza3onypmue1dhtpad5cdjxze1z4 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Zn3pV9Kn; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf14.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.31) smtp.mailfrom=lkp@intel.com X-Rspamd-Server: rspam04 X-HE-Tag: 1655383504-696495 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: Hi Anshuman, Thank you for the patch! Yet something to improve: [auto build test ERROR on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/Anshuman-Khandual/mm-mmap-Drop-__SXXX-__PXXX-macros-from-across-platforms/20220616-121132 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220616/202206162004.ak9KTfMD-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/4eb89368b130fe235d5e587bcc2eec18bb688e2d git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Anshuman-Khandual/mm-mmap-Drop-__SXXX-__PXXX-macros-from-across-platforms/20220616-121132 git checkout 4eb89368b130fe235d5e587bcc2eec18bb688e2d # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/preempt.h:6, from include/linux/preempt.h:78, from include/linux/spinlock.h:55, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/mm.h:7, from arch/x86/mm/mem_encrypt_amd.c:14: arch/x86/mm/mem_encrypt_amd.c: In function 'sme_early_init': >> arch/x86/mm/mem_encrypt_amd.c:499:36: error: 'protection_map' undeclared (first use in this function) 499 | for (i = 0; i < ARRAY_SIZE(protection_map); i++) | ^~~~~~~~~~~~~~ include/linux/kernel.h:55:33: note: in definition of macro 'ARRAY_SIZE' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ arch/x86/mm/mem_encrypt_amd.c:499:36: note: each undeclared identifier is reported only once for each function it appears in 499 | for (i = 0; i < ARRAY_SIZE(protection_map); i++) | ^~~~~~~~~~~~~~ include/linux/kernel.h:55:33: note: in definition of macro 'ARRAY_SIZE' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/bits.h:22, from include/linux/ratelimit_types.h:5, from include/linux/printk.h:9, from include/asm-generic/bug.h:22, from arch/x86/include/asm/bug.h:87, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/mm.h:6, from arch/x86/mm/mem_encrypt_amd.c:14: include/linux/build_bug.h:16:51: error: bit-field '' width not an integer constant 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); }))) | ^ include/linux/compiler.h:240:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO' 240 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | ^~~~~~~~~~~~~~~~~ include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ arch/x86/mm/mem_encrypt_amd.c:499:25: note: in expansion of macro 'ARRAY_SIZE' 499 | for (i = 0; i < ARRAY_SIZE(protection_map); i++) | ^~~~~~~~~~ vim +/protection_map +499 arch/x86/mm/mem_encrypt_amd.c 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 486 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 487 void __init sme_early_init(void) 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 488 { 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 489 unsigned int i; 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 490 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 491 if (!sme_me_mask) 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 492 return; 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 493 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 494 early_pmd_flags = __sme_set(early_pmd_flags); 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 495 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 496 __supported_pte_mask = __sme_set(__supported_pte_mask); 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 497 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 498 /* Update the protection map with memory encryption mask */ 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 @499 for (i = 0; i < ARRAY_SIZE(protection_map); i++) 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 500 protection_map[i] = pgprot_encrypted(protection_map[i]); 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 501 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 502 x86_platform.guest.enc_status_change_prepare = amd_enc_status_change_prepare; 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 503 x86_platform.guest.enc_status_change_finish = amd_enc_status_change_finish; 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 504 x86_platform.guest.enc_tlb_flush_required = amd_enc_tlb_flush_required; 1e8c5971c24989 arch/x86/mm/mem_encrypt_amd.c Brijesh Singh 2022-02-22 505 x86_platform.guest.enc_cache_flush_required = amd_enc_cache_flush_required; f4495615d76cfe arch/x86/mm/mem_encrypt.c Ashish Kalra 2021-08-24 506 } f4495615d76cfe arch/x86/mm/mem_encrypt.c Ashish Kalra 2021-08-24 507 -- 0-DAY CI Kernel Test Service https://01.org/lkp