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=-7.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,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 32A8DC433DB for ; Tue, 30 Mar 2021 18:59:12 +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 AADAF61957 for ; Tue, 30 Mar 2021 18:59:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AADAF61957 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:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d3ZYVglSqi6v22Sn5R47BVBrOacvlH5gInox6/tQVxk=; b=W2NO1M258uB2UUcnQnSY6pz5v Ru53c8AXNG4B25MUlnjqn0/D3oficEB9cxtEFAmbesEzacAfgptcscSvsvZtTO5PsdK3PA1jbetyy 9EamNELEryWY3rs4M0uTzWeZKtJzYboN8CyEwZu7PArQBiACVBujuKot8aQGMtTBr5vXi5fjHzYzc te7hrU0C0Ph/VqtKcoL8HBCarkyaXTX/6Sryitl10pIlgyWo1plqwQQJwfEyCVX5dGmnOh71Qdu/C aSJVQ/d3ZuUgUSkfir1j/2lmfqcUFEijazTaCPH+8q4WU3Hmvx4Dx2WDWcBLmAFNRnumsQQKfYyiE zhhxORdCA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRJYO-004fdN-M7; Tue, 30 Mar 2021 18:57:28 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRJYI-004fcV-2M for linux-arm-kernel@lists.infradead.org; Tue, 30 Mar 2021 18:57:25 +0000 Received: by mail-pf1-x430.google.com with SMTP id v10so7422235pfn.5 for ; Tue, 30 Mar 2021 11:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Im8HC/95If4NF2ZyRBUTtbjnh4iyHk5nc6Niu3yE2kI=; b=YsWI6d8pVBmK2DRUAL5G8nV9RK6/pwZizWuNl2Cnnc8b4vVFKwhu3+FxQ6eCd7/L6U 19afu5ezM0U55CeLbw1D5UotMJt8PpcyNoCniEPtTO55LGgd3ozVlWl0UDAwL00pq44N Ja9ZoPhWtRXulEvjDlwza8WtMwZeuvPeHQtXMgAUONcM+/D4jLFd9su0N6CT8fehVPdl MqiJdegD/412zf9atKd5+I+6p/MidACqsSsn9Vn8D+EFWs6T5v0+9j1SG1WmjLOQx9UI +gES3Mdiib2XCkFNNtcRpqDRvhwkD7Mx104iW9gB9TBecfKtRfCjTNFPDKtI1iYlqlEH VIZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Im8HC/95If4NF2ZyRBUTtbjnh4iyHk5nc6Niu3yE2kI=; b=s/33DYCvfG5kFVhEAMGrFg/CsyiZ09HIhuvmfTr5ZyRiKLAKY9iZ9/sce6MPPCdyCp JrPgZww97laCrSVEvW0f/aSNE2nmnp72+aGBROUrQ0so0F8EiLv1pPXAuavtWUH26y4a dnm1RtlmcY1rgtGWMbmjUpC+xJ6X6U/hJQF9oaqGiAonwKWP4WSDISSh15l375FvkPM7 wop5wiz5do87Hzn+R4pznOLFyRjkMKiD5Wwxefa5WevnWCAz8VZzYIlytTojE6j7rfGZ PTSk3ZD96tH0lpgy7ZYK1mp8JcTDG2+qZ91QylyVEsyW1OO5+0655FlNcgaZK6CMO4Zg 70vg== X-Gm-Message-State: AOAM530jyRZCTIzFxPs35Jp2s/mzyRQi+ZXT43aAJIgBca31T+Q73Wpl 7BgtlBxGRo1WABJScX4Qiag= X-Google-Smtp-Source: ABdhPJzDsnHRJPC0VL0EvMfo8p++K+IryJt+5Vns0bWCn0Pjibss8aTUDVXbOIbi7JKF5BgTYYjVQg== X-Received: by 2002:aa7:9e43:0:b029:1f3:a2b3:d9fd with SMTP id z3-20020aa79e430000b02901f3a2b3d9fdmr31780722pfq.74.1617130638779; Tue, 30 Mar 2021 11:57:18 -0700 (PDT) Received: from [10.67.49.104] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id w5sm21593939pge.55.2021.03.30.11.57.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Mar 2021 11:57:18 -0700 (PDT) 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> From: Florian Fainelli Message-ID: <9bce83d4-a493-eb26-3fa0-344e863826c7@gmail.com> Date: Tue, 30 Mar 2021 11:57:16 -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-20210330_195723_444276_AFBA1A03 X-CRM114-Status: GOOD ( 21.27 ) 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) > > Alexander Sverdlin (3): > ARM: PLT: Move struct plt_entries definition to header > ARM: Add warn suppress parameter to arm_gen_branch_link() > ARM: ftrace: Add MODULE_PLTS support Tested-by: Florian Fainelli Thanks a lot! -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel