From patchwork Mon Feb 6 11:27:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rong Tao X-Patchwork-Id: 53188 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2181987wrn; Mon, 6 Feb 2023 03:35:43 -0800 (PST) X-Google-Smtp-Source: AK7set9AbKidwuGUc3uAgeF+ID/iBgmTBH1ogKOuR2kEhqGegCyvxVTE1kELgHRmgcuTPAcQy7vB X-Received: by 2002:a17:906:2496:b0:86f:5636:4712 with SMTP id e22-20020a170906249600b0086f56364712mr21072582ejb.7.1675683343410; Mon, 06 Feb 2023 03:35:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675683343; cv=none; d=google.com; s=arc-20160816; b=L/3s5nzD9iLmegC7m+PcLP9G7enlbGqT2I70jpbjfoGKkniWtV/cWXqPSgQgoaxzHx O6bSPkTWqhumVS/wXaZaDCXZJSVGXYFvFrmflJ8c7Dxci6hXoFKHQ4DqtcRNuq+05ZZ2 fTnMQ3QXWt4IAyvVhKT0vvbA4lOiUZQOSCnIFCZ6Y3MkC+gK3Hjn8dL4gj9LwL4bc/sl ScAqbXoihPOZS+qz9k/JQ/vWysL8ZbG9FxFhb5k2oIvtqPagqJzur0Tf7klzLOyaMldr Pv1F8GASmprNoH/4CPY9mHdDLTPqPNwZYO4bi8q1fUUqY1l2Y0q00jaAkvWHXmzKDKcH Hu+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :subject:cc:to:from:message-id:dkim-signature; bh=m8lE4c/d0lvFPxY+CJ5u1aKGsJRsL83fBiMpukDEoQs=; b=UzPwU9tuzBLSXQ702nY99XlRA3z4kT8OxNmIv0DrYVwIeTZAU/k1RFFh6dspkkkdn6 InRSd9wzGJjArB12ghMrHomOiTT1DDDRh/j9JYgjdy6+IKODfcDH4qERzKFWkCMLmPfq Jq5evM1imuorYoEA4GCU1L1r8iYhoz+KprxXXYDm0fMTEZiJHcBvPKjBdcdTXNmAnScY B/t3GqdhqxK0GSN3f20Bbp4oI/zaU02SPlR5BtnLno32Mc0p5VgvQclvaChq8ni0wHY1 bBO68wb7ty7IzU3SaIctpaug/02yLqXCWUzI4gh76ElTjCs3apJ6U9KxCTeVO3Q5Hxvq wEsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=OeTA8scC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id uk19-20020a170907ca1300b0088e2856292csi11141177ejc.625.2023.02.06.03.35.19; Mon, 06 Feb 2023 03:35:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=OeTA8scC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229934AbjBFL2P (ORCPT + 99 others); Mon, 6 Feb 2023 06:28:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbjBFL2N (ORCPT ); Mon, 6 Feb 2023 06:28:13 -0500 Received: from out203-205-221-239.mail.qq.com (out203-205-221-239.mail.qq.com [203.205.221.239]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 540F518162; Mon, 6 Feb 2023 03:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1675682882; bh=m8lE4c/d0lvFPxY+CJ5u1aKGsJRsL83fBiMpukDEoQs=; h=From:To:Cc:Subject:Date; b=OeTA8scCOayel03cSxS8hrqzqH+OpxuHnq17tUPvBZn//gadZkNdp/cpyxuDPPF8m tk/lzsndZCZFA7nGk6Yn1im85cvXBzy2rncNG+lUeGu01lTDFio8emQtMw40ImYPsQ SLx6Ys6xecGD/kd6tSct3nxOMyLvgMCBnSPd1LyE= Received: from localhost.localdomain ([39.156.73.13]) by newxmesmtplogicsvrszc1-0.qq.com (NewEsmtp) with SMTP id 6FAA900C; Mon, 06 Feb 2023 19:27:58 +0800 X-QQ-mid: xmsmtpt1675682878t3f71k036 Message-ID: X-QQ-XMAILINFO: MOZWoti2yOjRjo6wOkCbZUP9njBujRx4QFk19T5afRKTAYFz+sO/9SegPTNRLO vCg9XniA80NDoMpF6yV0bJEZTmBg70O/oppDr768J5tdnPyujlfxI4nrFW2j8CmkZleFLjql7cNo I1m/lPug4nCUUbMSZ0WuOBeaAE3+38//PVR5ZYrCnTbo0NDfLBTGzlWOrs2vcCPPcU+8K639s59P qrNLDsyVef95fo0wiv+vWTs6ycc5zCw2Vx5GYH8i0DAa6/eCE8ldRi6Z8Y6zLaOFXwVRtasIhuJO JzENlwDseFpvJQypCqt8Z7JyigKqriKJiOXAXcNsiNfm8T77QvbagirHYHP4MTZi5TtqSDOh8JwD agH2R0RUx5aaNj5mkLqvpNkfo+IGyPPF4msL6YgvogRiIrXe29ZA3uruuOHlihjghDIwJc/qZ7bG ToHK4FQzcGxRe1SvDM9bsi9g/dABhBb8+wyftOWwJnS50wwXgJnRafd6MKgecitv4k67ahv2bAGi EZlH3t4zPGkZd8jBuhoZj51cnWboSWaHWjLHP76Zlj7i4+4YsFBTkwAxTWAXQVVCpAvIe/CTAPx9 qAr6wp3muKQAsso3LB0F7Sra18bOmLzKJ3G8fVig8gus32Uc3Z76sWETWsAns0vr3anCMzPu1Cq/ 5LW0ol30Wfof82qJVLvM4sgxgyMfgFsqBB2RtrKiBBMfVzcZcs1HiND/dAra0b/nAlyZBsXLAD5j cLtGotImv0G1Qg4ewtCLf30Z/xNr/yU1zmkI48Yg/43DmQtR+JUYNuL7+nMzMav1cp+Vp+chJ0MI aKuPRc0e0m9oh68KTRFusHqniUj/6tEDKj9kYwWEhsWYI25oLSFrMwsHU1DqRH1o6SjdaG5MGMLF iPGBZpLT+rBKP3ntQ7x6BI3kNutr0CxRxr77hBN/TNkgiv6kuESAWOHR9EYI5n0fcscoWc6j3LMs xYYDLkLNW4I5Oymv8TEgiu+BMsjAoBPAkoHQHamiKKm7wiJmL37A== From: Rong Tao To: ast@kernel.org Cc: Rong Tao , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org (open list:BPF [GENERAL] (Safe Dynamic Programs and Tools)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH bpf-next] samples: bpf: Add macro SYSCALL() for aarch64 Date: Mon, 6 Feb 2023 19:27:57 +0800 X-OQ-MSGID: <20230206112757.18550-1-rtoax@foxmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, HELO_DYNAMIC_IPADDR,RCVD_IN_DNSWL_NONE,RDNS_DYNAMIC,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757081337608924120?= X-GMAIL-MSGID: =?utf-8?q?1757081337608924120?= From: Rong Tao kernel arm64/kernel/sys.c macro __SYSCALL() adds a prefix __arm64_, we should support it for aarch64. The following is the output of the bpftrace script: $ sudo bpftrace -l | grep sys_write ... kprobe:__arm64_sys_write kprobe:__arm64_sys_writev ... Signed-off-by: Rong Tao --- samples/bpf/trace_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/samples/bpf/trace_common.h b/samples/bpf/trace_common.h index 8cb5400aed1f..fafc699af0a3 100644 --- a/samples/bpf/trace_common.h +++ b/samples/bpf/trace_common.h @@ -6,6 +6,8 @@ #define SYSCALL(SYS) "__x64_" __stringify(SYS) #elif defined(__s390x__) #define SYSCALL(SYS) "__s390x_" __stringify(SYS) +#elif defined(__aarch64__) +#define SYSCALL(SYS) "__arm64_" __stringify(SYS) #else #define SYSCALL(SYS) __stringify(SYS) #endif