Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1404948lqp; Mon, 15 Apr 2024 05:53:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDM1a7G7Qpbax0Kzl6lkZxY3b2ca3V2JFENzTy+Bky7M5xMkdiXj/qdMDX9JYLJ+gSABebTtcBBmJTSguvOhQAyDqfwxKAXryzN3Xz2Q== X-Google-Smtp-Source: AGHT+IG9gA2n0EA+VRYPy1CrGgACC7uOENMp5LMm5GWMiweiKVsllXqvbznHWczDs6V5jomwpdfK X-Received: by 2002:a17:907:2d2c:b0:a4f:b398:2f47 with SMTP id gs44-20020a1709072d2c00b00a4fb3982f47mr12363786ejc.25.1713185605279; Mon, 15 Apr 2024 05:53:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713185605; cv=pass; d=google.com; s=arc-20160816; b=ZtlpOWRd1n29gRNMFnyMnLO8CowFBjBfjIMOqY5bDqEQt8uETfIdwe4t91GMh4I0AB QUbc5UTr4ynLwMfdZUtmVYlUhmwJ9SP52kDGRSI/U+0jL3AlkeUVzZ6GWGEN+SLNQ1z0 KFpLa9vg5K4kGhZRKyOSxq0DrZtsAGKUhM1SDvCnNlVQmV/NGUiXNmA/ksw3Q/4H9sDO 0i/GjwWD/85SQYcze6YBfohrafA3SBwsYVBwI5BuyJ9KfTGYIotkpiH64INiDHcaoWQo 1ucJ0fqo6OozChd+B+6QBAmGdSiJb8Hhl0ZxYpcc+pzcdAL2g10GVA7J2LWp/YW68AOl D0vA== 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:user-agent:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=6UWyW+HZQB9PkPidfS9kyGvOgCmjAVd9N756+zbkz8k=; fh=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=JMs8o1t3rjVukl9eU+8ZlmRuycx0Fxs3zkGUseo5hWcaHIbjlxKQBYHm2BMR91+Zzj 0MNQRtB2MXsLYfK/pTokbKgvjNTgUMduffbY9GzzqQKenrD0EKl5lhXIbVugn8vCB3hL hKJKUEMRqlqk6xbsDZJqn67sVDQHPcy3l7N9vs0VDzZSj2jow3v8zYl1lfum53RzTnNK jJHfKy88Ujb1bqIUfl9zjmHXY121yTLUs5kJKBsj3nzXYO+qKkardP+fGoPh3rBPgfOU OCA3s2Axgf4FD/d67Ng3KxUPjEcbPOcK56ADEYuXCzSVKB/78o8vMfPwqyZ76H9lS57A KVyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oBVvizSB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-145114-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145114-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id et8-20020a056402378800b0056df5ba6dd6si4438481edb.461.2024.04.15.05.53.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 05:53:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145114-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oBVvizSB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-145114-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145114-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 077661F22614 for ; Mon, 15 Apr 2024 12:53:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4291E7FBD1; Mon, 15 Apr 2024 12:49:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oBVvizSB" 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 59EE280BFE; Mon, 15 Apr 2024 12:49:38 +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=1713185378; cv=none; b=l7GpKNZFhfAwYH7fXAbWIniMDGUqXG32CocWsAk9ma9a+Cr4ew3WH3R533Hjnt7ozEwhiP+G7FFd8g2NvX6aqU5EHi1mawVP7EC4dru0aghiCCX77GaWcjtonfOn+APLh7KqJgqBjhWprrJCe0h5fAcGo5JP9OwCHVOZW7V7knI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713185378; c=relaxed/simple; bh=Ky/M8O0rm7AMIWcFwVKGUXTVtEFqfb+EU9Ru8C9PH5M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=QVhD/R+9+rWP76G8irexRZFtfqiNYZI5/sScF8lYaUfZxjLgj4ogqND0FQLYE0zooNwFvdWB3sUbWHknrpyCBqJPGGAzHaxEou5g22kD5yyRTqh4BZh/iqwPqGXZ9DyLR0l2SFvBNdvMzICMs2OnzruTAmVivW4bGi8dx7RvSk8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oBVvizSB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 003A8C2BD10; Mon, 15 Apr 2024 12:49:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713185378; bh=Ky/M8O0rm7AMIWcFwVKGUXTVtEFqfb+EU9Ru8C9PH5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oBVvizSBUMGrVT8rY3nQdZzju1MrHmb4eevqf16UecUF5/pf1RXMmrdwDkDSTYTUx 1qRCVatyb3Hw8Njz1qJZlRQ06Ethvv56chp9wZJRS/YWiy36ozgfA7KSz2AN/ExAp8 1TGFQzW5ZjUQ8Bhq5rnxnZkv2mQk86s9csI6XMavAwVYmjCVSDL2lMtHTROfG3uhVR mril2N+slpyyaP5QmPBuEsg0ktfYje3AZs2nC3WvNM/qRxb6VjdXgG+DEQXRidZR/+ I/baYICOCSdBogfAvLhFoNx9jJQbd5HlKP6/JtBr3KsMl515cgEiuWgnRMt5+AKXzI 2oNb8+i9y3EZg== From: "Masami Hiramatsu (Google)" To: Alexei Starovoitov , Steven Rostedt , Florent Revest Cc: linux-trace-kernel@vger.kernel.org, LKML , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Mark Rutland , Peter Zijlstra , Thomas Gleixner , Guo Ren Subject: [PATCH v9 03/36] x86: tracing: Add ftrace_regs definition in the header Date: Mon, 15 Apr 2024 21:49:30 +0900 Message-Id: <171318537073.254850.18255104445724151465.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <171318533841.254850.15841395205784342850.stgit@devnote2> References: <171318533841.254850.15841395205784342850.stgit@devnote2> User-Agent: StGit/0.19 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-Transfer-Encoding: 8bit From: Masami Hiramatsu (Google) Add ftrace_regs definition for x86_64 in the ftrace header to clarify what register will be accessible from ftrace_regs. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v3: - Add rip to be saved. Changes in v2: - Newly added. --- arch/x86/include/asm/ftrace.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h index cf88cc8cc74d..c88bf47f46da 100644 --- a/arch/x86/include/asm/ftrace.h +++ b/arch/x86/include/asm/ftrace.h @@ -36,6 +36,12 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr) #ifdef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS struct ftrace_regs { + /* + * On the x86_64, the ftrace_regs saves; + * rax, rcx, rdx, rdi, rsi, r8, r9, rbp, rip and rsp. + * Also orig_ax is used for passing direct trampoline address. + * x86_32 doesn't support ftrace_regs. + */ struct pt_regs regs; };