From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 875B3CEFC5D for ; Wed, 9 Oct 2024 09:37:37 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4XNnqN0yRTz2yYf; Wed, 9 Oct 2024 20:37:36 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1728466656; cv=none; b=MQmRF8abUUr6fO0mYcZsOyCz4rF3tgKBLymhadn/GntwgSK57V+UWk4IPiDaOwORB5T5uAD1zPZcUS+bCOA2NIXt8tsT4OLdLC9Dny8QeDEIOHyYSIlwCjVxbdVRNMrXiV9+bBtOLV4zX0UC7x1DynpREJIQie4DBScuzv2vMSssUx+X5Ob5fTBUpq3MnHJZMRujIlAAjU10+Xo8OaZQ1vCOZ6p4t+TyymbhZL9Zi4gY0l7XYQJJHwpUDwP/mVi0Pg4DxPl2a0SnVSSW/SLzL03pL5WJL/EKg2JnQPKNoUvCAlzY1yEXRujErimezS1T5UokeGQmy7ARK4+M8khPjQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1728466656; c=relaxed/relaxed; bh=4ZVfjGhflHfGjMb2cztN4jQiMEIBwPHrnxrWordVKqU=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=iF/LyTz4N0oWrHU8zygCOmozSBULU47tYqxnFcJZ/+GkIlQJYug6mFsl3zvYjdUapOW7//KamTlC87+rUh0uJvBpswcpTaT5jrnqnVzmA4hHxridIpYuCLpH1U1rTdkvbraNgTBtfWOzFp0E2SiXgbJyfrYjUsd1vpslulN1Q+zwHtTF+hXvYVo1aMIVEVfatMlYk2tfEpv78sjVA99wq6bSagVUsXYaPpaW0+J8v0HAYwmPJP8PzSEfF+w2SCo+G/uZm5LKXAhud49Rbfluwpi/+7Xio2fsSkkxJGs3F/9UgfjmRIBMu+feMjDTZ00DB4ToJrP5mtH8j6wXoEQxvg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=U0AoDelL; dkim-atps=neutral; spf=pass (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=hca@linux.ibm.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.ibm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=U0AoDelL; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=hca@linux.ibm.com; receiver=lists.ozlabs.org) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4XNnqM191Bz2yNs for ; Wed, 9 Oct 2024 20:37:34 +1100 (AEDT) Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4998JupJ031939; Wed, 9 Oct 2024 09:36:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date :from:to:cc:subject:message-id:references:content-type :in-reply-to:mime-version; s=pp1; bh=4ZVfjGhflHfGjMb2cztN4jQiMEI BwPHrnxrWordVKqU=; b=U0AoDelLqaa44EBW6dZqg7AEFYaJPvCLUSy9tLId0aj 8JlOE51Kc0a5MDLTOpaQwd4KEqGQiPTv5M1061XfehcubMUVaUdYLT6GlfQFSeQN 5Z8zpgxWEIZD/ouh32gWknvVLyjVttNgWGzL+wu/swygksnBBJvmieePN9zg7aNY oLLDiUjOBOdSmTyImlaqZLpkZK5tCVJt1IFWtDkAGEJEz0CXDL4H1mNC7GbyYC10 WcWHAl60sy5ONQwo/gbWzpBA45OIXsCWSDmVjh29j9ID1gUeSfplamA/ws9yi1Dp oNcIw3bsqjZnzxpkdwSkU7unRupCKSGanvdR5mS7J8Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 425p7r0be8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Oct 2024 09:36:55 +0000 (GMT) Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 4999asFg016952; Wed, 9 Oct 2024 09:36:54 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 425p7r0be0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Oct 2024 09:36:54 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 4998OOFt022844; Wed, 9 Oct 2024 09:36:53 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 423h9k0whg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Oct 2024 09:36:53 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4999anT753870968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 9 Oct 2024 09:36:49 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 65FDC20040; Wed, 9 Oct 2024 09:36:49 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7B7220043; Wed, 9 Oct 2024 09:36:48 +0000 (GMT) Received: from osiris (unknown [9.152.212.60]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTPS; Wed, 9 Oct 2024 09:36:48 +0000 (GMT) Date: Wed, 9 Oct 2024 11:36:46 +0200 From: Heiko Carstens To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, "linux-arch@vger.kernel.org" , "x86@kernel.org" , Masami Hiramatsu , Mathieu Desnoyers , Mark Rutland , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Subject: Re: [PATCH v2 1/2] ftrace: Make ftrace_regs abstract from direct use Message-ID: <20241009093646.8007-C-hca@linux.ibm.com> References: <20241008230527.674939311@goodmis.org> <20241008230628.958778821@goodmis.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241008230628.958778821@goodmis.org> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: _7FZ0KvUpdA6UuJ2HyHknE4GFnL1BOSc X-Proofpoint-ORIG-GUID: JL2StsfsDLVSiBmGN94Yy7wadDz9WkZF X-Proofpoint-UnRewURL: 0 URL was un-rewritten X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Post: List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-09_08,2024-10-08_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 malwarescore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxlogscore=560 impostorscore=0 phishscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410090061 On Tue, Oct 08, 2024 at 07:05:28PM -0400, Steven Rostedt wrote: > From: Steven Rostedt > > ftrace_regs was created to hold registers that store information to save > function parameters, return value and stack. Since it is a subset of > pt_regs, it should only be used by its accessor functions. But because > pt_regs can easily be taken from ftrace_regs (on most archs), it is > tempting to use it directly. But when running on other architectures, it > may fail to build or worse, build but crash the kernel! > > Instead, make struct ftrace_regs an empty structure and have the > architectures define __arch_ftrace_regs and all the accessor functions > will typecast to it to get to the actual fields. This will help avoid > usage of ftrace_regs directly. > > Link: https://lore.kernel.org/all/20241007171027.629bdafd@gandalf.local.home/ > > Acked-by: Catalin Marinas > Signed-off-by: Steven Rostedt (Google) > --- ... > arch/s390/include/asm/ftrace.h | 23 ++++++++++--------- > arch/s390/kernel/asm-offsets.c | 4 ++-- > arch/s390/kernel/ftrace.c | 2 +- > arch/s390/lib/test_unwind.c | 4 ++-- Acked-by: Heiko Carstens # s390