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 X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48B16C433DB for ; Wed, 24 Feb 2021 21:27:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 033E064F0D for ; Wed, 24 Feb 2021 21:27:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235967AbhBXV1P (ORCPT ); Wed, 24 Feb 2021 16:27:15 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23730 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232245AbhBXV1L (ORCPT ); Wed, 24 Feb 2021 16:27:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614201943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MUUlZYULShVGQbqbmrqnJUK4YSqsVE96ayCUiq89EBo=; b=CMHWR3gCqv/25h+XponFIGP6LjxiGKhqiOsGmX8V2EcwT5hVzV5RrufZ/rn5OSK9IeAlSD pkj7kn+n628X083DERWuuJseOJJCMIpxCKs33kfUsVqcPzaHTJeA35VO4Yul6tvnh7PBZG CLSSEy5s/dqCeDrPATkqO6RCqN3hgvY= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-5-jyaD6sEkPuW_sMinYU0D8Q-1; Wed, 24 Feb 2021 16:25:41 -0500 X-MC-Unique: jyaD6sEkPuW_sMinYU0D8Q-1 Received: by mail-ej1-f71.google.com with SMTP id p6so1428499ejw.1 for ; Wed, 24 Feb 2021 13:25:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=MUUlZYULShVGQbqbmrqnJUK4YSqsVE96ayCUiq89EBo=; b=FU/hwCUYIXsbiFtXXy7oiMLqeiK5TaML1wDoRmuslMzy79hnhbNJrkjLp7CGdPxvac dSXBMSINZ/4rDirtcQG58S+FgTATCf6HbxTOfMTTRAr+AvDLgK06/MbHq4fQmEZWMeMO XPEEKEwwjg6KrMWHyOe1/hJwhL/WpXNJUbmKcgl48xjtfnhJF/vxj4Tim/fUoANZ3qA0 xYI0gBeE+LbND7/D/4DGvY6dmcbRkV+jq35Yfs/tYwNhcLTSjWt7eokBJee1qn/pUYIq x6Xx6pCf0uuIpWgQ68bmd59D3jholQVJrzIRhnNtJ6e1m4Kh5rsUl+mD83vFolhhj17h AEKQ== X-Gm-Message-State: AOAM532r35MckDGAyFP7cACPmAhyYZ0NWC531KX4XGaqi9TN/3bjZKsJ 3UbM9PLLei/mRwabbO5Kze0N/M2IaquOmYLPNi6/0Pr5wMiAQBVQRje5xPzW/yMhtIoM6xjosgS uO66LlvyqyB1Y X-Received: by 2002:a17:906:2e91:: with SMTP id o17mr29539019eji.488.1614201939632; Wed, 24 Feb 2021 13:25:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxY34lO9NwD1FrPh/fWViZPF8MDAlCcW896jBsrXPWjuY8ikLTSXrf5U8+2nSSV9l1g2+DuQA== X-Received: by 2002:a17:906:2e91:: with SMTP id o17mr29539003eji.488.1614201939348; Wed, 24 Feb 2021 13:25:39 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id y8sm2214305edd.97.2021.02.24.13.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 13:25:39 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 9B3E3180094; Wed, 24 Feb 2021 22:25:38 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Daniel Borkmann , Luigi Rizzo , Jean-Philippe Brucker Cc: bpf@vger.kernel.org, kpsingh@chromium.org, will@kernel.org Subject: Re: arch_prepare_bpf_trampoline() for arm ? In-Reply-To: <6af0ab27-48f1-e389-d2f4-41b3c1db4a18@iogearbox.net> References: <6af0ab27-48f1-e389-d2f4-41b3c1db4a18@iogearbox.net> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 24 Feb 2021 22:25:38 +0100 Message-ID: <87blc92m5p.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Daniel Borkmann writes: > On 2/24/21 8:54 PM, Luigi Rizzo wrote: >> I prepared a BPF version of kstats[1] >> https://github.com/luigirizzo/lr-cstats >> that uses fentry/fexit hooks to monitor the execution time >> of a kernel function. >> >> I hoped to have it working on ARM64 too, but it looks like >> arch_prepare_bpf_trampoline() only exists for x86. >> >> Is there any outstanding patch for this function on ARM64, >> or any similar function I could look at to implement it myself ? > > Not that I'm currently aware of, arm64 support would definitely be great > to have. From x86 side, the underlying arch dependency was basically on > text_poke_bp() to patch instructions on a live kernel. Haven't checked > recently whether an equivalent exists on arm64 yet, but perhaps Will > might know. Adding Jean-Philippe; I believe he is/was working on this...? -Toke