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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82EFEC76196 for ; Thu, 6 Apr 2023 14:49:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239427AbjDFOt0 (ORCPT ); Thu, 6 Apr 2023 10:49:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239128AbjDFOtK (ORCPT ); Thu, 6 Apr 2023 10:49:10 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEECD134; Thu, 6 Apr 2023 07:47:52 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id CE8081F8BE; Thu, 6 Apr 2023 14:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1680792470; h=from:from:reply-to: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=mzy026vw3G51S2cFNOMvtPChp1Fc2IDetowMzUM6ByQ=; b=OKyhHn9/nrX8lFgQf0FvS8ZSX1BuOy5IaGmdbZH2COjgilmS1Z1hXOa3neeSBbeKnKxrzh 1DBeo2wzQ3RMxtDq6gwqJiW9vxEscX6MG13Pgq3NyCveDh7/b4KKZ2dK9JcgHSRAk84Syj GUBoGYzzPFMwx861aosjJZoUuozSTKE= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 21B342C141; Thu, 6 Apr 2023 14:47:50 +0000 (UTC) Date: Thu, 6 Apr 2023 16:47:49 +0200 From: Petr Mladek To: Jiri Olsa Cc: Luis Chamberlain , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Artem Savkov , bpf@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , "Leizhen (ThunderTown)" , Viktor Malik Subject: Re: [PATCH bpf-next] kallsyms: Disable preemption for find_kallsyms_symbol_value Message-ID: References: <20230403220254.2191240-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230403220254.2191240-1-jolsa@kernel.org> Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Tue 2023-04-04 00:02:54, Jiri Olsa wrote: > Artem reported suspicious RCU usage [1]. The reason is that verifier > calls find_kallsyms_symbol_value with preemption enabled which will > trigger suspicious RCU usage warning in rcu_dereference_sched call. > > Disabling preemption in find_kallsyms_symbol_value and adding > __find_kallsyms_symbol_value function. > > Fixes: 31bf1dbccfb0 ("bpf: Fix attaching fentry/fexit/fmod_ret/lsm to modules") > [1] https://lore.kernel.org/bpf/ZBrPMkv8YVRiWwCR@samus.usersys.redhat.com/ > Reported-by: Artem Savkov > Signed-off-by: Jiri Olsa Just for record: Reviewed-by: Petr Mladek Best Regards, Petr