Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5399244pxu; Thu, 22 Oct 2020 00:52:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5ATy/qdeBe6l4BgniAA05ieqZ07Lvo6ggPFdpxyWmgHnLNtIqN8EeNg5d2Bbn26niFH7M X-Received: by 2002:a17:906:f14b:: with SMTP id gw11mr1137608ejb.41.1603353170345; Thu, 22 Oct 2020 00:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603353170; cv=none; d=google.com; s=arc-20160816; b=hhiTJbSTCKFfjKSSwYVJGUQtWPc0EHyxjc8RSbm9q/rNnPPCdBsNooUXeXxuVERCVG Qnl9cPhUHECIospx+dubAfvPYwkjojATTfIjjuNb33ikW0vVeW4F1ow95qLZskRZYGHQ E/RoO0ZqLzGvv9PkCibkdYTdwJYmMCBTcKgG4DT1mfeaS60MN1TnjYcW4suDc/TOosx2 2zHdwbpex2VJOcbT98PWtAHSjMEFfqqwKD2ynKKYZc3jInq+yde/DqDqDcKZMWK1mxCz AVrTkoCIvyz05RRXiRBPSMc5/On1BaO2TGl6I47Kgafu44hvUvvz0mzFD7mIQwYCAzNU WiUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zeZvoKbrgIVhevjxOiOYNvRjeI72W6AtF3ciDXxGwJQ=; b=dm7aVGmNqaCkgXrJVVu4xIebrIx50Pm/4/Y7+q+YUPKkR43cX8KWYcoGpVvAhIm7SQ WXZO+v8eKLLsBIo0BqQCjUyUCzQQLvPzBKA5g3YQFj8USrYBTOSxv/vxRJGdk9TXKrGQ mt00AHHDNcIwEgIyYGsx6A8QOwAbOrZQj4EuXx1EvqH9T93en7wqRRdWp9ZYSpJMkwt5 TzRpxG2zKGysYWZhM8jIuNYmWM6WNv2NFU9KOa2h8UmHef6nk8FU6nvsClZHwG++OY7U K7JgIdKEHzfn57HUTr1bcvcku1zxoR9yX89frZSHzWBcBFqkXgO1nkRbAIzIU1gMG9Ck rkTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=G0PIvqJu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si461390edu.407.2020.10.22.00.52.28; Thu, 22 Oct 2020 00:52:50 -0700 (PDT) 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=@atishpatra.org header.s=google header.b=G0PIvqJu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2894521AbgJVA62 (ORCPT + 99 others); Wed, 21 Oct 2020 20:58:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2894516AbgJVA62 (ORCPT ); Wed, 21 Oct 2020 20:58:28 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 139F1C0613CF for ; Wed, 21 Oct 2020 17:58:28 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id q25so5179964ioh.4 for ; Wed, 21 Oct 2020 17:58:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zeZvoKbrgIVhevjxOiOYNvRjeI72W6AtF3ciDXxGwJQ=; b=G0PIvqJuZsR5epI8IijrEuUisk9liNNUla92pT/N31hyikKZ+t4bY1CC9QaLoVrNKV I2bkIa/YgOY4oSKbtLqIZ3I8wRWgxiztUdjj5Ae9k6VyP6m5T2EaX7PLlBmdvc1AcOWw NBcu552r8cjGCPUvGmgdc0AYNzP+r1R5vLQOk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zeZvoKbrgIVhevjxOiOYNvRjeI72W6AtF3ciDXxGwJQ=; b=k8rn2aYVZz8p0xjEhuvtvIhqpmClqlTeZOurCSSWjPL733oiocSH+YS8g+MZHJtYWr YDmL3yIG+gZqEHK3QuWQ0DoQNTSN3O5FWqW7BzdEmdUbxcogknqT8QSqON+XX4ZIZcLc 6QNUEY72d/d3ImOGZKzDxk7x+C0yvmCgaJ9QHTzIBBMsUFTv7OovWOAR+Os3f4cZtTiT BgRsHj05fPdiTgEp9k1DDqcSW/rZJJwY5RYpc7ufnqySBTssAGo+HqwbwohJZ9Mud9RQ ejj0TGP4Qt+nnD+ClxPpyV1B56QWeVKyQm6hBqIW2QyyYlWgWnDh975dawm+gqDnk1NT 6hMQ== X-Gm-Message-State: AOAM531/8nCXT6/xp7LmTN+fQSSFwbaJ1yMCHhF72q2cpDiqhbTTWNaw V9fCLAoDZKt0/dpuNLWOqaFj3spOmKw0Va/pVsEV X-Received: by 2002:a5d:84c6:: with SMTP id z6mr171793ior.0.1603328307250; Wed, 21 Oct 2020 17:58:27 -0700 (PDT) MIME-Version: 1.0 References: <20201021073839.43935-1-zong.li@sifive.com> In-Reply-To: <20201021073839.43935-1-zong.li@sifive.com> From: Atish Patra Date: Wed, 21 Oct 2020 17:58:15 -0700 Message-ID: Subject: Re: [PATCH] stop_machine: Mark functions as notrace To: Zong Li Cc: "Paul E. McKenney" , josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, joel@joelfernandes.org, vincent.whitchurch@axis.com, Thomas Gleixner , Paul Walmsley , Palmer Dabbelt , Guo Ren , mhiramat@kernel.org, Greentime Hu , Colin Ian King , rcu@vger.kernel.org, "linux-kernel@vger.kernel.org List" , linux-riscv Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2020 at 12:38 AM Zong Li wrote: > > Like the commit cb9d7fd51d9f ("watchdog: Mark watchdog touch functions > as notrace"), some architectures assume that the stopped CPUs don't make > function calls to traceable functions when they are in the stopped > state. For example, it causes unexpected kernel crashed when switching > tracer on RISC-V. > > The following patches added calls to these two functions, fix it by > adding the notrace annotations. > > Fixes: 4ecf0a43e729 ("processor: get rid of cpu_relax_yield") > Fixes: 366237e7b083 ("stop_machine: Provide RCU quiescent state in > multi_cpu_stop()") > > Signed-off-by: Zong Li > --- > kernel/rcu/tree.c | 2 +- > kernel/stop_machine.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index 06895ef85d69..2a52f42f64b6 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -409,7 +409,7 @@ bool rcu_eqs_special_set(int cpu) > * > * The caller must have disabled interrupts and must not be idle. > */ > -void rcu_momentary_dyntick_idle(void) > +notrace void rcu_momentary_dyntick_idle(void) > { > int special; > > diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c > index 865bb0228ab6..890b79cf0e7c 100644 > --- a/kernel/stop_machine.c > +++ b/kernel/stop_machine.c > @@ -178,7 +178,7 @@ static void ack_state(struct multi_stop_data *msdata) > set_state(msdata, msdata->state + 1); > } > > -void __weak stop_machine_yield(const struct cpumask *cpumask) > +notrace void __weak stop_machine_yield(const struct cpumask *cpumask) > { > cpu_relax(); > } > -- > 2.28.0 > Thanks for the fix. FWIW, Tested-by: Atish Patra Can you update the bugzilla as well ? https://bugzilla.kernel.org/show_bug.cgi?id=209317 -- Regards, Atish