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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71896C77B61 for ; Mon, 24 Apr 2023 17:33:51 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Q4sgK4zSXz3fTJ for ; Tue, 25 Apr 2023 03:33:49 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=segher@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lists.ozlabs.org (Postfix) with ESMTP id 4Q4sfl1Jqtz3bW0 for ; Tue, 25 Apr 2023 03:33:16 +1000 (AEST) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 33OHT2fU012355; Mon, 24 Apr 2023 12:29:03 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 33OHT1xM012351; Mon, 24 Apr 2023 12:29:01 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 24 Apr 2023 12:29:00 -0500 From: Segher Boessenkool To: Boqun Feng Subject: Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail Message-ID: <20230424172900.GR19790@gate.crashing.org> References: <87fs8pzalj.fsf@mail.concordia> <20230424151351.GP19790@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Paul E. McKenney" , linux-kernel , rcu , lance@osuosl.org, Zhouyi Zhou , Joel Fernandes , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Apr 24, 2023 at 08:28:55AM -0700, Boqun Feng wrote: > On Mon, Apr 24, 2023 at 10:13:51AM -0500, Segher Boessenkool wrote: > > At what points can r13 change? Only when some particular functions are > > called? > > r13 is the local paca: > > register struct paca_struct *local_paca asm("r13"); > > , which is a pointer to percpu data. Yes, it is a global register variable. > So if a task schedule from one CPU to anotehr CPU, the value gets > changed. But the compiler does not see that something else changes local_paca (or r13 some other way, via assembler code perhaps)? Or is there a compiler bug? If the latter is true: Can you make a reproducer and open a GCC PR? for how to get started doing that. We need *exact* code that shows the problem, together with a compiler command line. So that we can reproduce the problem. That is step 0 in figuring out what is going on, and then maybe fixing the problem :-) Segher