From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EF31882F; Mon, 15 Jan 2024 08:47:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XAySov6z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705308431; x=1736844431; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1xWgi5kASA6dlTRDZTtCD0Jx+ThrEje1kmGZAUhdOXs=; b=XAySov6zmPxl5hPrlHfG9RkIIvwxFCNubJqilSbsz0YRthBPaJ2uvRfs LFUYuKkIUDSdAgnw0a5XmJkGKZ1oV6ljCZmmDVOl7AgNqBmC5a1m+dZR+ pnHBjKIPNwHXHuTcLhSSresuwfr938Kh+HQMwiDB1KhS0YPKcaH7SvZVf OY7K7kgEJBI5AeSeLg+N8up7ANbzRAHmf6cxunBf4mm+o67Rar9ui4p1P rQrTO4o5IZH5ILHx1P3Z62ShW3f4Tw9t+3R3DCSdfl+1dqFWrqGwCbJRb SFMH9ccPVoHE6VX3pqqRGp4WcpiT04Z2q/Jni9R34lntQL9p41QjAQ4pv A==; X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="396705789" X-IronPort-AV: E=Sophos;i="6.04,196,1695711600"; d="scan'208";a="396705789" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2024 00:47:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,196,1695711600"; d="scan'208";a="18093072" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by fmviesa002.fm.intel.com with ESMTP; 15 Jan 2024 00:47:08 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rPIbp-000CLO-0K; Mon, 15 Jan 2024 08:46:40 +0000 Date: Mon, 15 Jan 2024 16:44:19 +0800 From: kernel test robot To: Kevin Loughlin Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev Subject: Re: [RFC PATCH v2] x86/sev: enforce RIP-relative accesses in early SEV/SME code Message-ID: <202401151649.U1tYCHdv-lkp@intel.com> References: <20240111223650.3502633-1-kevinloughlin@google.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240111223650.3502633-1-kevinloughlin@google.com> Hi Kevin, [This is a private test report for your RFC patch.] kernel test robot noticed the following build errors: [auto build test ERROR on tip/x86/core] [also build test ERROR on tip/master tip/x86/mm linus/master v6.7 next-20240112] [cannot apply to tip/auto-latest] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Kevin-Loughlin/x86-sev-enforce-RIP-relative-accesses-in-early-SEV-SME-code/20240112-063856 base: tip/x86/core patch link: https://lore.kernel.org/r/20240111223650.3502633-1-kevinloughlin%40google.com patch subject: [RFC PATCH v2] x86/sev: enforce RIP-relative accesses in early SEV/SME code config: i386-randconfig-011-20240115 (https://download.01.org/0day-ci/archive/20240115/202401151649.U1tYCHdv-lkp@intel.com/config) compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240115/202401151649.U1tYCHdv-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202401151649.U1tYCHdv-lkp@intel.com/ All errors (new ones prefixed by >>): scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr] scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr] scripts/genksyms/parse.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples In file included from arch/x86/kernel/asm-offsets.c:9: In file included from include/linux/crypto.h:15: In file included from include/linux/completion.h:12: In file included from include/linux/swait.h:7: In file included from include/linux/spinlock.h:56: In file included from include/linux/preempt.h:79: In file included from arch/x86/include/asm/preempt.h:9: In file included from include/linux/thread_info.h:60: In file included from arch/x86/include/asm/thread_info.h:12: In file included from arch/x86/include/asm/page.h:9: In file included from arch/x86/include/asm/page_types.h:7: In file included from include/linux/mem_encrypt.h:17: >> arch/x86/include/asm/mem_encrypt.h:139:19: error: cannot take the address of an rvalue of type 'unsigned long long' 139 | return *((u64 *) GET_RIP_RELATIVE_PTR(sme_me_mask)); | ^ ~~~~~~~~~~~ arch/x86/include/asm/mem_encrypt.h:30:10: note: expanded from macro 'GET_RIP_RELATIVE_PTR' 30 | : "p" (&var)); \ | ^~~~ arch/x86/include/asm/mem_encrypt.h:144:19: error: cannot take the address of an rvalue of type 'unsigned long long' 144 | return *((u64 *) GET_RIP_RELATIVE_PTR(sev_status)); | ^ ~~~~~~~~~~ arch/x86/include/asm/mem_encrypt.h:30:10: note: expanded from macro 'GET_RIP_RELATIVE_PTR' 30 | : "p" (&var)); \ | ^~~~ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds] 97 | return (set->sig[3] | set->sig[2] | | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds] 97 | return (set->sig[3] | set->sig[2] | | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] 113 | return (set1->sig[3] == set2->sig[3]) && | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] 113 | return (set1->sig[3] == set2->sig[3]) && | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] 114 | (set1->sig[2] == set2->sig[2]) && | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:114:21: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] 114 | (set1->sig[2] == set2->sig[2]) && | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; vim +139 arch/x86/include/asm/mem_encrypt.h 136 137 static inline u64 sme_get_me_mask_fixup(void) 138 { > 139 return *((u64 *) GET_RIP_RELATIVE_PTR(sme_me_mask)); 140 } 141 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki