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 2BFACC77B78 for ; Mon, 24 Apr 2023 17:35:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232090AbjDXRf3 (ORCPT ); Mon, 24 Apr 2023 13:35:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231499AbjDXRf0 (ORCPT ); Mon, 24 Apr 2023 13:35:26 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EA74A729A; Mon, 24 Apr 2023 10:35:21 -0700 (PDT) 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 Cc: Michael Ellerman , Joel Fernandes , Zhouyi Zhou , linuxppc-dev , rcu , linux-kernel , lance@osuosl.org, "Paul E. McKenney" 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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