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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 5D34FC41620 for ; Tue, 2 Mar 2021 09:21:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E87E60202 for ; Tue, 2 Mar 2021 09:21:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1837873AbhCBJJE (ORCPT ); Tue, 2 Mar 2021 04:09:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382126AbhCBI4E (ORCPT ); Tue, 2 Mar 2021 03:56:04 -0500 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CDFCC06178A for ; Tue, 2 Mar 2021 00:29:33 -0800 (PST) Received: by mail-lj1-x22e.google.com with SMTP id u4so22868668ljh.6 for ; Tue, 02 Mar 2021 00:29:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=utqGY5cHJGpeykyhF1N+7GUgps/CrUwDpi2Q9PzRkfg=; b=CQyvI8BDuYTfYo/6YxOrw0FOl8KlVwbEEsSP05Ogpw5qST3Hp22oQi/5MYFh31wT4A xamvX6HPG1tTBNu6VaM61q2f94IrAW4DrnJ0BudiccRa4fBeHON+7VKccyclSHq0JAYm kvJm2AnJH4ueoHK6OthhSVTWD7m0Mg5s8hot+lt8mJWvpP/8CxOilFzhsXll2j5Sfzix 1uY6a0cO9VkjaiwKk7dbUrQfhUkL3LnU1dCyP1O9wI3Uu0zPBMQ5nzwnPdnqhpoJqSvh A7/o3oDGJ9Nd9wJ9obus4sTIw0K3AEKdFUib1MBYLG3CtvaegtIiU0LLSH1jZRYzE9BU Q95w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=utqGY5cHJGpeykyhF1N+7GUgps/CrUwDpi2Q9PzRkfg=; b=NAvOYdAIrQQznCEcJIUPRyCnFu9WaLaKLHphlG9fKG2+JNSsqOI3X1THs06Taj6ml4 367BpmXIGBRDVuJAX4WwUNt5qndcZ16BJso3Ed4q3Jwkug+Gz8Pdaf+wFqXtvGO+dmxS /6Ie2QutmsE669w6X8ZxvHkus7GAzOoBDJrjuDeWuyDEL2hxCvAIWAdGyUPhPiFRmfgQ uyQbJSCefIFawCoujgIrKCZDBD2rAici59Y/m0czi5TV1ENG7lOJX49ZYP7w/BbBeKwD ju9CK5JcdH54YeqjR6AslezwT2jOGBdKMX1QdwLZfFhZ4G9o2FCgf2tkTh11gIAuvfZt 7R/g== X-Gm-Message-State: AOAM530uSuH5voyeI4nG2rJZ/b8EO4SSROwu2nz7C4l0WPucCoR+K4Bw CmloXCmWE+MRDCObpOGqIp1rlmMwMW+34X64dPyf4A== X-Google-Smtp-Source: ABdhPJxR72vTTfxUt4l4sNiq9X5PcO9iZfADvDB1zavjfZN7GGmifNa8Y3+YQzvTc7x3UKFqlKr4bEM4MmxO1Vwizxk= X-Received: by 2002:a2e:864a:: with SMTP id i10mr11032296ljj.467.1614673771930; Tue, 02 Mar 2021 00:29:31 -0800 (PST) MIME-Version: 1.0 References: <20210127110944.41813-1-alexander.sverdlin@nokia.com> In-Reply-To: From: Linus Walleij Date: Tue, 2 Mar 2021 09:29:21 +0100 Message-ID: Subject: Re: [PATCH v7 0/2] ARM: Implement MODULE_PLT support in FTRACE To: Ard Biesheuvel Cc: Florian Fainelli , 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 On Mon, Feb 15, 2021 at 7:32 PM Ard Biesheuvel wrote: > > (+ 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? I can look at them, I just need some starting strip because I honestly almost never use tracing, so I need to figure out how to provoke the error before the patches and then how to test that it is gone after. Any suggestions on a quick use case that illustrates how the problem manifest and how to test it is gone? The errors in patch 2, what do I need to configure in to get them? Does it manifest at modprobe? Yours, Linus Walleij 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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 8C618C433DB for ; Tue, 2 Mar 2021 08:30:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2BB616146D for ; Tue, 2 Mar 2021 08:30:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BB616146D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BsZPDYJTkz3LvC2iThnVKiDVZfSYH7Bo5onqj9Bvfbo=; b=m3MmCFTOdl3ixZCE8NSwzmo97 tVGIdzQigFRk7xT9PdF1oQFWTq3DoOA4V0bakBj5mCT185c2is1XmHI2RkHoTSFBLadEqiyvqZEVm dNw+9xtYQ2nlgmHOvVbT2j5KRQ8Q/6UY4G3WGnUxmMfPgtpn3L7cEQshBDY78C/xzI/d/2vtY+2PB 9z/XRethag4y7GYhP+OWQGTWN8hp4ogQ3Z73+nOz2YyVIBQ44uzakVa2wrkB/qKQAqKPF+ZQxYzbd rSVuIP5I9qyYnjm/re7me7eEI3lw2s7tPiYEBF/jsCdr9xOtgItygVkGMV+MEDjF0r73piKjcS88j D0w6OKs8g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lH0PQ-0002Vo-KP; Tue, 02 Mar 2021 08:29:36 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lH0PN-0002VN-ES for linux-arm-kernel@lists.infradead.org; Tue, 02 Mar 2021 08:29:34 +0000 Received: by mail-lj1-x234.google.com with SMTP id r23so22873096ljh.1 for ; Tue, 02 Mar 2021 00:29:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=utqGY5cHJGpeykyhF1N+7GUgps/CrUwDpi2Q9PzRkfg=; b=CQyvI8BDuYTfYo/6YxOrw0FOl8KlVwbEEsSP05Ogpw5qST3Hp22oQi/5MYFh31wT4A xamvX6HPG1tTBNu6VaM61q2f94IrAW4DrnJ0BudiccRa4fBeHON+7VKccyclSHq0JAYm kvJm2AnJH4ueoHK6OthhSVTWD7m0Mg5s8hot+lt8mJWvpP/8CxOilFzhsXll2j5Sfzix 1uY6a0cO9VkjaiwKk7dbUrQfhUkL3LnU1dCyP1O9wI3Uu0zPBMQ5nzwnPdnqhpoJqSvh A7/o3oDGJ9Nd9wJ9obus4sTIw0K3AEKdFUib1MBYLG3CtvaegtIiU0LLSH1jZRYzE9BU Q95w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=utqGY5cHJGpeykyhF1N+7GUgps/CrUwDpi2Q9PzRkfg=; b=jLIsCHNx0XaisBbKOqD44t1tFZpe3KqsFXmq+PbOXfrtEQNRmlHMNoJzTiWzuz+Q2J KBSUJu+Q/6va1DPDiIUxKgLQpZYvT32iL4wSs1RXYCsL6iCOY+F3W0txGaZ1I6LCPuDv hbIWvMAAmMIXbApZYY4h9Pf/9xw8OtBjOCdtHCgU0ciECBWTEjMlwIfHGb49HP8PzQ8q XZj/+gpmqmF0+ENbuYpdoIOz86sRgof0jcIvFiqaxUZv47wO92CJeu2Oahy/xaz5TCtF gaZaGqpxoceUNY595VDE2H/VnXsNJbv5tzOOzounUwSpOoCdcJ4rZ6YbBT6GUchUwQYX YRIA== X-Gm-Message-State: AOAM532ntFW/ujAvLPiA0d67vYdUqnCwl3y4J2wFNC3y196nzg+Xg0wZ R3ipIJrx6fcIi+SB15wWoETZsmJOv57U50EQl1G0JXo3P/98iA== X-Google-Smtp-Source: ABdhPJxR72vTTfxUt4l4sNiq9X5PcO9iZfADvDB1zavjfZN7GGmifNa8Y3+YQzvTc7x3UKFqlKr4bEM4MmxO1Vwizxk= X-Received: by 2002:a2e:864a:: with SMTP id i10mr11032296ljj.467.1614673771930; Tue, 02 Mar 2021 00:29:31 -0800 (PST) MIME-Version: 1.0 References: <20210127110944.41813-1-alexander.sverdlin@nokia.com> In-Reply-To: From: Linus Walleij Date: Tue, 2 Mar 2021 09:29:21 +0100 Message-ID: Subject: Re: [PATCH v7 0/2] ARM: Implement MODULE_PLT support in FTRACE To: Ard Biesheuvel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210302_032933_519033_8F4ED86E X-CRM114-Status: GOOD ( 24.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Russell King , Steven Rostedt , Linux Kernel Mailing List , Ingo Molnar , Alexander A Sverdlin , Linux ARM 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 Mon, Feb 15, 2021 at 7:32 PM Ard Biesheuvel wrote: > > (+ 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? I can look at them, I just need some starting strip because I honestly almost never use tracing, so I need to figure out how to provoke the error before the patches and then how to test that it is gone after. Any suggestions on a quick use case that illustrates how the problem manifest and how to test it is gone? The errors in patch 2, what do I need to configure in to get them? Does it manifest at modprobe? Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel