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=-2.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 3220FC433ED for ; Thu, 1 Apr 2021 23:57:05 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA3B761107 for ; Thu, 1 Apr 2021 23:57:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA3B761107 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: Cc:To:Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=H2iyCFIhhmqouxUtZCw/ahtdg4CGzbpYFlVeZM1py+g=; b=gkEKBX3Im0IuZ1ujJHxewJAKv URcifufiuDNIx/BoayD8kw2Nl/p1hyncJ9nPLGbpCXNMqyJhD/0ekqDqN+OGH0vf1vNAe4AvaJmhT WckYISAfLDnFoQdDrJ0wKfD1V3ZAN4oaqodns3JvPKwdKL+mbna2DQPc5DYDrVQdhzrxmOaVQ0HgV LyHD7zaifpNVzyvW22PSMaOLpe31YMa+ol6RIqB3pnrb9kHeNKBtRHfYWyPf7EVRqjFhdN5u+eV2Q UDmYQoTs+aQYxUSrLhYAygY3mZajAo14gvdU9xbceaa6JoxjPQBPU2H2971pG0PFaMNsquo/ILT4H x5qk2n9hg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lS77M-00BQJj-1L; Thu, 01 Apr 2021 23:52:52 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lS778-00BQIe-3c for linux-arm-kernel@lists.infradead.org; Thu, 01 Apr 2021 23:52:42 +0000 Received: by mail-pl1-x62d.google.com with SMTP id l1so1758196plg.12 for ; Thu, 01 Apr 2021 16:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SEHNUE5bPreCk0YNPUlKmfUdSYB5CVpf+CCeqNykU10=; b=J7xW51CzYpZjYXmWQCq34hmEsImnvM5EBx2wI1bgXtbsw6s2Oamp64yTcGoDbiOvis V1YvW3rn/1DOyHFJn3DfArOwMa00YQbA+nIMr+CY31DoO4xniAPSGfG4DWhgf15qdtfW dQ3Cc2fTIFX+grA2YRgCoJvCMQfAx8hFhvvkqBbBOyscRyGPNJu8w0/q+G2SEc9iIBEa 47L3zguwbA/shghY9ja8ylRWn6yRKZPIC64KQnbGdBXWHZjzEbF4vnjKKYpFAqQhpHIg WbX9i6VAFejIDGzrFQC3Dj877LrFcCInLTPRU/nUAdIjvEaxCRefigmg/3vURoU8wDIH 5f+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SEHNUE5bPreCk0YNPUlKmfUdSYB5CVpf+CCeqNykU10=; b=B5DygErAEJEdkQqwk+t4XfPgJZ+iRFNBGMUp8UUPcCPINxdg96q2y8BmOreH2GEYyi 7ovEULYnFVGoyZv80pfAwLQqJv93gbmzC7ARCuA5bM/EaYJTMU+IaK8o/VIcKaMK2LN9 EyA7/1+QMh+8tOKmFKpwkzTfWKSHAtfj5R2/DaKtU1ysBXGncAbquCrNzFznKoprGBx0 L1jivnyb44e7YceA87XwzG+Af/UzgH9C6ov6cwrSacn8dgtddJQstMp8fQU/Z4NkP/Tb hPEqoZ/608szb8AwEQYYWdMPhywIG3j1Oh0CeqwpeIcgnWrQKltz/PAzlIWLASBs72BP zHDg== X-Gm-Message-State: AOAM53068v4oeHBwqkdQJTD86nVn5++hmCZ2eb8h07dVfp/WYDP+7mYt 8mnbyw0vlxQtIRRNAvuvXnY= X-Google-Smtp-Source: ABdhPJzNiOp2cAnGCHyj7/uXJ9wcoFfJleqTzORqEIdPeCI6Bx6CnXw9OJErXWedP6MSwRmt7Lbcpg== X-Received: by 2002:a17:902:7d8d:b029:e6:4061:b767 with SMTP id a13-20020a1709027d8db02900e64061b767mr10150510plm.32.1617321155872; Thu, 01 Apr 2021 16:52:35 -0700 (PDT) Received: from [10.67.49.104] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id d2sm6237968pjx.42.2021.04.01.16.52.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Apr 2021 16:52:35 -0700 (PDT) From: Florian Fainelli Subject: Re: [PATCH v8 0/3] ARM: Implement MODULE_PLT support in FTRACE To: Alexander A Sverdlin , linux-arm-kernel@lists.infradead.org Cc: Steven Rostedt , Ingo Molnar , Russell King , linux-kernel@vger.kernel.org, Ard Biesheuvel , Qais Yousef References: <20210330114035.18575-1-alexander.sverdlin@nokia.com> Message-ID: Date: Thu, 1 Apr 2021 16:52:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210330114035.18575-1-alexander.sverdlin@nokia.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210402_005240_655223_7711C888 X-CRM114-Status: GOOD ( 21.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/30/21 4:40 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. > > Changelog: > v8: > * Add warn suppress parameter to arm_gen_branch_link() > v7: > * rebased > v6: > * rebased > v5: > * BUILD_BUG_ON() ensures fixed_plts[] always fits one PLT block > * use "for" loop instead of "while" > * scripts/recordmcount is filtering reloc types > v4: > * Fixed build without CONFIG_FUNCTION_TRACER > * Reorganized pre-allocated PLTs handling in get_module_plt(), > now compiler eliminates the whole FTRACE-related handling code > if ARRAY_SIZE(fixed_plts) == 0 > v3: > * Only extend struct dyn_arch_ftrace when ARM_MODULE_PLTS is enabled > v2: > * As suggested by Steven Rostedt, refrain from tree-wide API modification, > save module pointer in struct dyn_arch_ftrace instead (PowerPC way) FWIW, ftracetest did not pick up new failures (nor were new tests fixed) with this patch series. -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel