Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp160354pxx; Mon, 26 Oct 2020 05:54:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyht3+V/RZ5NMMdrrntqWEQBrsVqKcToixgUPmw3H+JbE7vuml7n4RlzWWM0fij8199JLA8 X-Received: by 2002:a17:906:1804:: with SMTP id v4mr1947101eje.201.1603716858329; Mon, 26 Oct 2020 05:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603716858; cv=none; d=google.com; s=arc-20160816; b=FcxZgU7BZVZAp8VbWt+F+nONOnNjSFspct7j4kpAQ45Fi8Lq+9V07gpJYKwGBrzytM iupxj+/Et+gI1CPwPZdTY2OvQlPjNRxaGgrsl6WKm+P758Q4fINN9MOyiFFHLI8CYNJj oPOsqBm7xBYIvREBBS3wLqia+ND7wOMO+emsjE6ZCwIkXhyrhV7ZZDzJDHP1kA+PPQTO nqMpEsO+dmRfQEaejaXtyaV3RUmYKppXM8jjMuVdjbtU6k16N9GEx4M5HthByAfQfUaV h6YjJ5KdyTP30bCe0RbYsP0vErgl45i7LJZeGbYYHvSiruAlDReKC34nWsue37fDPLK/ MLSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=rNDs6bpZpK+4fqKA7xYj7+yLSIpGYZIr6FmNG8YWfaM=; b=tNdyeURkUqDMSYIWByl/oDTlAC3V4TLANKLyp8mFHoT/dafA+UOSJCUqdGrEvlrYPv FFkSooYwooF6GkhxuV7NOsmR7so/rCNEmHkDt+6siWnuu+q3PyUTXpFHEu0IvS+b9Fwe TEOBeJdFvu0FRZaRdRiuajVo4n9yc004T4aPbh1HEhZY8duM7kqJGRMiFc+Y/HfYdH5s iFiFLKkcaDj63qhI1EF4axJdhoBEdnf+p/tClz/T5e/ZhDVIHCU8n4htYyacY6y3TfZX ldberF43hp5EY7pGxbTla2nUxDUT/53bJK8hrRINmQhZPxYWf3nI4C04hBfnX7koOLnW liqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="c6ea4/xk"; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc24si6964742edb.508.2020.10.26.05.53.56; Mon, 26 Oct 2020 05:54:18 -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=@linutronix.de header.s=2020 header.b="c6ea4/xk"; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1772262AbgJZLR1 (ORCPT + 99 others); Mon, 26 Oct 2020 07:17:27 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:39210 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1771658AbgJZLR1 (ORCPT ); Mon, 26 Oct 2020 07:17:27 -0400 Date: Mon, 26 Oct 2020 11:17:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1603711044; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rNDs6bpZpK+4fqKA7xYj7+yLSIpGYZIr6FmNG8YWfaM=; b=c6ea4/xkOHuR5XuSya9Jy/sYvJRjr2Anx1mzgXmPqpeDEIYC4LetSJv4i0p8rU/rDCuIuq q9OA/nok6zj3NoeEtP5uAotYTym3aU7T1iXE0ipzOOZmsYISyY1DrTQUCPU2yqhiulGPiZ 2k5Ab0SYTmdV4jprbkcmrBTyzwRPJG9rzSbZUlrGDL+i/jxOx/e+vGQLxdiM/6hN7jUHgO HVJvOlKtgxOna+g68gfJr5ZrihUx3fWvriMxCaKjZQh6c0QMDKmUXHfjn2TtFFBhuEjooZ 9LTqw19TYSLphzU07vsYzaAA3UWZMe6l3d4/3AlaS0NzXvSOEIWQZPNwAMmRpg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1603711044; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rNDs6bpZpK+4fqKA7xYj7+yLSIpGYZIr6FmNG8YWfaM=; b=WnfT42vuMr+h7keSCV1GwxGX3SOecrZyHF4oFNubqad0xri25krNHFZ116LnHiTe8ghWfG 8OOHCuzE8vKfoFDw== From: "tip-bot2 for Zong Li" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: smp/urgent] stop_machine, rcu: Mark functions as notrace Cc: Zong Li , Thomas Gleixner , Atish Patra , Colin Ian King , "Steven Rostedt (VMware)" , "Paul E. McKenney" , stable@vger.kernel.org, x86 , LKML In-Reply-To: <20201021073839.43935-1-zong.li@sifive.com> References: <20201021073839.43935-1-zong.li@sifive.com> MIME-Version: 1.0 Message-ID: <160371104269.397.18106018255287440015.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the smp/urgent branch of tip: Commit-ID: 4230e2deaa484b385aa01d598b2aea8e7f2660a6 Gitweb: https://git.kernel.org/tip/4230e2deaa484b385aa01d598b2aea8e7f2660a6 Author: Zong Li AuthorDate: Wed, 21 Oct 2020 15:38:39 +08:00 Committer: Thomas Gleixner CommitterDate: Mon, 26 Oct 2020 12:12:27 +01:00 stop_machine, rcu: Mark 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. See also commit cb9d7fd51d9f ("watchdog: Mark watchdog touch functions as notrace"). Violating this assumption causes kernel crashes when switching tracer on RISC-V. Mark rcu_momentary_dyntick_idle() and stop_machine_yield() notrace to prevent this. 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 Signed-off-by: Thomas Gleixner Tested-by: Atish Patra Tested-by: Colin Ian King Acked-by: Steven Rostedt (VMware) Acked-by: Paul E. McKenney Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201021073839.43935-1-zong.li@sifive.com --- 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 06895ef..2a52f42 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 865bb02..890b79c 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(); }