Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3942439imw; Thu, 7 Jul 2022 10:00:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uvipJtZVfTyWm49J9WdVk0Jdvo23qGdmWr6c+6k1Ba2PX/QXYAGbe3JoM3VNazF3ikVj0F X-Received: by 2002:a17:903:2288:b0:16b:f7fe:9854 with SMTP id b8-20020a170903228800b0016bf7fe9854mr13606085plh.126.1657213227376; Thu, 07 Jul 2022 10:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657213227; cv=none; d=google.com; s=arc-20160816; b=XZ54LubWFceMA3MTnJ9dFsvDAWtbgtqGtQMJi+sRx3n8XUcFXWv6AMSShQzBlqdGY3 q4GThqB9RpijqeHbn3Hjmaug/1ILrZP1FvuEqKhjbwFXHVVnsQNm98xpXQ24o4f/yTXj 8nNAfj+w8WLAUPV4Mk/NTTk7B+2TYTUjfCmfybPSpu/2jtc2oy/44/UKyvluAdAhtPsg JggF66AbjdX5Rv1D8gdJrgu9OXpzQZmmv8P0Ix+NI3tYdTSyyZFda54pfa/lMxARYuSc nFs/ONj12YlzMbd09AdzlL03yzD+mjqx+Omy+q5P2dHCOfo8RUK1Tx8nTx7e5N2uqY1U cpyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=b5Se+ncO6ecEP2j0IGRLm2ErCWYimTOfWI6Y6AOlL5w=; b=qJzDD8HfZbFAqBvxId7+A/Q7aGE3vp+0ZkoG+oNi/hKJ6oVEcll2oXrMN/WYP/qZHh WEGgG2RIbnGrRFZlVrs3dCOq2Xtkth4q+MWjUhFFfc+2ohZ/FNOpSs9LLiUECVh0xNbv JwExYYgObhws2OqbsVlYreK9KkATBjef4xNGXSO+j9qde3lDH0SiOvHvkQY3Z2Te4oC6 dJ3CMDjTwj8aAVEX0tGn+YsKNc9OUgvvURRASLscX+7num27dEr2f7B/NnOSYg4Nbgwr Z2DqYmkiIqeYM8b9CT5uSqr/f/IZNPWU9wMfxsU36jWWCA6WSf52xBVmBkCOzVbkMG7n LNqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BJjWMyxe; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y186-20020a638ac3000000b0040d5dc5b896si3904843pgd.519.2022.07.07.10.00.13; Thu, 07 Jul 2022 10:00:27 -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=@redhat.com header.s=mimecast20190719 header.b=BJjWMyxe; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235805AbiGGQ6G (ORCPT + 99 others); Thu, 7 Jul 2022 12:58:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235240AbiGGQ6D (ORCPT ); Thu, 7 Jul 2022 12:58:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 301D32CCA1 for ; Thu, 7 Jul 2022 09:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657213082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b5Se+ncO6ecEP2j0IGRLm2ErCWYimTOfWI6Y6AOlL5w=; b=BJjWMyxeHuNY3aC4ZsF3I+JDEPBD61eKOkxk+UOOSFNQBvprkYm7mSgJzo2atg3X25xjD4 GJGX5uXL3/lqkjYHoV7u9khB+aiVDSeg59DZQi3pN9dosrqs3UkxNDMadBUlqwxL3OWHUt ZvVXqeY6MxTSxQgLJdscOSSalGazTHg= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-163-uCXKLXZ6PC66DQ59OqAq9w-1; Thu, 07 Jul 2022 12:57:53 -0400 X-MC-Unique: uCXKLXZ6PC66DQ59OqAq9w-1 Received: by mail-wm1-f69.google.com with SMTP id h186-20020a1c21c3000000b003a2cf5b5aabso1003844wmh.8 for ; Thu, 07 Jul 2022 09:57:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=b5Se+ncO6ecEP2j0IGRLm2ErCWYimTOfWI6Y6AOlL5w=; b=yKG2u73SwnLBW9jVS2ru0IwTtXOl2M/oVTy/T7meq8zje+56X5E2WrzkTN6ZpLcn1p Q+uZwFUF2PkN4J6wkyChDIikuLPtNTAe4O17YEY/vncOZC5q/lpFlpufVOjzIeEaDTE1 Hx8E1Nk/eBVmDL7ubNkgiyty7B6eqKnJcMSpIFi25q+tKlPKVoWQpezvAxm+jteuECvp 5Ftla48p+Av1eVSvVLMbvFdTy/s7hcdOFLiOYV9XUlzcH3/jEXFxCabKImAVor9PsYrq HLQO0gUC/IbKULzKjMoI0I1Kso40dAkV7olg0Kq8JqNwV69bgcPcOG0+QEhLElMQxCVn JE7A== X-Gm-Message-State: AJIora+OkDtNGQ7vEnPL1CjzpyDtDmhzNo6GB7fDL3Gf0c5TVIynnLnZ wAfWw3X0T3W95iRoPbDVWnmZK1ACLuEnl9R+NhnaX+EKs4zR4kmrc1wK7VG4w9Ek6Bteb6/W1IG UuldoDJ2+QpOrCK0jpJkJU4s= X-Received: by 2002:adf:f304:0:b0:21d:7656:83e5 with SMTP id i4-20020adff304000000b0021d765683e5mr14230060wro.407.1657213072537; Thu, 07 Jul 2022 09:57:52 -0700 (PDT) X-Received: by 2002:adf:f304:0:b0:21d:7656:83e5 with SMTP id i4-20020adff304000000b0021d765683e5mr14230040wro.407.1657213072309; Thu, 07 Jul 2022 09:57:52 -0700 (PDT) Received: from localhost (cpc111743-lutn13-2-0-cust979.9-3.cable.virginm.net. [82.17.115.212]) by smtp.gmail.com with ESMTPSA id x2-20020adfdd82000000b0021d62e30a62sm14742505wrl.50.2022.07.07.09.57.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 09:57:51 -0700 (PDT) Date: Thu, 7 Jul 2022 17:57:50 +0100 From: Aaron Tomlin To: Luis Chamberlain 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: <20220707165750.tk4fadpv3d4zr2mb@ava.usersys.com> X-PGP-Key: http://pgp.mit.edu/pks/lookup?search=atomlin%40redhat.com X-PGP-Fingerprint: 7906 84EB FA8A 9638 8D1E 6E9B E2DE 9658 19CC 77D6 References: <20220704161753.4033684-1-atomlin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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. 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? Kind regards, -- Aaron Tomlin