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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAC90C4338F for ; Tue, 17 Aug 2021 11:14:36 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A47A260F39 for ; Tue, 17 Aug 2021 11:14:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A47A260F39 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.167751.306238 (Exim 4.92) (envelope-from ) id 1mFx2z-0004Y8-Ow; Tue, 17 Aug 2021 11:14:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 167751.306238; Tue, 17 Aug 2021 11:14:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mFx2z-0004Y1-Lj; Tue, 17 Aug 2021 11:14:21 +0000 Received: by outflank-mailman (input) for mailman id 167751; Tue, 17 Aug 2021 11:14:20 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mFx2y-0004Xv-9Q for xen-devel@lists.xenproject.org; Tue, 17 Aug 2021 11:14:20 +0000 Received: from wout3-smtp.messagingengine.com (unknown [64.147.123.19]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 43cb693a-ff4c-11eb-a4a1-12813bfff9fa; Tue, 17 Aug 2021 11:14:18 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 86AC43200A24; Tue, 17 Aug 2021 07:14:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 17 Aug 2021 07:14:17 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Aug 2021 07:14:15 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 43cb693a-ff4c-11eb-a4a1-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Fh9jI5 kNCYiP/4kuz+MIdunlEx8uZjKvXfnRxZ3uVK4=; b=Ctbw7Lw5p2k/CGFI+XJtIl 7TqtPE+x7EF667uc4UU3/NCkVP8F7Vq646TP2y+pWw/5k+s3rsN3GordBEQ7bj9u TF9lxnyd0FHyuc+4xUTZAp4RTIubfGW6dMuYwkygV+FXCalWf7LVTvY90r/tl0jk mdKQkiHA5nOF6mwMgxWoblk50jK3Rk311Ir3xwhiKAKzQ8bPiWja4PEXk66Owv1d sldOTfm84BK3IzJobXUdvg/JKQGZqQZWS/Ot9QHoSodwl5ypAzOne1kyMpjtF6LI 72ijemKYWYFEAqfaoDpnjfTh6Y6oHx2bKMpFBAzatt4xiA8IdRcRtu08cA+EFMPA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrleefgdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepofgrrhgvkhcu ofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinhhvih hsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepteevffei gffhkefhgfegfeffhfegveeikeettdfhheevieehieeitddugeefteffnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehi nhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Date: Tue, 17 Aug 2021 13:14:12 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Andrew Cooper Cc: Xen-devel , Jan Beulich , Roger Pau =?utf-8?B?TW9ubsOp?= , Wei Liu Subject: Re: [PATCH] x86/cet: Fix build on newer versions of GCC Message-ID: References: <20210817105656.19683-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FSGOdMofWGZPD2al" Content-Disposition: inline In-Reply-To: <20210817105656.19683-1-andrew.cooper3@citrix.com> --FSGOdMofWGZPD2al Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Tue, 17 Aug 2021 13:14:12 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Andrew Cooper Cc: Xen-devel , Jan Beulich , Roger Pau =?utf-8?B?TW9ubsOp?= , Wei Liu Subject: Re: [PATCH] x86/cet: Fix build on newer versions of GCC On Tue, Aug 17, 2021 at 11:56:56AM +0100, Andrew Cooper wrote: > Some versions of GCC complain with: >=20 > traps.c:405:22: error: 'get_shstk_bottom' defined but not used [-Werror= =3Dunused-function] > static unsigned long get_shstk_bottom(unsigned long sp) > ^~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors >=20 > Change #ifdef to if ( IS_ENABLED(...) ) to make the sole user of > get_shstk_bottom() visible to the compiler. >=20 > Fixes: 35727551c070 ("x86/cet: Fix shskt manipulation error with BUGFRAME= _{warn,run_fn}") > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Roger Pau Monn=C3=A9 > CC: Wei Liu > CC: Marek Marczykowski-G=C3=B3recki >=20 > Not actually tested. I don't seem to have a new enough GCC to hand. I have just compile-tested it and it seems to fix the issue (indeed it failed before with CONFIG_XEN_SHSTK disabled). > Most of the delta here is indentation. This diff is more easily reviewed= with > `git show --ignore-all-space` Wouldn't this make the compiler include the code even if CONFIG_XEN_SHSTK is disabled (not a huge issue...)? Or is it smart enough to optimize it out in that case? --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab --FSGOdMofWGZPD2al Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmEbmgQACgkQ24/THMrX 1yxtjAf/UhYui49/iwiv8mpeP4KZgtwdRnjUE9Y3Wp0mjulgYn2JnqhgA6E1UhOF ciV9QCKS5GzYEYpiijO9TZzwpJCYhrpbC0/4KnMQLLLl84PxNlivGzHUdWI19DbU s9/eHONXbJTqPMKDx8miQ6wUy9Wj/80CqNGP1LlPhniQspzIpBXuuhV5/5HOourN ln+Kz4Tq2yjoLa2gz3p7QUE3lh44tMj2SK7/f2jnN9Z6+sLviR9r4xcd3SjTRfx9 lwrZzDShZ2B+yFJK+moIRDgiYH/Lm+tbx0nyf11aZRRCqTbiIykwa59eVEcTEK7D QfWfxgpFVpPtDhdPJ/Gw2Ohr3GUi9w== =F4Kn -----END PGP SIGNATURE----- --FSGOdMofWGZPD2al--