Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5142218pxb; Mon, 15 Feb 2021 10:33:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPpYJfyuji5dPFKh/qQ+hneZ0JwlcrMwp/eaJNLKrEUfLy9pnTpPnjVhZ4UG0xu0er0QeS X-Received: by 2002:a17:906:3850:: with SMTP id w16mr17373885ejc.286.1613414024858; Mon, 15 Feb 2021 10:33:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613414024; cv=none; d=google.com; s=arc-20160816; b=FWEq/9vUYY2lityCfqli4Mo1WtCNDjFXUo5WquP1rLsbga6EvKgNoKMO8lahk/UP6H iJsmuW7XYuoI0WdEwu3/QUGkqv0QZWn4bdGY6cVclk27/owLP/mlxdgjCRRzq6E2XMts OVyG/QUV+UYrPkkBbfFApPOiFYsrBTHKn6mFPhWANhmO6QQnlEHOzVp/Y1rjvd4C0xdD snIsm+mxBxzPFH0+yL8c0tQ7QRflhBCzp7I+2dY5lY2vULOz11XaVrRRrvMdY65EUnm9 5Z5R3zGwRyGAqHS9El61yGQUzMFalX636pKEh6B/f/n94KVUzZor0cwql86YGZJslDGs 8hbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=txjPnO/WEw26xqIpVpPhuE1OXuwFg2SfAzbrnQssS3c=; b=fEqn5F4G+EF/46HqUKu/Df5+RMlhJTg2wI3TetpSFZNN+HeYGuoezM7YAmO74boLPe vFcJe6eo9PSwM0StQvpyIvMLTwYgm1jIXciPiPMnAujuUuhFAtNWlLwjlDX0AGYxwR31 ejbK4ykEpxXefUuDZA7DOR7sENraoWsM3R7Bj5Krssq6lj1S8UW3MKG5tZXVrnU08lGH n/LH2z4EanfRvF3mDNhq7iKcB/9t2T88QdmjWCUSiiVQWcxB49HHctnLKjyqHpULIu17 jlg7M1UQkBo1SjvRgu/vItLBnoZ1Ko0rOYLlwSMNvlzyrS3aKuXlq3w+NPkJ+IOBivaD HSBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZbN4mUOV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bg8si13814889ejb.155.2021.02.15.10.33.21; Mon, 15 Feb 2021 10:33:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZbN4mUOV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbhBOScn (ORCPT + 99 others); Mon, 15 Feb 2021 13:32:43 -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-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?