Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3062335rdh; Mon, 27 Nov 2023 05:53:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVbhNyVARvM+pazOPoWcyKkDtJTofftrEEZxw4H4bFV2UouKYWwhzt1jr8ghGEOqrEJvtk X-Received: by 2002:a05:6a20:3c8b:b0:187:3765:1798 with SMTP id b11-20020a056a203c8b00b0018737651798mr22084001pzj.22.1701093217552; Mon, 27 Nov 2023 05:53:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701093217; cv=none; d=google.com; s=arc-20160816; b=bhOZYP7dVedR0s7xBnvdtHR6vK5I3ZskA3+beiZmahLt6H5di7StmtH0Dg4UtcP7pX O1TYtuYvw5Zm/NMBfXgINk+zj+L9u1PKM69f5QDXOZ9Om3D+36xWE/hXwbHEf/WUPZKz hTAKiewPdgpnT713XiV3nKRRGsdlvRmrtNzCHB73paK8DrvgXHA6jSF6WALi+fWgmUZf Pa3XW+BG5lWzxBgTB8Ss+e0xypij9ZbQgnzuZljQIqEzuwXmW60vHJIziLhbWzqJu7VE DWcSxp69FHVs793TqyxwOoimwydAnm0v44wj1RmF7lonYURzbEoefVlfzTRVObusbt6j 9WRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6u8M/yEtWeoJVCEoLcNsgpoGnmlGQaiNnoviOD6fD5k=; fh=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=GGAHjJQzBrXf0hTyYkkdMfZYslSUR1FXJtUSyjFvZEMCf4efdTeZYvkCjlQyLZLjni YmGVpQq71ZMkiHXx81wzM0UA0gy5nCzR7yGITfeoFKg3EgKeL5SMDJUpCFtDlv76V7wc FTEK9xTdrAHviVpKH/twU/PIEmGRkhqqeov9Q45FSgYI1zuzahyojgnnDZWJ9kn9aDoM UNKmC2H9SPUCiU1yJw/5ardNYShAmP30nLOpc/HKCwVyJrcTn5Sztl5Vdrz/93UEw9iF rwt5SLqgu3qGVY1g1xpBJ5kRQKUqwMzBDtH/WjbV6SKM3dWI3OUZAkzOGoKPZcrIrxQp 4l/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Vm/jERzZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e17-20020a656891000000b005bdf5961588si9909116pgt.19.2023.11.27.05.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 05:53:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Vm/jERzZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 87932809ABC9; Mon, 27 Nov 2023 05:53:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233286AbjK0NxW (ORCPT + 99 others); Mon, 27 Nov 2023 08:53:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233338AbjK0NxS (ORCPT ); Mon, 27 Nov 2023 08:53:18 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3E07D72 for ; Mon, 27 Nov 2023 05:53:24 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0EBEC433C9; Mon, 27 Nov 2023 13:53:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701093204; bh=dL9JJoim7F8avDTUtPFPrZxdt2I1oZt3h3FTr1Er5xQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vm/jERzZ2fHzywwmEj0R+oEtJZprum1Ef+4LZK687lXtAzXVoPj/i0HSav4xiHpC/ 43HhdUl37/3LO0QaLmPk1cdYzEujLXJPP6D2PiBDOnbp8EBzPe/gfaq0aBwNg1Ttfk fgC5VT4tJ2No2tFIq7DCYvY31An+d7uQDDEXW9YEhbrj8Gr8sgEd8K7YhgWPJ3T9Tt m8dU9mof7YbNAb7z8Tj9tMxjGJF3yXZCMNWjFXJoUc2JFZTLqqRs8gZzz36fvwdUR0 Lhp0CGCQxJs++ZgqkXnddxvG7Low112u8Q3a66+uAMHVqXSKT6l1/xI2jUfQmf2VAT JTYZT9oouhJUw== 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 v3 02/33] x86: tracing: Add ftrace_regs definition in the header Date: Mon, 27 Nov 2023 22:53:18 +0900 Message-Id: <170109319767.343914.9766180271697584732.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <170109317214.343914.4784420430328654397.stgit@devnote2> References: <170109317214.343914.4784420430328654397.stgit@devnote2> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 27 Nov 2023 05:53:36 -0800 (PST) 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 897cf02c20b1..415cf7a2ec2c 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; };