Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5505455pxb; Wed, 26 Jan 2022 13:38:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRgYT7PjMJP8aNbINs2t2ZZy2crNFA9hM0GQxYH9p4sObQ+yGavvmGCV8tZM+cq4OiDj2l X-Received: by 2002:a17:902:db0d:: with SMTP id m13mr503574plx.159.1643233115249; Wed, 26 Jan 2022 13:38:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643233115; cv=none; d=google.com; s=arc-20160816; b=zSRCD61SEYaQvE0IM/zkBuVnsFVWiWHOS6w9OtyuYpMpTguqnF9uSwXAdsuCphD4ma da9DFvyYOHxLlGBDH5R5gk683r6wNUikXCCJPJ65fpG+x2ao41SWUAtruRUzb5+DIUsT TfkK8Tbzj/5mTTkIXhlfLrmfqxbWCYrijiLIRvFBBOiVoW2TNGehk7p729rjNHrpFYz7 kTdL95qvEyS1qmReeS36trmG6PNQ63tkL2k1vmBbKXVf9INwagSIT+y83WfEH5TGwWiE 9wRw6dWuLp/diYF8c+wkEavpa5a/Xyjl2qruB8zt6qkpMVO2M+iGRO3rBhwGbzFu7WtI 7suQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3Vaca6vXSx/0v5NKy+W8hlxHopOSa2d6bRUBlUh805s=; b=o+GI8vKkILtv0o0qKxDbdC35LM8MLViPTp8LNnGZ4RWX0dKavmjUg7i8LA779vpsfY ZSfbjGFtuM7+wERMNEm5aSP8ioaWxm+fiCK/bFZsSKAJnZfuJx7z+Pum0CQ/b3PXrtEQ f7nt3vTXvoQIPTiMjxExiosli+y2Xcupm9GEaMYem+c/Zn/xABjSB34rLOwRouFoZUaR madOqJSkIgGCQAFhyLI7+1SY1xCLanZZaWS72ZCi9HzsvSdJ0T2VuhMrwax3gT+Hn8fn 3DvzDq7cR1+JRpSVv2T1e4PieWx7J+8enoKd9UsNOlA4HzTseqsPysLvlyI0jrHa+zHs W+7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lBIehyv5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g132si327731pgc.29.2022.01.26.13.38.21; Wed, 26 Jan 2022 13:38:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lBIehyv5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242371AbiAZOwH (ORCPT + 99 others); Wed, 26 Jan 2022 09:52:07 -0500 Received: from mga18.intel.com ([134.134.136.126]:52046 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242393AbiAZOwB (ORCPT ); Wed, 26 Jan 2022 09:52:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643208721; x=1674744721; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+C7GbNvdhhupsiddx9nyBA2kLdGmDvK2B+OFoSsBS2A=; b=lBIehyv5ZcqCNTcVcY22vJnTvHWgmJhgKUujnC1GIaH5SoRnbzTj5ECX UPyopMkTIeJ84XSizZkQ4/OmV9v5rIL0Y2MwdqqZcfaA4/9Ypehvmk8If 0/cGAHSarb+yAok6fS9FROEo6pneH1z3T8ynRr2vySe4ydiEThmfw1Y7s cgEiG0d6hF2+SKXFhT6nlB+Fk5XJCw7JEbV4Jq4EfmbNRb1ObZ/zz2LDR 3N7ckSQ7nuMngowD9Wjs+MY1WcCkdWa7PM5FzfTBf66nGMyh4TRDKng/m f7VduCIYkmssF0157ydMaQBoq+zITh9c5Gz/crUAomOeDA1PcZtc/IPRB Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10238"; a="230137337" X-IronPort-AV: E=Sophos;i="5.88,318,1635231600"; d="scan'208";a="230137337" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 06:52:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,318,1635231600"; d="scan'208";a="617981478" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jan 2022 06:51:52 -0800 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 20QEpn8P004691; Wed, 26 Jan 2022 14:51:49 GMT From: Alexander Lobakin To: Borislav Petkov Cc: Alexander Lobakin , linux-hardening@vger.kernel.org, x86@kernel.org, Jesse Brandeburg , Kristen Carlson Accardi , Kees Cook , Miklos Szeredi , Ard Biesheuvel , Tony Luck , Bruce Schlobohm , Jessica Yu , kernel test robot , Miroslav Benes , Evgenii Shatokhin , Jonathan Corbet , Masahiro Yamada , Michal Marek , Nick Desaulniers , Herbert Xu , "David S. Miller" , Thomas Gleixner , Will Deacon , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Arnd Bergmann , Josh Poimboeuf , Nathan Chancellor , Masami Hiramatsu , Marios Pomonis , Sami Tolvanen , "H.J. Lu" , Nicolas Pitre , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, live-patching@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v9 05/15] x86: support ASM function sections Date: Wed, 26 Jan 2022 15:49:52 +0100 Message-Id: <20220126144952.851066-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: <20211223002209.1092165-1-alexandr.lobakin@intel.com> <20211223002209.1092165-6-alexandr.lobakin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov Date: Fri, 21 Jan 2022 16:08:17 +0100 > On Thu, Dec 23, 2021 at 01:21:59AM +0100, Alexander Lobakin wrote: > > Address places which need special care and enable > > CONFIG_ARCH_SUPPORTS_ASM_FUNCTION_SECTIONS. > > > > Notably: > > - propagate --sectname-subst to aflags in x86/boot/Makefile and > > x86/boot/compressed/Makefile as both override aflags; > > s/aflags/KBUILD_AFLAGS/ > > Let's be more precise pls. > > > - symbols starting with a dot (like ".Lbad_gs") should be handled > > manually with SYM_*_START_SECT(.Lbad_gs, bad_gs) as "two dots" > > is a special (and CPP doesn't want to concatenate two dots in > > general); > > - some symbols explicitly need to reside in one section (like > > kexec control code, hibernation page etc.); > > - macros creating aliases for functions (like __memcpy() for > > memcpy() etc.) should go after the main declaration (as > > aliases should be declared in the same section and they > > don't have SYM_PUSH_SECTION() inside); > > - things like ".org", ".align" should be manually pushed to > > the same section the next symbol goes to; > > - expand indirect_thunk and .fixup wildcards in vmlinux.lds.S > > $ git grep -E "\.fixup" arch/x86/*.S > $ > > I guess I'll continue with your new version since a bunch of stuff > has changed in arch/x86/ in the meantime so that that set would need > refreshing. Yeah, sure. .fixup usage was removed in particular. I'll queue v10 soon. > > Thx. > > -- > Regards/Gruss, > Boris. Thanks for the reviews, Al > > https://people.kernel.org/tglx/notes-about-netiquette