Message ID | 20240228024535.79980-2-qirui.001@bytedance.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-84444-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3100016dyb; Tue, 27 Feb 2024 18:47:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU9hD+LkQXsOpDSCDDEmhcSGTQjfj294LldQ9IF2iQXe6zJSeVdXoeLujZ+b9Is+PASG/nBq4b1BzL1daRsUEZW6+ZG4A== X-Google-Smtp-Source: AGHT+IGY4uF8fGKM1XvgFlQIojqJKgXbsMozjDucF4z42Lgke3nPI+/XS/jPN+embQRhqED7Bwyp X-Received: by 2002:a05:6402:5151:b0:565:7b61:4c82 with SMTP id n17-20020a056402515100b005657b614c82mr8317528edd.5.1709088446800; Tue, 27 Feb 2024 18:47:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709088446; cv=pass; d=google.com; s=arc-20160816; b=w8AJ8uqdo5b1erQ0th/9p5iNVUdVnA+E6sQpakn8j9Yt62j/MBoDJNRlzp5iH3T4OJ izJBwk1v5gJ6pRlR9yeSlj5kXxRYN5EPK1Nlzty7HXuD9fqyF4wrJaafPakvOUEErZ1K YNmrbWZ/z3vph3vPDuTlmNy5RRdlbNhFKMxBJW6OGNTa0YbnUms3QEi4ZwSdZ2MAmijU 1memJ/m9ThwDxdBolPkN31tYsD1l280N5RoBQEqG8RBWr814GQHAldZpgqusZzkwFGX2 uQYxWD+DXzubl7BvS3zpCEH0DeHiceCUs8mb3IZ09ITn/WXi36wEIQ9niFbroW5gYSu8 9yMA== 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=YZcP2NcGO5ZtZ0U6eIwOdju/e57ADMXOAHt2kWBKkaE=; fh=jh2V/l+Or6M1JnnUHOiM3svwBjTXsdyJjIuziqPRuvk=; b=KxnE1bX10W1AziX85DinqEOTQMrtAV/Zw/bZjsX9q5XdzBbwJlmU2nDZBn/oHl8hp2 8hrLzyOnMGR5bwheVYnDw0wKaFdG14p3lU0FLh4laCIA2KJJUv41nZJRI9TT8g40wyAD BlZQBJmEJEfQXyhkfTLaO2HyOySJlmoSdXyLY6yaJjVlRhSKTFnkNmKsDESHjsD1GmiK bHwGRWv24lMWE4yvGOM4wUsRh8+qmb97mT+l02LyXgX/R3zeaAie99vThOQCKBwJ/RaB FRaRgu9UsdpFuJoPcfryYmaC57s3JLjaAPaY+OREvlV3963uk7+FRDl1O00Q+BjWStKC 46Qw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=URgjHVN3; 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-84444-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84444-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bt16-20020a0564020a5000b005665c07b967si453061edb.57.2024.02.27.18.47.26 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 18:47:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84444-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=URgjHVN3; 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-84444-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84444-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 68AB01F22911 for <ouuuleilei@gmail.com>; Wed, 28 Feb 2024 02:47:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E021A200A8; Wed, 28 Feb 2024 02:46:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="URgjHVN3" Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 2D1211DFDE for <linux-kernel@vger.kernel.org>; Wed, 28 Feb 2024 02:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709088368; cv=none; b=a9x6JfdhLDI5MyCV/cbprO0E9MGGfYBZA9nOA10J5gcCsyQC2vqG1uF23HvRsrQqRFsUkNCRMI9czYE3RfB3KdtgkZqJVJj9ISUfQzGDgwHbWI1cjWvNTixyTSDS5PVd9wsVKNNUnwAyUht80niPYCFrby/D7VdYzDY4aCSSFXs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709088368; c=relaxed/simple; bh=j0esSTih3HDQGZF6sZoHNfFbxuBCsmG4nJeOOvz7sfg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MJAMbAW4yjHsq7eTWlmt9xH27N8sxwXpltFrKUHWxi0O5MtWVFV9hpnCMKIqQcZ0gZRRFx66m7ftx4G3PmiHcZnOztV0qKvWEuwEbPqOp53OJ7LoGktaElQyNcmkhCrQnmOM0Pih/BrYx+URfBrSBK39jUNrJN8ptJ/gzOK9mHI= 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=URgjHVN3; arc=none smtp.client-ip=209.85.216.53 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-pj1-f53.google.com with SMTP id 98e67ed59e1d1-299dba8fd24so2891573a91.2 for <linux-kernel@vger.kernel.org>; Tue, 27 Feb 2024 18:46:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1709088365; x=1709693165; 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=YZcP2NcGO5ZtZ0U6eIwOdju/e57ADMXOAHt2kWBKkaE=; b=URgjHVN3OXlILq/zS73P865F6O1rIRFp1ebNQhamgJv/j2T0qfjP+curvoZT9UYfy/ 9+MGyYuH8SmyoLmUZoiX/z9Fi6cb9zux1wZNf/UnYXoUtWkSYXE97Wv7ov3G5ft/leui MPEay1sA+pV7c27MeVDIVySSRZEZOsCy9yXh1kQnV32vJvHr2NCbTOMAYqA8C9LHG7LJ RzJ8t+lqXkmwuQ1Dl0utPy4J4deZLFOHaK/w1wIVLTZi8bkfrVW9UsKhPLgH+Ywy81t1 +yq3JG/SCCARUjnWqxvFKayIL47S7Sa9xt6fGUd5QaHl4xWT4oweo5O/I96vl3zJbRLW rNDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709088365; x=1709693165; 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=YZcP2NcGO5ZtZ0U6eIwOdju/e57ADMXOAHt2kWBKkaE=; b=beFEqVzLnX5LIfMpyaeAMknhjqgxwAQq8K47VOQ3xhlSmaHK8VbO+YH3RHEMTLj+c/ XB1LxhcFo9xBtnel8czcfXXrjjOyvMBP+MKT9z/dtWjsiBHbhhGBqRNy1Tcig6DZHFEB nMw4zpN7pwr6dFCfuZvz8AEWC0QQ8WzakbXbODqr1KLC9R9u0o5Zw5NziIp8NgB5kNfA taMaTlkMcFICvCpwiajtxE1xVmJQzd5t50XCQX7Ej1zDjvBLS+VhzVPX8Pp6yr2zFYUI 1v8rOm9K2NTXiBgw0EIpgm5Cb/PQliWnxDyu5HIleXjqTfHuyRT/ovX3KntCUf8xdyMA 9pSw== X-Forwarded-Encrypted: i=1; AJvYcCXnMRUX0ToSKTglKqy6UGVuzQgb6EPc95FSIo9+djd2laYognW1yZBWgAkziHpNZUMnbVeo1j0gr1s7btzpBwo9dKyesFAx6UqZZpce X-Gm-Message-State: AOJu0Ywal87i0eUzyrEe/RPbKpUMfJcgqH07oWrBs1bM7u4QKqVNwENV lLmqWY1L1nfhOJgsJsmlsL+T+8JLJaLJ9DSaSJl4SlM8Wd2LmrzgHoXLBF85KL4= X-Received: by 2002:a17:90b:8d8:b0:299:3e54:83fe with SMTP id ds24-20020a17090b08d800b002993e5483femr9708762pjb.36.1709088365439; Tue, 27 Feb 2024 18:46:05 -0800 (PST) Received: from C02CV19DML87.bytedance.net ([240e:6b1:c0:120::1:d]) by smtp.gmail.com with ESMTPSA id 9-20020a631249000000b005dcbb699abfsm6489072pgs.34.2024.02.27.18.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 18:46:05 -0800 (PST) From: Rui Qi <qirui.001@bytedance.com> 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, yuanzhu@bytedance.com, Rui Qi <qirui.001@bytedance.com> Subject: [PATCH v2 1/3] objtool: is_fentry_call() crashes if call has no destination Date: Wed, 28 Feb 2024 10:45:33 +0800 Message-Id: <20240228024535.79980-2-qirui.001@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240228024535.79980-1-qirui.001@bytedance.com> References: <20240228024535.79980-1-qirui.001@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792109126975459579 X-GMAIL-MSGID: 1792109126975459579 |
Series |
Support intra-function call validation
|
|
Commit Message
Rui Qi
Feb. 28, 2024, 2:45 a.m. UTC
From: Alexandre Chartre <alexandre.chartre@oracle.com> 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 <alexandre.chartre@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lkml.kernel.org/r/20200414103618.12657-2-alexandre.chartre@oracle.com Signed-off-by: Rui Qi <qirui.001@bytedance.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;