From patchwork Tue Feb 8 05:16:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 12738174 X-Patchwork-Delegate: bpf@iogearbox.net 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 778D2C433FE for ; Tue, 8 Feb 2022 05:33:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347311AbiBHFdC (ORCPT ); Tue, 8 Feb 2022 00:33:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231928AbiBHFRT (ORCPT ); Tue, 8 Feb 2022 00:17:19 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06D4CC0401E9 for ; Mon, 7 Feb 2022 21:17:18 -0800 (PST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2182vtBu025085; Tue, 8 Feb 2022 05:16:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=OfZ2A8pNBUxjU7a573k+SrAK7tklcNFpvz8Dy+qmXxg=; b=plojP7d+CDDbHXx1vZ40Bq5G2NbZXEwxcoa6Ju8T+nXl4C2DWrHZGZgZPq4vRFr2dAtY gjUa6CQ4MmOxXseK4PlxIbBMYYAWe8G6wvWCElfB1bBrG+9jgRQxBPU00gGBTcYV3UL1 MVQX34slOCkI57cos6dz9kmU27dE/4b6nyfURi2ZLFGImKmkR/DT417d1OKCM/KEh34j LIGhrQdb5+UG6jrbfhR3aJH2FPjDuyG5SSDUIAtBYcoyVHM5b09XgPv+eZdybVgDWplj /Q2+ulE5N9DFU2kVo1UIV8IhvzFYaNnq/EV6nKooW37bP+QrxjuFnMcpo1QLlK3TLlW4 Kw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e22tr82ns-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Feb 2022 05:16:59 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 2184tgIw029292; Tue, 8 Feb 2022 05:16:59 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e22tr82mj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Feb 2022 05:16:58 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2185CRio022062; Tue, 8 Feb 2022 05:16:56 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06ams.nl.ibm.com with ESMTP id 3e1ggjtf45-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Feb 2022 05:16:56 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2185GqXZ44630360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Feb 2022 05:16:52 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D38A11C04C; Tue, 8 Feb 2022 05:16:52 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 947C711C05E; Tue, 8 Feb 2022 05:16:51 +0000 (GMT) Received: from heavy.lan (unknown [9.171.78.41]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 8 Feb 2022 05:16:51 +0000 (GMT) From: Ilya Leoshkevich To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Alexander Gordeev , Catalin Marinas , Michael Ellerman , Paul Walmsley , "Naveen N . Rao" , Mark Rutland Cc: bpf@vger.kernel.org, Ilya Leoshkevich Subject: [PATCH bpf-next v4 14/14] arm64: add a comment that warns that orig_x0 should not be moved Date: Tue, 8 Feb 2022 06:16:35 +0100 Message-Id: <20220208051635.2160304-15-iii@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220208051635.2160304-1-iii@linux.ibm.com> References: <20220208051635.2160304-1-iii@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: u7QAttY4CSw2Aae2-pKpJ8QkLlbubvmE X-Proofpoint-GUID: JekFZZVgywvkQ5RZ4S1qWww6fZxDAPpn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-08_01,2022-02-07_02,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=983 impostorscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxscore=0 spamscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202080025 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net orig_x0's location is used by libbpf tracing macros, therefore it should not be moved. Suggested-by: Andrii Nakryiko Signed-off-by: Ilya Leoshkevich --- arch/arm64/include/asm/ptrace.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index 41b332c054ab..7e34c3737839 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -185,6 +185,10 @@ struct pt_regs { u64 pstate; }; }; + /* + * orig_x0 is not exposed via struct user_pt_regs, but its location is + * assumed by libbpf's tracing macros, so it should not be moved. + */ u64 orig_x0; #ifdef __AARCH64EB__ u32 unused2;