From patchwork Mon Feb 26 09:40:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Qi X-Patchwork-Id: 206537 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1972396dyb; Mon, 26 Feb 2024 02:05:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU0pnh+Em4PO5W4s5nAmdvVf0W8m3lxk6J15RvS8MfqQnIz2witVeVPjjO18LYvZBDeaqo0k+06BMH+CPBpbTZHvsT8cQ== X-Google-Smtp-Source: AGHT+IEhDGICAUv5vh5VGzfMIl6QtefLe77Ez+xHCjLaCyeNlUHpzH2hjz9YQdqTF7rIXZjNqemE X-Received: by 2002:a05:6a20:e607:b0:1a0:6856:d1a9 with SMTP id my7-20020a056a20e60700b001a06856d1a9mr5355668pzb.10.1708941911330; Mon, 26 Feb 2024 02:05:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708941911; cv=pass; d=google.com; s=arc-20160816; b=DcQzhjr0G4nfzq9i64IrLuH8uVB2dohIQGdXRHKWzM4CkRxeCabxC+Oh/PD1boQz8m BFSL2nSWp3sJ8SnmY5PKlBnlW4RrgaL8lfxeK+Vm8jZDbhkczZgQ0bO6SKCeGZyLxQ8U DkL6la9NREbKId1DBnkm2BWddzMW1iVI9Eae4Wef0okZoCFFNeC46yU3/KU12bG9PuMv igqVXTpXso4K8SvDu1q88YWQHMqhRNs8JsKLA9bAe2M7vFcJiFPcmKtaiiaGGJhSRtRo og0b9xBWU18yHPQb+N7p4SVI6U7wuie0o99bzDePmBe5u2+hZYK/exCWp6ecHrl4wzW6 XV9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=1YFU6WdZM9SQFy2Ur5i4rzS9kbd1FF1r6Cyc0pRvjOk=; fh=Lhesw7vOOGIj6ubZWGeM4XBth76OqbR/gyaWvCZNroM=; b=PztgOy4LAVB6by3nTYjNaKT79S+O5yMb1PaFcOC/67mQZDcflWaINzV13N9w+YiGZc DZMS+yXMAvZTR0U7qo90Mf4dgJmTJhn3TWCZd9rMJJzkLA1sgG71RWdZxLnF69AEC6xd +afHArT9KPX1rh8dHeEAhAQYNEBJjziABf6v1hpLnUgLHuV8/+oRLkZsZGQ9uaZIFOLp CVpPLxl9ysSU7dRZqJ202N25RXFB0FG85RAFVA9elJtbmMieoiXQMHxDrvbIKblC4m/r eupGOhlMR1ywppTHxnz8dOwU0yaldqxG5SANWU1uP4wNNO4FC1J2rJFxs/vGPipPVJlS saDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=dgLqfTQl; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-81074-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81074-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d1-20020a17090a6f0100b0029927708227si5307097pjk.167.2024.02.26.02.05.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 02:05:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81074-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=dgLqfTQl; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-81074-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81074-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A3FF3283E3A for ; Mon, 26 Feb 2024 10:04:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B67D5FBA0; Mon, 26 Feb 2024 09:41:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="dgLqfTQl" Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5F885F879 for ; Mon, 26 Feb 2024 09:41:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708940481; cv=none; b=kKOAa7TZHsCpK08/G5oN6HXLF+RLrm9w8N6+zJ0g/48nooLVmH2Od/8zcOprEAd+WRF7ON3Uqg1XV0/S3mo7RSbD9s/xjMrHQ+XgfVIi3svJvsVxPHa8qkq2e4wGU4KKtxEQS/rXZ/WPPFsvfeokTYSuG467vSkzxKXUgCP74CM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708940481; c=relaxed/simple; bh=vTbbnU0AQBSusnj9unjWrvIi8LxU8OXeteKwp4FBQTs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VjIUoVZjunQ9qpqScQwwRHFWaosO5wUGjzqWizPGvQhuLFhb69p8CU8uMClVinurlug7FqG03mHCJIghCnuzOYbUP/uu+cSg8KNlLV+N7APA5rMthceJp0JcQpkmlDDg0ruQgBmexq/WxIi18ktP/RYAGZZ5BdmRyM+7BXY1e+M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=dgLqfTQl; arc=none smtp.client-ip=209.85.210.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Received: by mail-pf1-f194.google.com with SMTP id d2e1a72fcca58-6e47a104c2eso1431546b3a.2 for ; Mon, 26 Feb 2024 01:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1708940478; x=1709545278; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1YFU6WdZM9SQFy2Ur5i4rzS9kbd1FF1r6Cyc0pRvjOk=; b=dgLqfTQlM2kwZWexxnIzIltB0VVxRl+VVR2RCVA+ZbBzoS4bqmncoJ0PDMbJee7CsD OPLFNNZ51dAGOog5kh0qwqjhESX9mD2jKCVcrUqNUm4lysYyKr6VqzXUR9iZLiWlokFn 3oWyp3ovwPVdSQimK/dn0W5LJBp3dKQHYN33psyOT0oj2DvE8z4s7cpuY91FfAc1vZmX 0MOsn4q+W9EySwmJUiXshWfaYeqlNLsz3flNx3sPEVwh/VDqYvTMi/EeunafOIlv/jRH GLSb1QyxmJFKFuyVdIAR+MeVW9MzedadE9kSuZbw+1no9ktsfoECem2Qkiba3wBOSs4l gCpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708940478; x=1709545278; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1YFU6WdZM9SQFy2Ur5i4rzS9kbd1FF1r6Cyc0pRvjOk=; b=fMaSya9AnudYcCqPQXr4TGHctms3+cbRLlyH9cWY3hyh0iU5OfiCB18ZK5a8viDc46 lYFpAz20JouKZGkbUoElujgWgoK3PBbQ37runPkvy9cYx4raEruMC0RGApDsx+ci/Rkd 0EFn7WlYP++b7th6C7z16mA3aIsYVbc0RR8sf67GcL0Zhe8TgYCzXspSdyAfCCeF9ROT 1FijxhwrR6YvhVDLJNKdlBrOwzimT9nqIxLcifcKVgB/kMAeKOtW4AUqaWS7niWYZrmv QOubc7QrL+KHnbbodK5IUOfZclTAHvkscOn7LOCdPS+NjAY+amEgIwKfhFp3KXUYNWy4 hPbQ== X-Forwarded-Encrypted: i=1; AJvYcCUIeTqQq5400LuX64jwuTDA+NwjIPi3ui1W6kCa7Xfol/Oj6adia+EJkJqoHYANXu7WcesXrFhAyFiBWpHLhFTs9UyzfQjVNedmBXDw X-Gm-Message-State: AOJu0YxP/RloUVqxXDImdTnr+X0aW9wx4YL1+YLhNaaFLLF+vchpxQ8f T6xndO6XEIFlnael12y0z6+gNKL6B67ItEcLaicIzg07rrGBAXEtpGyFns1YsJM= X-Received: by 2002:a05:6a00:4e5a:b0:6e4:df65:8335 with SMTP id gu26-20020a056a004e5a00b006e4df658335mr5107611pfb.16.1708940478025; Mon, 26 Feb 2024 01:41:18 -0800 (PST) Received: from C02CV19DML87.bytedance.net ([203.208.189.6]) by smtp.gmail.com with ESMTPSA id ls22-20020a056a00741600b006e533caee00sm949194pfb.155.2024.02.26.01.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 01:41:17 -0800 (PST) From: "$(name)" X-Google-Original-From: "$(name)" <$(mail address)> To: bp@alien8.de, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, jpoimboe@redhat.com, peterz@infradead.org, mbenes@suse.cz, gregkh@linuxfoundation.org, stable@vger.kernel.org, alexandre.chartre@oracle.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, qirui.001@bytedance.com Subject: [PATCH 1/3] objtool: is_fentry_call() crashes if call has no destination Date: Mon, 26 Feb 2024 17:40:59 +0800 Message-Id: <20240226094101.95544-2-qirui.001@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240226094101.95544-1-qirui.001@bytedance.com> References: <20240226094101.95544-1-qirui.001@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791955473533173279 X-GMAIL-MSGID: 1791955473533173279 From: Alexandre Chartre commit 87cf61fe848ca8ddf091548671e168f52e8a718e upstream. Fix is_fentry_call() so that it works if a call has no destination set (call_dest). This needs to be done in order to support intra- function calls. Signed-off-by: Alexandre Chartre Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Miroslav Benes Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/20200414103618.12657-2-alexandre.chartre@oracle.com --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index dfd67243faac..71a24fd46dbd 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -1367,7 +1367,7 @@ static int decode_sections(struct objtool_file *file) static bool is_fentry_call(struct instruction *insn) { - if (insn->type == INSN_CALL && + if (insn->type == INSN_CALL && insn->call_dest && insn->call_dest->type == STT_NOTYPE && !strcmp(insn->call_dest->name, "__fentry__")) return true; From patchwork Mon Feb 26 09:41:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Qi X-Patchwork-Id: 206538 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1972679dyb; Mon, 26 Feb 2024 02:05:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV3XPB+l3KskvnAVA8yUvaGGFV5SkqJOtQewGhxh4Bl1j5V9hW4bat1flU32ec41/+///SDjnP8HGrXV3HP6lnw4RWzFQ== X-Google-Smtp-Source: AGHT+IFXnrcEZKoGeaLjerOCUUQbmoQG3U5x+5g8AWFIF2o8ZUyhSXNMGXP8XFqbE5QKJgaIiMdG X-Received: by 2002:a05:622a:5204:b0:42e:7f99:414f with SMTP id dq4-20020a05622a520400b0042e7f99414fmr3097269qtb.9.1708941946925; Mon, 26 Feb 2024 02:05:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708941946; cv=pass; d=google.com; s=arc-20160816; b=JPXDyW4nFIJVgLpcQcQubU1Lqvke/2sf9h6+egwxGXzm91+e/nzXRH6UmN36sGY1uW Viw1zx+22OIL8FVDE96rShudjoOgb/XllnUbeAS52fcbmJ54JQe5fyfJQymFJ56SRWPn iBh7SAAtceypWxIGQP+vDNjPnYi436WgeUEGYiUGvIEVPPj540zBd3kD+j2b14G26Vp7 3UcUs7dScg2o/bGgCqUIm0cVyRxzWk6d0ElUUcDovhDsWG8CtBFCT0QKi7gulCpjH7I/ TFpR2KKMp/KIBf1SRuOrv/i5FSXm7sfYSWeymoznJpwD5Jgea4cdAjl21ueyA4ME0QML W5+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4Xvb2DA8xzihP7Mzi/v0EMpx+00b5U5crlo4mSn4zeU=; fh=BZjuCDdBF/v8FuZ1twVd0y50WMscdb2t7Z6rc9ZDDVI=; b=J4P3cxaYwbjRDypgkjqDJ16IYhDEWaV6ivbetbndHmTMul5MiiL4H2rWUX/FlGPBzn 4YK3y6M3eRPsKSCFlKIs/pXAS2wix5W8uEGHVJT05y2cfboIp93baYmJYKo3iP7PtZVM rwhhI3zcX33lydBNvla9jtZZqgLhci9DLhd5J4UN92H2yHsmTOWhOO9qaEQBk7O4LgX+ 0KJhi/s21wbBLtkz6/HvsdVujbEtmhkKXKcvIc/Sp06yqvgqmDO4JLvg4xzFAMpunJnl gUOHvEabzCLKuxCm92iekTLSktX9GvT9sIU8ubrKgN6vpq5HDEoOvmRpDo+DW0pQ0Luu IqhQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b="LqzbOPD/"; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-81075-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81075-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id df14-20020a05622a0ece00b0042e72301ac7si4764311qtb.612.2024.02.26.02.05.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 02:05:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81075-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b="LqzbOPD/"; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-81075-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81075-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 390B91C23FEF for ; Mon, 26 Feb 2024 10:05:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48C625FDD7; Mon, 26 Feb 2024 09:41:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="LqzbOPD/" Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E7565FBA8 for ; Mon, 26 Feb 2024 09:41:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708940486; cv=none; b=adRiPtyPa4AloKPyMsmDKhjqWpmc/Bnil3TYkeWUXJnwnf0EaQgxZQ8OoWjNwBiwe+Iaw4JgMhkGkEJppsiG1thFLmfdfBAEUrECoU18yytFfdeUkk+rg0lIl3HjPCHDRxSKe6yY+FtBZU9IngX2Gh0RFcC+NP8JuMUWkep1FoQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708940486; c=relaxed/simple; bh=abhzLrMcAo73itQJFRf9PngJ2NfPzbHIHmMJXMFZsec=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pEy71go7Rq5y74AX7i35fQU+GmztIdTos+BLq3cxHwmpVSUpIRAbs7Lj+0HIIsHSoar/pwYfbk+CecyPMBy6y8bB4tT1GB1MVETyoLljhAaOvO0V76AHg30nIO9UdDGOHLgOpzdxuhEdHSmujW57Lumcegj+q5IaR3HfaMBZPgI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=LqzbOPD/; arc=none smtp.client-ip=209.85.215.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Received: by mail-pg1-f193.google.com with SMTP id 41be03b00d2f7-5d42e7ab8a9so1816667a12.3 for ; Mon, 26 Feb 2024 01:41:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1708940483; x=1709545283; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4Xvb2DA8xzihP7Mzi/v0EMpx+00b5U5crlo4mSn4zeU=; b=LqzbOPD/geiXW9SKp5UrBReGwTCs2wsrR1ZRwlWWtbeW+GNwBUDoVl3TVmP1Vx//YO b0imZLZHTKDL67tWI069AiCNkvJY4GEl/ZOAhf+QOCkeLE4SMltVBcM/B+sGfNsZdgb5 IwTfp7SJft33FTLm4LVVZ28UN+hXf8JgajPNuRJ6daHNyEcrjVN4KmMf74VMbGVhCUDg fgFrdPJuyOvU6jaRgzsx20ws6NsjxtEJlFz+W3Q2eFQnPVXv+sVSEol5EF2tcjXjoo1k Ld/Mxh14DBL+AwADNCX/8hsmlD+yhbH186T7xdducMQaXyKay2T8Na+2cMO4mERbxLq5 ELfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708940483; x=1709545283; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4Xvb2DA8xzihP7Mzi/v0EMpx+00b5U5crlo4mSn4zeU=; b=cOHBPiWSxmZy4YaN41XThmY5cyieyBj0ZBJLIY8vQht2Yx4IKzHShCYkQq0dukdiRe +8u9eZmn2kw2JRyTkuf+jk9s8nNx4542gO7IwT+urAK0JgNynekqPU8Q8Q/7ev0JV8bD j7P6SVxQHy2IDDPX5Y+jbWkV8VmdoKRWZPrPibvm+GcgJXihOhIZm26CbpEJCWBF2tan 9m+F/JwvBcEhXPSxHJ67I8HZSw3ZPg1KDdt04r/RDVookElTnD8NPP+VAdhjf2UY7/Vx BZw4H9hsFaCwUmsLhLDOUtvIKe8co4ymQJV3ciDowUBYrbAa0aP8gzrBjxL/rxlDxo2F 0U5w== X-Forwarded-Encrypted: i=1; AJvYcCWSpmrsjyziehBcbN5E5LLUmZVYoBrSzPnRu051E6GAMusgNBLcbHgittJuuJJB4ikzsK6H3W3iIsSb/IVMskkR+C8zvo6PJ+YWef6X X-Gm-Message-State: AOJu0Yz+gcp6cKMPEwI92GgxL0ZLkxcURNvM67x8Nt6KnLru7FBhL6AC EIix5InUHGhtSdcF94nIr96DxCZV+r4q1I1jKWEUt15MGyLo21/VdL0phHlCASk= X-Received: by 2002:a05:6a21:6816:b0:1a1:55e:20ed with SMTP id wr22-20020a056a21681600b001a1055e20edmr413289pzb.24.1708940483445; Mon, 26 Feb 2024 01:41:23 -0800 (PST) Received: from C02CV19DML87.bytedance.net ([203.208.189.6]) by smtp.gmail.com with ESMTPSA id ls22-20020a056a00741600b006e533caee00sm949194pfb.155.2024.02.26.01.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 01:41:23 -0800 (PST) From: "$(name)" X-Google-Original-From: "$(name)" <$(mail address)> To: bp@alien8.de, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, jpoimboe@redhat.com, peterz@infradead.org, mbenes@suse.cz, gregkh@linuxfoundation.org, stable@vger.kernel.org, alexandre.chartre@oracle.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, qirui.001@bytedance.com Subject: [PATCH 2/3] objtool: Add support for intra-function calls Date: Mon, 26 Feb 2024 17:41:00 +0800 Message-Id: <20240226094101.95544-3-qirui.001@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240226094101.95544-1-qirui.001@bytedance.com> References: <20240226094101.95544-1-qirui.001@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791955510946047129 X-GMAIL-MSGID: 1791955510946047129 From: Alexandre Chartre commit 8aa8eb2a8f5b3305a95f39957dd2b715fa668e21 upstream. Change objtool to support intra-function calls. On x86, an intra-function call is represented in objtool as a push onto the stack (of the return address), and a jump to the destination address. That way the stack information is correctly updated and the call flow is still accurate. Signed-off-by: Alexandre Chartre Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Miroslav Benes Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/20200414103618.12657-4-alexandre.chartre@oracle.com Signed-off-by: Rui Qi --- include/linux/frame.h | 11 ++++ .../Documentation/stack-validation.txt | 8 +++ tools/objtool/arch/x86/decode.c | 6 ++ tools/objtool/check.c | 62 +++++++++++++++++-- 4 files changed, 83 insertions(+), 4 deletions(-) diff --git a/include/linux/frame.h b/include/linux/frame.h index 02d3ca2d9598..303cda600e56 100644 --- a/include/linux/frame.h +++ b/include/linux/frame.h @@ -15,9 +15,20 @@ static void __used __section(.discard.func_stack_frame_non_standard) \ *__func_stack_frame_non_standard_##func = func +/* + * This macro indicates that the following intra-function call is valid. + * Any non-annotated intra-function call will cause objtool to issue a warning. + */ +#define ANNOTATE_INTRA_FUNCTION_CALL \ + 999: \ + .pushsection .discard.intra_function_calls; \ + .long 999b; \ + .popsection; + #else /* !CONFIG_STACK_VALIDATION */ #define STACK_FRAME_NON_STANDARD(func) +#define ANNOTATE_INTRA_FUNCTION_CALL #endif /* CONFIG_STACK_VALIDATION */ diff --git a/tools/objtool/Documentation/stack-validation.txt b/tools/objtool/Documentation/stack-validation.txt index de094670050b..ee26bb382b70 100644 --- a/tools/objtool/Documentation/stack-validation.txt +++ b/tools/objtool/Documentation/stack-validation.txt @@ -290,6 +290,14 @@ they mean, and suggestions for how to fix them. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646 +11. file.o: warning: unannotated intra-function call + + This warning means that a direct call is done to a destination which + is not at the beginning of a function. If this is a legit call, you + can remove this warning by putting the ANNOTATE_INTRA_FUNCTION_CALL + directive right before the call. + + If the error doesn't seem to make sense, it could be a bug in objtool. Feel free to ask the objtool maintainer for help. diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c index a62e032863a8..c3ff62c085c8 100644 --- a/tools/objtool/arch/x86/decode.c +++ b/tools/objtool/arch/x86/decode.c @@ -437,6 +437,12 @@ int arch_decode_instruction(struct elf *elf, struct section *sec, case 0xe8: *type = INSN_CALL; + /* + * For the impact on the stack, a CALL behaves like + * a PUSH of an immediate value (the return address). + */ + op->src.type = OP_SRC_CONST; + op->dest.type = OP_DEST_PUSH; break; case 0xfc: diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 71a24fd46dbd..0fa414869f45 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -645,6 +645,7 @@ static int add_jump_destinations(struct objtool_file *file) return 0; } + /* * Find the destination instructions for all calls. */ @@ -666,10 +667,7 @@ static int add_call_destinations(struct objtool_file *file) dest_off); if (!insn->call_dest && !insn->ignore) { - WARN_FUNC("unsupported intra-function call", - insn->sec, insn->offset); - if (retpoline) - WARN("If this is a retpoline, please patch it in with alternatives and annotate it with ANNOTATE_NOSPEC_ALTERNATIVE."); + WARN_FUNC("unannotated intra-function call", insn->sec, insn->offset); return -1; } @@ -1291,6 +1289,58 @@ static int read_retpoline_hints(struct objtool_file *file) return 0; } + +static int read_intra_function_calls(struct objtool_file *file) +{ + struct instruction *insn; + struct section *sec; + struct rela *rela; + + sec = find_section_by_name(file->elf, ".rela.discard.intra_function_calls"); + if (!sec) + return 0; + + list_for_each_entry(rela, &sec->rela_list, list) { + unsigned long dest_off; + + if (rela->sym->type != STT_SECTION) { + WARN("unexpected relocation symbol type in %s", + sec->name); + return -1; + } + + insn = find_insn(file, rela->sym->sec, rela->addend); + if (!insn) { + WARN("bad .discard.intra_function_call entry"); + return -1; + } + + if (insn->type != INSN_CALL) { + WARN_FUNC("intra_function_call not a direct call", + insn->sec, insn->offset); + return -1; + } + + /* + * Treat intra-function CALLs as JMPs, but with a stack_op. + * See add_call_destinations(), which strips stack_ops from + * normal CALLs. + */ + insn->type = INSN_JUMP_UNCONDITIONAL; + + dest_off = insn->offset + insn->len + insn->immediate; + insn->jump_dest = find_insn(file, insn->sec, dest_off); + if (!insn->jump_dest) { + WARN_FUNC("can't find call dest at %s+0x%lx", + insn->sec, insn->offset, + insn->sec->name, dest_off); + return -1; + } + } + + return 0; +} + static void mark_rodata(struct objtool_file *file) { struct section *sec; @@ -1346,6 +1396,10 @@ static int decode_sections(struct objtool_file *file) if (ret) return ret; + ret = read_intra_function_calls(file); + if (ret) + return ret; + ret = add_call_destinations(file); if (ret) return ret; From patchwork Mon Feb 26 09:41:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Qi X-Patchwork-Id: 206539 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1972959dyb; Mon, 26 Feb 2024 02:06:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXCZh0vW4UiEDIfC+eLyC0cbMV28mAkOiXNzlU2Np/vJxSHnoCVDTEHynkyiMl5Mt2GkoLQEEC9ou29zd2v13D5NxAPCQ== X-Google-Smtp-Source: AGHT+IHAg1X/mSQ+mRuU9Qju6ZgJo4u+ocv7v9n0P2HDoolDeFXZqflRcbDaQKu9EG0MqotZ3C0m X-Received: by 2002:a17:903:22c7:b0:1dc:78ce:cf8a with SMTP id y7-20020a17090322c700b001dc78cecf8amr9572184plg.17.1708941985744; Mon, 26 Feb 2024 02:06:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708941985; cv=pass; d=google.com; s=arc-20160816; b=qGkX8e0QKduqfmKWAokRrFxOt8YKmfuiS2KZbiAyDJWF5OjL6K0mGZpgz2Pwh718IZ Pd/avnis7M4Yq2aJk6Mf1VXcZPZGmttlyyNC48y6VpdkWIaUx/V/yxXbHHiTkjl305nl JYBp9JnVQuJew5qhm84TWLZLYWM0bB4KvlDWqosFsnxknGbD4VzILFz0yUkm5lsf9y52 i3Dw1P7E6iADNOYLpR/QOqHbUw+m/ey7CRnQms89Qdxu1TiqFWbNwk6gIm8yq4yqoKNb vnYk5hJV0FKxMrvXLnlxXX1i+HqviXUbNe5fBYmpIEsW3I+VFQ86oZ6ON6Pzd/vZkSGk pqcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lYE4VOh0Esz26qF5nAL3o0bNyOzXw7ZQ+0pcNpsCkTI=; fh=SQhIT+9mwpXHv90mm/NaFksDunXFgCv8Qe74OoGowyk=; b=xXciTQJGqxvjyFgI3S7RBnVGDCpAr1gkudM4UYoYaEiIClgy8no5FDKeTQNLUDKa4V UjPwAd3PtTDI8FOPXAoyLo7gtLKhO0C2GuVE9aV9wiVsekUShRsIHubUbdIVRhtMO6e4 SJVC1ZLZWn82ynJFEKUxvFRoR9bWVnIwc+aXcOAxTCt9tPbbg9J1Z4iL0lkeuVRWr17b 0cmxYWPDU0xfYLy+gPT5VBm3rQst2ynb80E4xbCCC+LTY3yPoTdIHv6XTbyDd9PX02al ZXhwkNCkcIliU+tt373rCpu1d4OceS3GYdP0l2nlQT2RxY/mS8pWIJ1s4MuwZLzI+C+Y dqjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=CGosVka7; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-81077-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81077-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f9-20020a170902ce8900b001d9f75f7632si3416315plg.344.2024.02.26.02.06.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 02:06:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81077-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=CGosVka7; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-81077-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81077-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C731828869D for ; Mon, 26 Feb 2024 10:05:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9939F5FEEF; Mon, 26 Feb 2024 09:41:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="CGosVka7" Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71E155FDC8 for ; Mon, 26 Feb 2024 09:41:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708940490; cv=none; b=bLOO2PtJtFkN3qe2swsR6yZLyHoMGzVHsApTPSHnuLFr8/UxAmTSnd0jdqYe8WSFZ6E4XDh69Nx+ia5bmUHoxUGwAAvYKibQRqWgDpr41/CdJea4zVojpsSD9J2OCOyblXlQhKWoKQaJYBVALMPxDQX6Ug9DQb9uZmzBrqtq5mk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708940490; c=relaxed/simple; bh=GVSij7Ng2ZnL6ItLte5S5qesoG2Gu5vTbGRvnRyWD94=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HhJWY8msBhlOezAdjuFStxL8D9qfdR+l/d9NfPNBXZO6iN2P8dhlJts76x9K8Iv/R6WmgMyr+oKOE6tWW3h0GLdoo8R8Dl3ZaC81Lm/p9bpa9HjH8yKzh707W5lgpK8Eeq8z5iU6XVRieQ2DL815pXVW+I3nhE8rZ9m5juKpY7Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=CGosVka7; arc=none smtp.client-ip=209.85.210.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6e3ffafa708so2911769b3a.1 for ; Mon, 26 Feb 2024 01:41:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1708940489; x=1709545289; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lYE4VOh0Esz26qF5nAL3o0bNyOzXw7ZQ+0pcNpsCkTI=; b=CGosVka7qjKnY0yXUtD2+62cpEv1B8Qhi+1DxsL2sdF7UyOq45eSF3NGmH12bPKjmI 41tjaSsU4mkqSagFIk63eyKyMxNYCe0CHq644jSJgVNddKoqyRXooeJ0/TvJCY3fFIMh aaoeZXQaGO9mDUUbGBpppzK5kvPPymtCZbG8smCpwCcOaFtQt+/+MxGl0Tf0WYKjtafo AMVtWfJULiR5JfTWhbrjXYN29/aCRfZycpfXmXDyO209XS+5jAIHwiB0YDnBmEhKAjIb ZbAgugfeZHio/fm/SED3g7gXzspnXhwfnRRp7YUB8gM+9gt9wYfbVvj6OBcxFNjr3nuL FyhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708940489; x=1709545289; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lYE4VOh0Esz26qF5nAL3o0bNyOzXw7ZQ+0pcNpsCkTI=; b=bFMk6tmVLIubQzhd0VlBSp/rjpWQbYicXA0Z8guYa8DR86IY94sm3XAWKXp4JWebFt IJngzkElCd9nbQUhiZ3que0M1I0SPwXuR5qFHaUwxmRwHxqj416o4r59QDet3YR8fTAw 0AQA+GdKeFN7NOdqzyy6BklYoO6MDyPgbGt8vfiykfJRFK5+RnYvjoP2vkdjd32MMUaq anKZTMaYl7b/H6g/sQ6jagfqb1srcrkVltRBGlJ8Yzs+iHGhi3xA6uL8IFGdKrtv1ZCF 1D/rMyWdZk61DBvcTcSHw6MlGxDRQ/1wCx49SsX+GjYRJOqsea34PvqdtzALsb/rKs/g oBzA== X-Forwarded-Encrypted: i=1; AJvYcCVMFkyMeXkq8RrTtfq9McgYD626p6P+24JEjZjUAnB7JopdwBD7vHRwuk894WpflNdle0LAN08mchMCo/VJ6Y3Zyxecfaj9dfEzBgE/ X-Gm-Message-State: AOJu0Yz+56FzbDGc1/c0apBRylBHd99MzZ+sb7Bs3JtzHS9PdqYulqh5 GCn5CyADC6IBRBrlK+Eirpog/FsWMT3mZn0WesMV8ffITciyLrWn3pSkNG7ijUs= X-Received: by 2002:aa7:8edd:0:b0:6e4:1a29:7332 with SMTP id b29-20020aa78edd000000b006e41a297332mr6304473pfr.8.1708940488829; Mon, 26 Feb 2024 01:41:28 -0800 (PST) Received: from C02CV19DML87.bytedance.net ([203.208.189.6]) by smtp.gmail.com with ESMTPSA id ls22-20020a056a00741600b006e533caee00sm949194pfb.155.2024.02.26.01.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 01:41:28 -0800 (PST) From: "$(name)" X-Google-Original-From: "$(name)" <$(mail address)> To: bp@alien8.de, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, jpoimboe@redhat.com, peterz@infradead.org, mbenes@suse.cz, gregkh@linuxfoundation.org, stable@vger.kernel.org, alexandre.chartre@oracle.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, qirui.001@bytedance.com Subject: [PATCH 3/3] x86/speculation: Support intra-function call validation Date: Mon, 26 Feb 2024 17:41:01 +0800 Message-Id: <20240226094101.95544-4-qirui.001@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240226094101.95544-1-qirui.001@bytedance.com> References: <20240226094101.95544-1-qirui.001@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791955551481863816 X-GMAIL-MSGID: 1791955551481863816 From: Rui Qi commit 8afd1c7da2b0 ("x86/speculation: Change FILL_RETURN_BUFFER to work with objtool") does not support intra-function call stack validation, which causes kernel live patching to fail. This commit adds support for this, and after testing, the kernel live patching feature is restored to normal. Fixes: 8afd1c7da2b0 ("x86/speculation: Change FILL_RETURN_BUFFER to work with objtool") Signed-off-by: Rui Qi --- arch/x86/include/asm/nospec-branch.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h index c8819358a332..a88135c358c0 100644 --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h @@ -13,6 +13,8 @@ #include #include +#include +#include /* * This should be used immediately before a retpoline alternative. It tells * objtool where the retpolines are so that it can make sense of the control @@ -51,14 +53,18 @@ #define __FILL_RETURN_BUFFER(reg, nr, sp) \ mov $(nr/2), reg; \ 771: \ + ANNOTATE_INTRA_FUNCTION_CALL; \ call 772f; \ 773: /* speculation trap */ \ + UNWIND_HINT_EMPTY; \ pause; \ lfence; \ jmp 773b; \ 772: \ + ANNOTATE_INTRA_FUNCTION_CALL; \ call 774f; \ 775: /* speculation trap */ \ + UNWIND_HINT_EMPTY; \ pause; \ lfence; \ jmp 775b; \ @@ -152,6 +158,7 @@ .endm .macro ISSUE_UNBALANCED_RET_GUARD + ANNOTATE_INTRA_FUNCTION_CALL; call .Lunbalanced_ret_guard_\@ int3 .Lunbalanced_ret_guard_\@: