Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1488271pxf; Fri, 12 Mar 2021 10:37:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfiWCpC4NkqEJmt8oxVDDlWuYz+w0Rg/RAoVqaMt+LLPZ/gKcVcU9Ofxidf7iJTvPTkyaM X-Received: by 2002:a17:907:119b:: with SMTP id uz27mr9908253ejb.464.1615574251161; Fri, 12 Mar 2021 10:37:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615574251; cv=none; d=google.com; s=arc-20160816; b=ZEH7dQVXxn5QtyFDDqeRrp6oWtXBGDyhzhdbNOKgrqwvbSijTMlnrN78j2Zv9KxpGs iMURpnlfAWHh8zIMT54u0YLpZ3dvC21KjP2qWfocN5z+rvrXTr+0Qf+kYnIp0sLf0NR3 DAH3d3eNBp5KhY1jZtS/3jMywepevpJyaCWKzeB/ozOyDN2armTIjGHnp64vPTqglImP CGbu3di8h3YPRBffDGwLAelXoncvL8GfD+Gszvp8mpPuSRwuy1tPDVAyo3flsV1lutcw B5Zd7j0L3Gykw7t7XuPX7Luy6ip+A4UiWssLyIaYhfer3T4QMpeafByCafg+zLaSc8iV 5gkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=edAAh8F5zzqoy3v4SwV/G5d3/7qdwdw3lH+6LgmNvvU=; b=wSkyoGvviSzjs3t78jAVngS99DtxVRA9ZpJ8qxvlQOYvGiEXreH6FFNbp7GrUhiXer 8mgjnLUxJb/rodhUMWTaZr9SHIxdCkSPoKm/kEYMQpE/vW74yWFTkMXRhcFuKG4ghxEm 7bAIdj5RTckX0F4cpvAo9biaB/V4mSyLRm8c1XZ4Z7gt4oPRdnRvClfgJqDgZ1jETAOo imqs1ncOUgZSYb6JZ7ILr4Bw0/5C8uM0IrSOx6sXcoU6fK17RS07a5lwSOsZet3TRRCj 1HbKxgPAf+52Drl7S0CL2R9ylBMvJBe3i8QqP7yTgAVP2dFj6gwrpCAkRX9Kus1hl6gP M22Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U34KQ5Yn; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ju22si4640045ejc.514.2021.03.12.10.37.08; Fri, 12 Mar 2021 10:37:31 -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=@gmail.com header.s=20161025 header.b=U34KQ5Yn; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233603AbhCLSgG (ORCPT + 99 others); Fri, 12 Mar 2021 13:36:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233831AbhCLSfp (ORCPT ); Fri, 12 Mar 2021 13:35:45 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31A70C061574 for ; Fri, 12 Mar 2021 10:35:45 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id r16so1123327pfh.10 for ; Fri, 12 Mar 2021 10:35:45 -0800 (PST) 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=edAAh8F5zzqoy3v4SwV/G5d3/7qdwdw3lH+6LgmNvvU=; b=U34KQ5YnKGn0zaSU1tpcVT9OsTo4BjjeQIZWQBtpwnJdUnvVbmJyjw5dgG9xmgf93B ZbJlINt5l0G2r1298M0241k7Za6h9sE2dRZxB6KTAwu3w1D8AyddHjLcBmsYp/EiepS2 T8MSPWEeDP5SCkwIFvEujrSr2PwhHPWGKtI1pIbwBcN7eklNvbIyYmeDGNRcdDQThO9V NEo+7faY1djzA3T9+X8qUOhR+6nEbLm/jc0OhEQugPnanYGFQMicws4v57p9Yzs0elIH rl8xP2ou8XM8dTtlmV6yfoZ+R2arMKSIza8JxPyg0Zfj5UtC25/1YRfrNevsb1rRlvi2 Z7og== 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=edAAh8F5zzqoy3v4SwV/G5d3/7qdwdw3lH+6LgmNvvU=; b=HRxZJqgIicM7RJmFaBcWpIi3xBw4RxRcdY/6N6YVHOCAIVYfRX75EqMCdJJxILyIwM fR1zzXp8wBAYzPfVGpw7QOnNxrMw65w88C3rpvjwxTgH2QrwcxN8Tkr8PuRCXccujdKg ZRkm8wWjAlL5EEdRx1v7/S5QC4qRMbdn2rWDFC513qlFUoCjnPF46zEG6fSFMhSOKgQo LzIqrb17ESGgtAbfw2NQCAWV8C+qakkHFISwHQhcCxMnG8AKIB9H7bRqJV+6/irDmzfk kHMivVQIynxnplwxNi9lr1CIH4UVvAKdNQqS7uViXqEC2j9Xxm7wwtJhRpKgyIbwWmOk XLdg== X-Gm-Message-State: AOAM531Y+7AHlMvbrE+RgofhN4IljtC966m3UMJ4eeWGQK3mTXfQLzAV kmg70YBBbEYC7Fubj5zxbOw= X-Received: by 2002:a65:6a0c:: with SMTP id m12mr12790546pgu.161.1615574144672; Fri, 12 Mar 2021 10:35:44 -0800 (PST) Received: from [10.67.49.104] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id p17sm2888834pjv.49.2021.03.12.10.35.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Mar 2021 10:35:44 -0800 (PST) Subject: Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support To: Qais Yousef , Alexander Sverdlin Cc: Steven Rostedt , Ingo Molnar , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ard Biesheuvel References: <20210127110944.41813-1-alexander.sverdlin@nokia.com> <20210127110944.41813-3-alexander.sverdlin@nokia.com> <20210307172650.uztx3sk5abybbp3f@e107158-lin.cambridge.arm.com> <0c122390-6e76-f773-86e9-8c085f4384f2@nokia.com> <20210309174201.n53za7mw33dqyleh@e107158-lin.cambridge.arm.com> <3eecf51d-b189-9e8b-f19d-a49d0764aae5@nokia.com> <05608bc8-f44d-5f91-15ab-af00c59b53e6@gmail.com> <20210312172401.36awjh4hmj4cs6ot@e107158-lin.cambridge.arm.com> From: Florian Fainelli Message-ID: <134e1a2c-daac-7b00-c170-bcca434d08df@gmail.com> Date: Fri, 12 Mar 2021 10:35:42 -0800 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: <20210312172401.36awjh4hmj4cs6ot@e107158-lin.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/12/21 9:24 AM, Qais Yousef wrote: > Hi Alexander > > On 03/10/21 18:17, Alexander Sverdlin wrote: >> Hi! >> >> On 10/03/2021 17:14, Florian Fainelli wrote: >>>>>>> I tried on 5.12-rc2 and 5.11 but couldn't reproduce the problem using your >>>>> I still can't reproduce on 5.12-rc2. >>>>> >>>>> I do have CONFIG_ARM_MODULE_PLTS=y. Do you need to do something else after >>>>> loading the module? I tried starting ftrace, but maybe there's a particular >>>>> combination required? >>>> You need to load a BIG module, so big that it has no place in the modules area >>>> any more and goes to vmalloc area. >>> You absolutely need a very big module maybe more than one. When I tested >>> this, I could use the two proprietary modules (*sigh*) that I needed to >>> exercise against and loading one but not the other was not enough to >>> make the second module loading spill into vmalloc space. >> >> Here is what I use instead of these real world "proprietary" modules (which of course >> were the real trigger for the patch): >> >> https://www.spinics.net/lists/arm-kernel/msg878599.html > > I am testing with your module. I can't reproduce the problem you describe with > it as I stated. > > I will try to spend more time on it on the weekend. Alexander, do you load one or multiple instances of that fat module? The test module does a 6 * 1024 * 1024 / 2 = 3 million repetitions of the "nop" instruction which should be 32-bits wide in ARM mode and 16-bits wide in Thumb mode, right? In ARM mode we have a 14MB module space, so 3 * 1024 * 1024 * 4 = 12MB, which should still fit within if you have no module loaded, however a second instance of the module should make us spill into vmalloc space. In Thumb mode, we have a 6MB module space, so 3 * 1024 * 1024 * 2 = 6MB so we may spill, but maybe not. I was not able to reproduce the warning with just one module, but with two (cannot have the same name BTW), it kicked in. -- Florian