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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable 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 6DEE3C433DB for ; Fri, 19 Feb 2021 19:37:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CA3E64EB3 for ; Fri, 19 Feb 2021 19:37:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229994AbhBSTgx (ORCPT ); Fri, 19 Feb 2021 14:36:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:58712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbhBSTgu (ORCPT ); Fri, 19 Feb 2021 14:36:50 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CF98264E86; Fri, 19 Feb 2021 19:36:08 +0000 (UTC) Date: Fri, 19 Feb 2021 14:36:07 -0500 From: Steven Rostedt To: Masami Hiramatsu Cc: Ingo Molnar , "Paul E . McKenney" , Sebastian Andrzej Siewior , Peter Zijlstra , Thomas Gleixner , Uladzislau Rezki , LKML , RCU , Michael Ellerman , Andrew Morton , Daniel Axtens , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Michal Hocko , "Theodore Y . Ts'o" , Oleksiy Avramchenko Subject: Re: [PATCH] kprobes: Fix to delay the kprobes jump optimization Message-ID: <20210219143607.3cdf9ed8@gandalf.local.home> In-Reply-To: <161365856280.719838.12423085451287256713.stgit@devnote2> References: <161365856280.719838.12423085451287256713.stgit@devnote2> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Feb 2021 23:29:23 +0900 Masami Hiramatsu wrote: > Commit 36dadef23fcc ("kprobes: Init kprobes in early_initcall") > moved the kprobe setup in early_initcall(), which includes kprobe > jump optimization. > The kprobes jump optimizer involves synchronize_rcu_tasks() which > depends on the ksoftirqd and rcu_spawn_tasks_*(). However, since > those are setup in core_initcall(), kprobes jump optimizer can not > run at the early_initcall(). > > To avoid this issue, make the kprobe optimization disabled in the > early_initcall() and enables it in subsys_initcall(). > > Note that non-optimized kprobes is still available after > early_initcall(). Only jump optimization is delayed. > > Fixes: 36dadef23fcc ("kprobes: Init kprobes in early_initcall") > Reported-by: Paul E. McKenney > Signed-off-by: Masami Hiramatsu > Cc: stable@vger.kernel.org > --- > I pulled this into my queue to be tested, and when that completes (hopefully without failure), I'll add this to my pull request for the current merge window (which I still need to send). Thanks! -- Steve