From patchwork Wed Nov 8 14:24:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 163036 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp947910vqo; Wed, 8 Nov 2023 06:25:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtF62V+2hcoJ2fbMiZdaS3wjRKslcAQJE334YnIbIG2nTbgO7Jbt2YmhLN+GM5olh4T1on X-Received: by 2002:a05:6a20:12c1:b0:17f:cf8e:241e with SMTP id v1-20020a056a2012c100b0017fcf8e241emr2371905pzg.41.1699453506320; Wed, 08 Nov 2023 06:25:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699453506; cv=none; d=google.com; s=arc-20160816; b=ZDAiS+at8hcNUcs8Wyo1MGUJpgslNtulVHL+j6HMcFJgTBH50688q34yrTed9HcGmZ XMzV7VE0JYnC1eH3I2OKmaSqRqh7xq7KWzAHJJ6bh3eofOjS2hy3A66Px9yvRxsPDKy+ t6DCchDPI9ldvaGnwqsBVexzv0lJ9hCqvz7VKPTaVasdDrVgV9zDY3uVpmN8u4tAmTE5 8zjYXq43SB9kwtZyYR6e2OfJHmXi+R3wZP9FF1WX6g5pCWnvHi0SQN7ee32Xd732IF19 c4kB6hDFDJ9ZLMWdKzJ5l5Zoi6D84HyAUzokGKfXWAa8iu56AOfMEEO1iZCwOOBhN6ID YPRg== 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=fYeiMI6quKuPSKPTHFTRyfZh1UdZ+bKwhmgqgj0LOjE=; fh=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=nofuxjxpiaHvOBmW7iFBPS3TvKZEGN89eTUY3lPgjNNz9qHWobHtioa29g41aVbPf8 vDsaML0umOC5erAm1g5oHvy2l6a6rlsaeVwMVAvq66q5YmFow/+uzLsQX9K8uxQJ/eWt CZFaWgIkx06LYmIj+nA8GP3jN8qPOvqh9dMLcaqym8T/ROf+PArHZWoOtT8MdjlzOAg/ wAXTLUQQA5XrB9NEwaqcfDaeonXh5WnTysfjZM9gJN1iikkh/Vneq96rQ8ih7gf0kYmF 2tUzVEqTQLhzAJmKBfhIIYUumSUijBfS0dX/hXOKIoHNGvnTYWNeHrhEvMEdi/o16De3 qK2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BrtIxDVH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id s35-20020a056a0017a300b006c347df967dsi12956396pfg.155.2023.11.08.06.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 06:25:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BrtIxDVH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 17B9D8263E8A; Wed, 8 Nov 2023 06:25:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232445AbjKHOYx (ORCPT + 32 others); Wed, 8 Nov 2023 09:24:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232268AbjKHOYv (ORCPT ); Wed, 8 Nov 2023 09:24:51 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0EC11BFA for ; Wed, 8 Nov 2023 06:24:49 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31C90C433C7; Wed, 8 Nov 2023 14:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699453489; bh=C7bH1hbWj8YrBfom6n8ilePk5KjymNF9xGwzwSVwNXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BrtIxDVHCOf0bu7JTKatkcA1ju3b4gZ5Vq2cFTvDyE2hler0OWBAWZiYjwlq/XTFW cOQRUyVfmG0PW8gKTTT+y8ELQduQW2nrpD7ZDyRatTmEMe0n8c87whRGPQQkf4aQmQ soFdmpFj9Udi095GJApvsV4kFZI0j0dFBMK5gD2M9ZaPFqkkUhzskZfCXyFuOk2arW SNodYq316Vv+wsG5ot4CFf7UolCyxFSJcyfYmOQAVb1dQV/GbQNeCak+xYgTIc832o wsPQd8exyei5fNIzk9xPzKv0eWvtirfrrNUe/gQcKIbSPxdMXwACfDpw5MCX9pTkDI B1lMlio7rEaMw== 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: [RFC PATCH v2 02/31] x86: tracing: Add ftrace_regs definition in the header Date: Wed, 8 Nov 2023 23:24:43 +0900 Message-Id: <169945348320.55307.17578137376868880969.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <169945345785.55307.5003201137843449313.stgit@devnote2> References: <169945345785.55307.5003201137843449313.stgit@devnote2> User-Agent: StGit/0.19 MIME-Version: 1.0 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 (fry.vger.email [0.0.0.0]); Wed, 08 Nov 2023 06:25:04 -0800 (PST) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782006160027246884 X-GMAIL-MSGID: 1782006160027246884 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 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..fc60974a1d89 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 and rsp. + * Also orig_ax is used for passing direct trampoline address. + * x86_32 doesn't support ftrace_regs. + */ struct pt_regs regs; };