Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp215912lqb; Thu, 23 May 2024 16:14:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXGRj7uVwiBBZWOwAK47BmBPHNeHkdfMpfL32iIJ7IZzjTcsQrg3ESE6Vp20YBkugg6LkXz84Rp1YBYtP30FBy6lT/ZRdB7/usM0nmX9A== X-Google-Smtp-Source: AGHT+IHWk/cw3t0sc6ZPJCGoBhbuto8XFF5COYg/vnPWJb9XmSLuEEfYaY3pzzVtNY5kHaJVTdDc X-Received: by 2002:a17:906:27c4:b0:a60:46a9:7d60 with SMTP id a640c23a62f3a-a62646cf832mr41885366b.28.1716506086862; Thu, 23 May 2024 16:14:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716506086; cv=pass; d=google.com; s=arc-20160816; b=fpRTiqPrssqI+l/T+CLVcNqj0Vx959NesEPbwqYPiJCfrVORVsf5DTID/JQCPZ3I/h PfxUtji5WqTOz9n0dScr+VP0SIkdRoyaacICROr2YDzbu1rjw5fJBzzFxFmYnA/IN0xu 39sa1aVJoj5oZ8jsSoWa5onrcuvHIy7y+hJkElQEiB4GFSKzy0Lhmmd2dmayDGmntHZS y30ikgpnKMtovD2P843YMYOfaKubNfkJGcOYvgOU8IvpwlCpcXRDqtIUk6BAyTa/cGLQ J/Xhur/KPoyBZtqZuMlIucCJB9x2r1aNUvt9GnSlLihnH81dUOdvlrjs8OOoYuPqIWPq X3dQ== 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:references:in-reply-to:message-id :subject:cc:to:from:date; bh=m24QdMBkBlm9/0kVS5GEPdkyhOXfjFjEJ9TbHnArFCg=; fh=VaF/w+FGpk/prTFLJfCoV+GJDmV0Sd6dt8EMZrBTbz0=; b=QpjCSCpAPpHQF53ZqviU7Yl1XN8/UFZ65IGTzl1foza6onn8HzioHTKLkk7vsyWTQ1 eJexn8yN8GSCC8urW3ml5+2vXby09HI29jq2IRxzVvFkju6kdKuh628aoZ2Xvut5Z+p6 kYsjWppanBNdGAPhFCaG5URvYZroGu3uA0Uftw96GwaH6sGc0kLdXjqktEnOdWdLR2id KKwqhgN4n1JXNBgQ6TXBD6nXhktogktWTmU+Q+40ahJvc3dmuDJyPkea90L257TPM6BC JiCFRvSIlZBuKBAyelkDHsvefuVW8hjbCORK+7oPPSh47RVHU4BJaGGq+qxiRB+5IfIc 9Sxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-188101-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188101-linux.lists.archive=gmail.com@vger.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 a640c23a62f3a-a626cc38403si14722266b.287.2024.05.23.16.14.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 16:14:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188101-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; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-188101-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188101-linux.lists.archive=gmail.com@vger.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 956391F21657 for ; Thu, 23 May 2024 23:14:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30849129A66; Thu, 23 May 2024 23:14:17 +0000 (UTC) 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 9C1291292D9; Thu, 23 May 2024 23:14:16 +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=1716506056; cv=none; b=BSQ1t+YT0K1ls14JBAZGV1uwReF2ik4kKDgRjUajkOTlo2KOs7ntsRDx5hFXvHlDQGWnGkRXnAqFOJxScW5gFmT0D/eLiWTaZaWkm73eSo0/ROw6xxfaHkEb52Y/B6SOSu27uQ5r0HrThO3+Z7ZTLXbIhU5BtrDQnJQgf8u3aCI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716506056; c=relaxed/simple; bh=EC4mMstx3GoDVOr94WNVc788fgZGZZasw7u9LmyR0Sw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VQNfKcLIooKZPfodgBZWZaaTFbNgWk3dtG6veOczl6y2+9/Uc/wEKGfJcVMqjEbYXYHDA2FxvPngsH/ZwChKdGaqxD5fYWK8d/LjV7eTL/p+ZgpRUQINAVLBG9DpCgbnwpjGvuk/MpkPHFmSmTgb0hbciQxQ6SbGu1ZN3Aaw9fw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E45F5C32789; Thu, 23 May 2024 23:14:13 +0000 (UTC) Date: Thu, 23 May 2024 19:14:59 -0400 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: Alexei Starovoitov , Florent Revest , 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: Re: [PATCH v10 03/36] x86: tracing: Add ftrace_regs definition in the header Message-ID: <20240523191459.3858aecf@gandalf.local.home> In-Reply-To: <171509091569.162236.17928081833857878443.stgit@devnote2> References: <171509088006.162236.7227326999861366050.stgit@devnote2> <171509091569.162236.17928081833857878443.stgit@devnote2> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 7 May 2024 23:08:35 +0900 "Masami Hiramatsu (Google)" wrote: > 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. Should add a comment that if fregs->regs.cs is set, then all of the pt_regs is valid. And x86_32 does support ftrace_regs, it just doesn't support having a subset of it. -- Steve > + */ > struct pt_regs regs; > }; >