Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp905351rdb; Thu, 15 Feb 2024 21:43:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUjjDDiRRHjHZ4EKxU8egwbIrouH3xhsIk3KTYRMt8TD7mwFJdMqIE4bQa3SaqaFeTJDnWnQLlEpNSSH2Nr4mBSVVqxxuGkhAG4pHayGg== X-Google-Smtp-Source: AGHT+IFPhKZTZZ5u497EpnrLHvPgyMfFFxm7lkHHfCfg9eUvOn4zeepmZiOETaO/WESToOgay3Rr X-Received: by 2002:a9d:7b47:0:b0:6e4:2f9a:76a9 with SMTP id f7-20020a9d7b47000000b006e42f9a76a9mr3556058oto.24.1708062211780; Thu, 15 Feb 2024 21:43:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708062211; cv=pass; d=google.com; s=arc-20160816; b=d+D9ihbT5SVDws2Imk+Ey11m3AY/CYnIy5Ei0l/MSyCBmfnY5gLIndnjDlFMJTi1Ew W1oH2UcA+4MMidPx/xd1y2yYOK9EG8x3bKB84OFenlmKbfgWPto7iuMj8E3mXnjHFyC4 W9WCpw7vUyuP9Hm29ayMbPs9wC+GKQgmxKJLaBrSQWFY47RzT9S1Le8bR83i4vFKX+Gi 6vtwsCOciPUm3CtENrMuvLHdVW/03U9ZpTLgN23c0X59QZNz0PAuS9r8l/C1laGg3ajP DfdmtJ1NSmYNHUulm2e8RK1nS21yaL4oT8Ps5p7c6B2ZkgutAkBJts07nCFn83avucfT YyJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DFqbUft0KSwqWlS3WQYDU3Xc9oCWTPwHQxn0p6awXIg=; fh=ajoPq2U344KkYDj5dCr1xEWE1Eq6sx2t8nae3U4BLyU=; b=D31ZWIE+W8LVu4wd4RSX0DO14EdIecgX94gGAhQKobY0YOaj0bFJ1PRsD4kEcc++27 TYHA2BpX1IktZk8jCgEJFZ0Nc+lwhUEK9w2QQGp/2ryMmNcVZ0BsO533txGPWFxeUl07 xfI4RNPKiiprCeKXk1h34OhzwCfUTxcVWXp6oDcd/nSsajTHfQq/ZPM5I2xI3tt9qr7P BgDEw2e2EV0hgRbwFKRK1WreW9wp4cvFO4pAwYh8xsPeknv0BVpWiwX6oSWaZdqrGjIZ UGH49Ivr/uLryww+NeU0SJjzkE1N3cG66lgR379msrGD4sbQH1xjFnthDT2p1Psp7OPp GwkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VVw0UCQo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68077-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u137-20020a63798f000000b005dc82a6d761si2369345pgc.123.2024.02.15.21.43.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 21:43:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VVw0UCQo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68077-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3F502B24080 for ; Fri, 16 Feb 2024 05:42:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4938134B2; Fri, 16 Feb 2024 05:42:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VVw0UCQo" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D8A6F12E63; Fri, 16 Feb 2024 05:42:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708062157; cv=none; b=ZzDD1iW+s3ktkdWC/fos0Soj4YwqPWoaSkbSiEfcPjif+c3lKxYLd91rkAMvxg/IkTEd1AEmNY0qATtYs3WEH94DakFludnf2GPYXW4yutT3BTzuKxhOGMv00JulozO0HxaURk1X/VtbpnEvM0CbZiwWZ8hljv0dq1yREs1mJQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708062157; c=relaxed/simple; bh=cZ33RbXWRl7oeyYH20+M7tDKsle252OAe/cyfg297aE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RgmQMMgmDEVXW1PxHRYpTdD3NSLQ472zuvz5S11/bUtZ8iGkEwXjOotzooPBsGkjoot7NuMkqjVKBECSvPQrY4+w1C925Vy+HlSZFe3fF3OWct9qLRbiwR9dx+8f3+DJsqZaPhMsFsExE1QXfjBa1smmVvdBdp9SwdoNMj9M2L8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VVw0UCQo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60732C433F1; Fri, 16 Feb 2024 05:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708062157; bh=cZ33RbXWRl7oeyYH20+M7tDKsle252OAe/cyfg297aE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VVw0UCQoAkNFSoG6Wg5/BqtvlTSQRfaG+ZkZ4Gcbj0+b5x2KnR74ib/lPnfYYfNQv 9ofAWa1Fg0WfQLtzVibadFijfwJDV8bnCxK9e4QkAWHktCaixQPt2bKwFwb3KPn5iT Cnj+7+9uphoOR4lAU4FyOBd+E20pbvWA1tOhhKXzfpvgNQ0NsNlNx5Og25M6fLoIoq zouKKe7XCB6EOT6mdzOBvU227WB/qoJzZroGpgk+7RNGWi8SHCUfUwpwYQLtxX6fOm 2dqJdQyP3qNRJbCK/nZj0S+JZ0eiCoryqYVqFvXBKYSZUwRgKAuDVBciNGgdpmrVBL Rr1NpffmUgHOg== Date: Thu, 15 Feb 2024 21:42:35 -0800 From: Josh Poimboeuf To: Borislav Petkov Cc: Nathan Chancellor , linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, x86@kernel.org Subject: Re: [tip: x86/bugs] x86/retpoline: Ensure default return thunk isn't used at runtime Message-ID: <20240216054235.ecpwuni2f3yphhuc@treble> References: <20231010171020.462211-4-david.kaplan@amd.com> <170774721951.398.8999401565129728535.tip-bot2@tip-bot2> <20240215032049.GA3944823@dev-arch.thelio-3990X> <20240215155349.GBZc4zjaHn8hj6xOq3@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240215155349.GBZc4zjaHn8hj6xOq3@fat_crate.local> On Thu, Feb 15, 2024 at 04:53:49PM +0100, Borislav Petkov wrote: > I'd tend to look in Josh's direction as to say what would be the right > thing to do here and more specifically, where? > > We need to run objtool on the vdso objects which are *kernel* code. > I.e., that initcall thing. The vdso-image-64.c gets generated by vdso2c > and lands in arch/x86/entry/vdso/vdso-image-64.c, that's why objtool > hasn't seen it yet. > > I mean, it is one initcall in the vdso, probably not that important and > if its return hasn't been patched, it won't be the end of the world but > still... > > In any case, the patch works as advertized! :-) Right, the good news is this isn't a regression and the warning is working as designed. This should tell the build to invoke objtool on that file: diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index b1b8dd1608f7..92d67379f570 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -36,6 +36,7 @@ UBSAN_SANITIZE_vma.o := y KCSAN_SANITIZE_vma.o := y OBJECT_FILES_NON_STANDARD_vma.o := n OBJECT_FILES_NON_STANDARD_extable.o := n +OBJECT_FILES_NON_STANDARD_vdso-image-64.o := n # vDSO images to build vdso_img-$(VDSO64-y) += 64