Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1404446pxb; Fri, 21 Jan 2022 17:51:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUJ7YtVQQYz1zGfxkpWlvPTDca+um77ju096h0AsEXYXVtz/dx+ZeLTySt+Hcm6Ae9LD1p X-Received: by 2002:a17:90a:3f09:: with SMTP id l9mr3320239pjc.38.1642816294141; Fri, 21 Jan 2022 17:51:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642816294; cv=none; d=google.com; s=arc-20160816; b=YmfE5zDCqZluh4xE78c7m88in/tr3Rye8WZ/YLy7T97a4auknwzRXow00Y52VEgBCV +e41dgO3R+GFVDnzW2t+hxCrcaFKoppEBjvGpSAf0AYWYTEY4/CeGXY9Jh5e0R94TzX8 ps3cm+780F4GETl4KBP18U3hsG0QGmkTfu5qNe+uIG/ekq/+QAgw07mLpSA9S76Q2CZm o5JX/BLGSIn2vCWFf0t9KsKMUs1Rdtl4HCYabJ9Co+Oiw0XjTlUEmizpXzj9qO9fIPmG cAFgdgvq37etXxdUisDMAFifakEJoR9y6D2slulOVPuxwV3Minzga3ScZldR3GzcfZC5 X+Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GFj7pSt3cRzl5y+b79elj5aGBrpZoaFIs8Y+/JGYyW8=; b=cxdAJV/BdZ2tct7JDNqdS+FpdDYQipcLN+E0Y/b4gQLPWG/YEh2rFpnHot7llhzGdj M+2Hjj6RUuJUYwI1Uzdx0m77ppa2YX7ZfqEt5L8T720mqDhd+Wi3xM2kjm3SSbvNahKp vsJvuBuJU+9XqGZXUALokMLGsI0R7hgQi3j5fWZVwHgVN1uVlV5LI+h3MWZZFWDIVhve nmYnxA9pmJe0bk6tTP+zAmiCzG6WF0d7wyj5RIVdcOO92KIGXDJsJuIfqFAe3iQm2YTf cMwNqdDRiaeuQGf/IEbFcX3VlSFq6+jKLrU0tRbvCfsKtesjI9XsicPpsmOJJfWbff+c zsIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=UjAJO0bd; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e19si8094025pgv.33.2022.01.21.17.51.09; Fri, 21 Jan 2022 17:51:34 -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=@alien8.de header.s=dkim header.b=UjAJO0bd; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381472AbiAUPIh (ORCPT + 99 others); Fri, 21 Jan 2022 10:08:37 -0500 Received: from mail.skyhub.de ([5.9.137.197]:44830 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238192AbiAUPIg (ORCPT ); Fri, 21 Jan 2022 10:08:36 -0500 Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 3496F1EC054E; Fri, 21 Jan 2022 16:08:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1642777710; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=GFj7pSt3cRzl5y+b79elj5aGBrpZoaFIs8Y+/JGYyW8=; b=UjAJO0bd7nBpuV/579xwg7V3vVJbyhwJU+5HtPPNxlwfYiu+yMaMYuLdmzjEwnPA0X1F/r PJvRuXevaRA9P97hZRg7ydVqDq+rbps3/xYbxrOUfYcPEs/QZUR5vRAYz55VayS5DqPn4X n3khUusN+iYIeWihx6H1s7Rw1a/2mig= Date: Fri, 21 Jan 2022 16:08:17 +0100 From: Borislav Petkov To: Alexander Lobakin Cc: 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 Message-ID: References: <20211223002209.1092165-1-alexandr.lobakin@intel.com> <20211223002209.1092165-6-alexandr.lobakin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211223002209.1092165-6-alexandr.lobakin@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette