Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2195087rdd; Fri, 12 Jan 2024 02:13:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHm/nSSbcrK0bBscgsy5Jb49O4SX3hcd6W9nb+sc3fmv6v8ct+P0+h3PG5Ri+FvwkUjMkF2 X-Received: by 2002:a17:906:4543:b0:a2c:191e:b73d with SMTP id s3-20020a170906454300b00a2c191eb73dmr522417ejq.48.1705054379879; Fri, 12 Jan 2024 02:12:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705054379; cv=none; d=google.com; s=arc-20160816; b=XCOokhYy2FUHcPMRySCPHQ7W4Im04hjd21q7IPGhvIM+JEo8h/2gXMf3omMvyXD5DL yBbtj6ASN1bAH54j/H/L9SktAuYrRHEllKJOKjNJtH36gvnD2vAg6ubwpy/a0fSdpX3x 36ouN70Pb8p3hPedTcpNEKMjxT4aItbUFdKsKF+9VFemAH48F7eErJRxWL11e5339UaC LMvTKJYRFVDBM0MpLKcM/vDYK2oE60zL/JC1GgqLMv3KgRrZPgREv8yqV+UllE3JYiwN 36xWNDQhSfG9LZtuka+R+40lFe4dggavEJ+6aWNVwywKt4DstMLiTmSzBoGeId9NhTeJ b9Hw== ARC-Message-Signature: i=1; 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=TAC8/aKBtprVi5A6NPY4Vgye9J5tOlBjalNkp4KQtOsNqZvwyl9bOXnkwLlBnFzzg8 BE6ETNpGhxy7obv+NJzOoa4hv5tq57ih7CLUwHsX3nms8TTrwlEJaGM5YNt2jKNMS1Ft +F9M5TaixF0hueBqAerz4CTUeQCaOCjNspgu0W7bTH4U5d8kJdbNUVt4hKJ3TazQDgfj cX23wBLMlVe7WksT0tLMyaaIe2qyCQOFIBoI66kX2Lby32adKdGp6G78WC3blaOAkaNX cTzhDSFxVl5tsb0MpqarBMasc0UMB/uqChW+mI+HJD8R7gPLSyOagFUJ7S6lwqzzBUa1 6jhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HF2671RH; spf=pass (google.com: domain of linux-kernel+bounces-24550-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24550-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k8-20020a1709063e0800b00a2a8db16a15si1274183eji.143.2024.01.12.02.12.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 02:12:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24550-linux.lists.archive=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=@kernel.org header.s=k20201202 header.b=HF2671RH; spf=pass (google.com: domain of linux-kernel+bounces-24550-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24550-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 9CCAC1F22199 for ; Fri, 12 Jan 2024 10:12:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB5AF5D916; Fri, 12 Jan 2024 10:11:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HF2671RH" 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 14E1C5D8FD; Fri, 12 Jan 2024 10:11:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E54C4C433F1; Fri, 12 Jan 2024 10:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705054304; bh=Ky/M8O0rm7AMIWcFwVKGUXTVtEFqfb+EU9Ru8C9PH5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HF2671RHXzBZjyIFr2oK37ExQQxAEIZbEA5QLEKMwoqaAhZUDEKsZrW9jflnrSt15 YrKNbHKfN6wdUjafevCtXNHRY4CrjzEWLNhhnKpB3OIJJUMM7GluVvzSgjVojlcaXW kjW2HiyyV6sbtY1xyhMExWNpxeljWKg3Ld7gZ3uHDj1RG5kH9N1F4zMJBllj5p9EFl c3++IvgbbqG5KOozgPjd3mqMd3c3JEvdN9l9E6lLUf28i2QAnK1IHixw1+2ETD6vAP QdhZVIkOln/M4TcFpYe7lnbeYuhQkuu747zDUqt3v/BYzaQ0JHzl/H02+czPVwQbmG 2hvWBVAKnE41w== 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 v6 04/36] x86: tracing: Add ftrace_regs definition in the header Date: Fri, 12 Jan 2024 19:11:38 +0900 Message-Id: <170505429822.459169.14866081576830532227.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <170505424954.459169.10630626365737237288.stgit@devnote2> References: <170505424954.459169.10630626365737237288.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; };