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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 B1BCCC433E0 for ; Mon, 15 Feb 2021 18:32:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7432A601FF for ; Mon, 15 Feb 2021 18:32:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230172AbhBOSco (ORCPT ); Mon, 15 Feb 2021 13:32:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:32928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbhBOScm (ORCPT ); Mon, 15 Feb 2021 13:32:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4C64264E2B for ; Mon, 15 Feb 2021 18:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613413921; bh=txjPnO/WEw26xqIpVpPhuE1OXuwFg2SfAzbrnQssS3c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZbN4mUOVX2QH6WvDX2Kefj4kv0QwrcnZtlcFFRJ95ciz6GUaEadkCtTyAdFGsbcGg gavn80uR75+oslSxe9Wgo7GaoTqXN7IkGveCn+FZLOVBtKDdMVNyMr4mN2J/oE5a7y PfWFXLqLy0EtNW4ESgmTuauYhffOab1Hq0THpB/WIuZzWRaCtmKiwb0FhSr6rBRSJF YtFrKN/YBrWR0XH1TdiH2GPN0jNc7Mg84mzH48PuhbSwdpqcK3LwN7IKVRc0HvhdbU iAI/m64ztoEfS9Nb6rAdm7teCmGRe4IEa1AYBEtBGSS5dxDWmwl0mj4bE/Lgj3NIWW aiTexE933Hqnw== Received: by mail-ot1-f41.google.com with SMTP id r21so6827082otk.13 for ; Mon, 15 Feb 2021 10:32:01 -0800 (PST) X-Gm-Message-State: AOAM533mucdVK8gl1Urn+WkPEMwHCiocJDbT/ypiEvNPq3INvSR+Urtq hHdoapTF/gPXnYdfe9eeCbjbF72fBJcpRzBJ4cU= X-Google-Smtp-Source: ABdhPJxoCxPc0N0GSCMA7s4BheeJzRXgN44kV2i0H6LbkCZrNBOjFYj8EOdoQaYNmG2MS/Kg1gNE2hVbNMrTlyy1roo= X-Received: by 2002:a05:6830:11:: with SMTP id c17mr11961822otp.77.1613413920685; Mon, 15 Feb 2021 10:32:00 -0800 (PST) MIME-Version: 1.0 References: <20210127110944.41813-1-alexander.sverdlin@nokia.com> In-Reply-To: From: Ard Biesheuvel Date: Mon, 15 Feb 2021 19:31:49 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 0/2] ARM: Implement MODULE_PLT support in FTRACE To: Florian Fainelli , Linus Walleij Cc: Alexander A Sverdlin , Steven Rostedt , Ingo Molnar , Russell King , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (+ Linus) On Wed, 3 Feb 2021 at 19:24, Florian Fainelli wrote: > > On 1/27/21 3:09 AM, Alexander A Sverdlin wrote: > > From: Alexander Sverdlin > > > > FTRACE's function tracer currently doesn't always work on ARM with > > MODULE_PLT option enabled. If the module is loaded too far, FTRACE's > > code modifier cannot cope with introduced veneers and turns the > > function tracer off globally. > > > > ARM64 already has a solution for the problem, refer to the following > > patches: > > > > arm64: ftrace: emit ftrace-mod.o contents through code > > arm64: module-plts: factor out PLT generation code for ftrace > > arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels > > arm64: ftrace: fix building without CONFIG_MODULES > > arm64: ftrace: add support for far branches to dynamic ftrace > > arm64: ftrace: don't validate branch via PLT in ftrace_make_nop() > > > > But the presented ARM variant has just a half of the footprint in terms of > > the changed LoCs. It also retains the code validation-before-modification > > instead of switching it off. > > Ard, Russell should this be sent to the patch tracker? Apologies for the delay. Unfortunately, I don't have time to review this. Linus?