From mboxrd@z Thu Jan 1 00:00:00 1970 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 222951E4A6; Mon, 14 Oct 2024 23:54: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=1728950082; cv=none; b=JWoPg6trbxuwtv4Ldi2yFYpLs0Ufv0isvF+W8C6DibzD52KLiWpJwVfE4BtyiSfc6hkC+l1229+r5eiFHkWILaSz1PVgJOWdlyiWIZxvhA84TNxXSycmVnp1fJOYp7mTjUmMtiwkvtQ6pZx4O7Dn6qI7OaVokr9xBaUBoZO3E04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728950082; c=relaxed/simple; bh=YowjbaWlK7+JmdK2cSGCF0LIn51aTIpLQu82ZA9VRKQ=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=qwqGtACKMcSbHVW3iYZp35pWxHBN9efNtexSXIruO6B2G+Idcla28D+77E1kv2OhSTuOpoRem+yAoM/F9q4R1Cg8AbX/f115No6FBmZO28u9oXdC9XrgHypB00L69qvGUsgAFCv0OU69WQtpsPtx46Zvkqh7owj2U4sGcjiILrE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VNRIBMNF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VNRIBMNF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66EC9C4CEC3; Mon, 14 Oct 2024 23:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728950081; bh=YowjbaWlK7+JmdK2cSGCF0LIn51aTIpLQu82ZA9VRKQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VNRIBMNFuX6xKvfrbvnhLyVxuHRrQcyQ0C4i5H2qTWFhIeGafSBmwi7AAs7vDsF6A HthD42Bt8Flv1P9Of0vgkhgyJ5L+OgDaOvQJPzy7xf08fhlxA+48lpk5Hg9H5Nfy5T 7444VfKA1vZZionXjH/4EYJgMyPz9BAsoMsixQD2Imd0GbL/PetRf7hchMKeMvK/DB Hioc83ipFRHM/zjAIPgMdRnGXiePSLxbxm1bOkzqYXSaGjZ59maOCx5H3PHsWE9BDV 8SSHdGmF2+wycbC4JV4jWiqlDP/ixPWVbrgA9cfOJRB0rbzZl/mKRf4WZjQDs7e/bZ R6q10zaw/Q7yg== Date: Tue, 15 Oct 2024 08:54:34 +0900 From: Masami Hiramatsu (Google) To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , , "x86@kernel.org" , Will Deacon , Huacai Chen , WANG Xuerui , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Catalin Marinas Subject: Re: [for-next][PATCH 4/4] ftrace: Consolidate ftrace_regs accessor functions for archs using pt_regs Message-Id: <20241015085434.afeaac72d7cae61bf00af3b5@kernel.org> In-Reply-To: <20241011132956.899228335@goodmis.org> References: <20241011132941.339392460@goodmis.org> <20241011132956.899228335@goodmis.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi Steve, I found one problem on this patch while debugging my series; On Fri, 11 Oct 2024 09:29:45 -0400 Steven Rostedt wrote: > -#define ftrace_regs_get_argument(fregs, n) \ > - regs_get_kernel_argument(&arch_ftrace_regs(fregs)->regs, n) As you can seem most arch uses "arch_ftrace_regs()" macro for ftrace_regs_*() macros. This is because we are sure this ftrace_regs is not fully compatible with pt_regs. > +#define ftrace_regs_get_instruction_pointer(fregs) \ > + instruction_pointer(arch_ftrace_get_regs(fregs)) However, these consolidated macros in ftrace_regs.h are using "arch_ftrace_get_regs()" macro, which can return NULL if FL_SAVE_REGS is not set. So, those should use arch_ftrace_regs() as original code does. Thank you, -- Masami Hiramatsu (Google)