Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp546229lqh; Tue, 7 May 2024 07:09:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVivTnsDYqG+UhGMFyYTKj2oPJZVA3ZQBF2u1CG1+HWBF3FhPPtcO6wwSf+jWOOTpPxF1NuFkUzpdsZQa5Gn7eilrv0PNxazywxvHyN6A== X-Google-Smtp-Source: AGHT+IFnoFfdVQ8AkCpgrT3bHA5reiF+IdfI9LV2OEkxdji7821HpxUhdmLdraceODWtvNYFzYA1 X-Received: by 2002:a05:690c:802:b0:615:22ff:b57d with SMTP id bx2-20020a05690c080200b0061522ffb57dmr16020276ywb.42.1715090957874; Tue, 07 May 2024 07:09:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715090957; cv=pass; d=google.com; s=arc-20160816; b=L3LuZsUJsLVfHX4BJzItjelKaJKl4ySDM+vSubizvtvWPlUMRhUP45FxI9z+g6+l31 qkNgOWN4mlUjUU7gDQo38n9DOyRgRQgFDuJ5aD8NOVxW9wyq1fzdFMxkUuVcwqFHQ03R mXwq1BWH249DvXJXVKJ6inSYxGwwxNAMCJPk5A2l6ZwGo0mMt47XMHkl5SXSKrU+heKW sgdTTkeuD1KjrQp/gWgwlq8j1K6EEm9jC0jTbOsonP/lLsIRQEtBJHP7IwlYqfVuptCV dqaLsJYMCh5YG5IOPF1ks/ThP0VUXR8D72F03vLj3J2yH5dXxEAoqIRxwT71KRpiKuua GwmA== 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=nK7zC33H4xM1dhjajukdNiOXuk6epuK5KuCLPC/Vm0tn3AOKoudNoxzl3iW4ZruBgr YZku+7nLfUjh6xmUKtcNR3ZT8q92dQltnoLNGSZ+gC0LQP+Vzpxlv0P+aYaHtIygsCGp ROgsiyX/x9aGzFciYA4IL+nFUjmzjbF4UK25TciiFr4t9o7rneKlBsvcU0Sr2kPM/4De PzgC7C8MfK3GHyCaQ1lmtD+Lq9ZWcoFNO9SrVQMXXstU3JWCW2QRj4c1d4pvlieJt2F9 4gHtzam2HH365ODB3m0crvISY22jtyTJ47EfPZXBafgIv90oileRlTY7e+qEeG3YpIEB Wd8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r8fa7Bpi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171508-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171508-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l40-20020a81ad68000000b0061be64844a3si4096667ywk.84.2024.05.07.07.09.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 07:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171508-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r8fa7Bpi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171508-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171508-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C5BD51C21D76 for ; Tue, 7 May 2024 14:09:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 327E215F41D; Tue, 7 May 2024 14:08:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r8fa7Bpi" 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 4E5C815E7E4; Tue, 7 May 2024 14:08:41 +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=1715090922; cv=none; b=YwU17p4YSbMwZtO5jJk5u50cDrlsdf1kqhPrqF9rCpm+uKHKVbY0HIN+i9ae/VmjYa8I8b9KfpigQF4+6lma/6aq+fb/V35HAgQ4ZMOOrbZinoRv+9jhmNkmhHS6EXQTVbVow3MkAInOyqsm0PXO0YqpXM0jYbeg3vrs1fKrYz0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715090922; c=relaxed/simple; bh=Ky/M8O0rm7AMIWcFwVKGUXTVtEFqfb+EU9Ru8C9PH5M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=C/gZWeF2RU/Qht2fqKGmlFc5lGKbJUJYKbgvyjfuhDb/pK2g5lWqrmesLl3TtGTn9VkA4CB21Zv3giBfvBinuhr0U+6OygwyMh4b/53qNeMsOVdQRW5NLX1QZLi+andvlNO8HcFWHqLNdeM6kFeTgfhqwuzoKf24NyDTOzOz2IY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r8fa7Bpi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC44AC2BBFC; Tue, 7 May 2024 14:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715090921; bh=Ky/M8O0rm7AMIWcFwVKGUXTVtEFqfb+EU9Ru8C9PH5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r8fa7Bpi8DFcRIYppDjwBdtP3uubc/ubqGgttVwMlr0tesTk4xAWTIP7llsMiu39f X1bxjEkVdKBEIydeNPtztv9Bk1fxvSF01hlphsOnIHzI3KuK6unuw3yMlhmrqmtAd1 Jx/zVRQqR5qeg3aJDgmSgND+CdVUocjQxzjDJS3P3xAxN758ycI4Ws46oN0Y3GeQkI DX9Tsh/VpH3HhoJC9oAn1uvSxDGA21znK8NVfVekWpmK1CvJtyB+KOkZ5/AneWfI/U plydzSjAN8f+6DI30K2P9dbJQau/OFTPpuo3c8ph/1eGHZ4Fjyc+0ZuX/cDxSOCpWK yOIh278bExT5A== 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 v10 03/36] x86: tracing: Add ftrace_regs definition in the header Date: Tue, 7 May 2024 23:08:35 +0900 Message-Id: <171509091569.162236.17928081833857878443.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <171509088006.162236.7227326999861366050.stgit@devnote2> References: <171509088006.162236.7227326999861366050.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; };