Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3991538imw; Thu, 7 Jul 2022 10:47:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vUfkMSsdzfW2GMs+Fg55orcbaAfOxRE0zoAOB7Y3p2janEm89Ia7TKLPTZLmdVj8+wd1Lm X-Received: by 2002:a05:6402:274a:b0:435:9807:7752 with SMTP id z10-20020a056402274a00b0043598077752mr66272394edd.63.1657216058207; Thu, 07 Jul 2022 10:47:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657216058; cv=none; d=google.com; s=arc-20160816; b=zmGPRm7nl6wSf3E3MN1V3y16QgwsvChRG19+bmSPsnwSEHTjp6qAjzlNqODYw/bUT4 z5TmD9f0lugE+F+FdDEaBW5jgy7X6iyIuhHVoJvMnZaSLvwMWYHoG1WhCN+iRnlufQe2 JhyTHvCDp5jtqrLsRDxCSjP+D/DcgIUGYUb8HVKIIVw0alfKMjDauvrT/6DT0RrondbK +s89KIIsRcw0l7Hs/N0Mp7IXLlK/iaX2Cici5BZtj0XMMkQFEY3APwM7dNOq/3DdamcF CtlXDb/H74YnxZVmJ1BGYj4TR9Jq+Dk6eEsaP8smOiEkJsulYk1VkP7BvJ/F4cmLzAn+ nuXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=H/z41n38fMrVHxK1y42Tj7P6QUPD60u5+XY8Ng8yfX4=; b=x8Tv1QtTOTEjICwq61Yzl5Ug+Ck9a8hNLwWBjJRcHhx2ejtBVlIeyBCK3vMUcHb2AU zdraEBcn90sy15k19lyIaXLPl3DYvV4efdE66/24wp4vMfOL38yUbseElpgnIxL5GJOi NREDifnkfxjfXbgNtgXft8XLVpgjDh6Ixxhwwy2/8qsI4ZTV9CzWQdBwFjMnfMaC3qIY OYLzsrGEY1MMKCNMheWFVsI9PkOm6NvJgwGc0FVmu1Nw5LIITolhR0mAauIzuehCmc6S 9aHezJo1EPj+0qj3tquvWFPJfvdv04S8abozR+rSv4YcUPTWitlEfbXEe7BzTfSkyOwe 14aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=4Sn1wsXP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a056402268c00b00437652e26b7si41387479edd.294.2022.07.07.10.47.11; Thu, 07 Jul 2022 10:47:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=4Sn1wsXP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235637AbiGGRVB (ORCPT + 99 others); Thu, 7 Jul 2022 13:21:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236314AbiGGRUy (ORCPT ); Thu, 7 Jul 2022 13:20:54 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE5763335D; Thu, 7 Jul 2022 10:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=H/z41n38fMrVHxK1y42Tj7P6QUPD60u5+XY8Ng8yfX4=; b=4Sn1wsXPrs/yPqmi1PLgRr5BWp FHSQgVgDsdRtzm9v9KaJo4XwQvosGgRCB7c7Aj9ffpCIFDLnjZke7fTotJFHHaB3oPbWA0shGuBnZ Qu/XhyKGfvyau20y8SvAUG6NuttXxvPKwYkrbpWh2+fZH9g+37n5HSanJywA/TwDrh1UXDuz+WpMg t9l5gG9ew20hIBgsxIUM1HmFi4Eplosy6rE0RonRn+oVCf3LWSQosjXtELHUJ882+qdzGFUSaPwvF 21DHzBDyfz13iiBdtvfoh8DHWaYMKFlAZK2Gq7gH7w4otB1Q/j1xwhfdPKeGGB8o18f4nvkhbUrsH 3Tc6zh2g==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9VBG-00HCSD-Gf; Thu, 07 Jul 2022 17:20:46 +0000 Date: Thu, 7 Jul 2022 10:20:46 -0700 From: Luis Chamberlain To: Aaron Tomlin Cc: rostedt@goodmis.org, cl@linux.com, pmladek@suse.com, mbenes@suse.cz, christophe.leroy@csgroup.eu, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, atomlin@atomlin.com, ghalat@redhat.com, oleksandr@natalenko.name, neelx@redhat.com, daniel.thompson@linaro.org, hch@infradead.org, tglx@linutronix.de, linux-rt-users@vger.kernel.org Subject: Re: [PATCH v2] module: kallsyms: Ensure preemption in add_kallsyms() with PREEMPT_RT Message-ID: References: <20220704161753.4033684-1-atomlin@redhat.com> <20220707165750.tk4fadpv3d4zr2mb@ava.usersys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220707165750.tk4fadpv3d4zr2mb@ava.usersys.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 07, 2022 at 05:57:50PM +0100, Aaron Tomlin wrote: > On Wed 2022-07-06 10:58 -0700, Luis Chamberlain wrote: > > Hey Aaron, thanks again! > > Hi Luis, > > No problem :) > > > On Mon, Jul 04, 2022 at 05:17:53PM +0100, Aaron Tomlin wrote: > > > To disable preemption in the context of add_kallsyms() is incorrect. > > > > Why, what broke? Did this used to work? Was the commit in question a > > regression then? Clarifying all this will help a lot. > > Sorry for the confusion! If I understand correctly, nothing broke > intrinsically. > > Rather with commit 08126db5ff73 ("module: kallsyms: Fix suspicious rcu > usage") under PREEMPT_RT=y, by disabling preemption, I introduced an > unbounded latency since the loop is not fixed which is generally frowned > upon. This is incredibly important information which should be added to the commit log, specialy as PREEMPT_RT=y becomes a first class citizen. > So, I would say this was a regression since earlier preemption was > not disabled and we would dereference RCU-protected pointers explicitly > i.e. without using the more appropriate rcu_dereference() family > of primitives. That being said, these pointers cannot change in this > context as explained previously. > > Would the above be suitable - just to confirm before I send another > iteration? Yes, I would send this to Linus for the rc series. Please adjust the commit log with all this information. BTW I think there is just one more fix pending from you right? Luis