Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5909063rwr; Mon, 24 Apr 2023 10:37:52 -0700 (PDT) X-Google-Smtp-Source: AKy350a4ApydBw7FrKbODIAs6Qb5M9jagHaeuGBvhwTDhVrkCupVYQ3hCygQZRdO6ZXd3/JNSyYx X-Received: by 2002:a05:6a21:788f:b0:f2:1c13:95a4 with SMTP id bf15-20020a056a21788f00b000f21c1395a4mr14880930pzc.27.1682357872296; Mon, 24 Apr 2023 10:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682357872; cv=none; d=google.com; s=arc-20160816; b=Zpylc+xGeyYbVS22mzV/fpzRpRjwIjJe+pd8vMu65Q8BMszCwr7ZH5lUpjFWlHXze/ nqnW5zlvLblGXFB5CZCj6BXk5FrvdfThz9og7oMpTUWyGWMeUBYeglczyMV2xvkt+Qqv tdne3k6Kv1Pl98r8pX3D4mUND85MEZ1lzsHL+Pr1LZT7n2+T1d6PCaaWLZnTJkCmZrb8 3afZqY/xu5PKjCYzI3+w21X7gmxQxsOoff7UzhK0GBWnf4do1nUCy2SWnY8va+VTIlZ4 4cQyn8JF0RfQQnzLyj51hCv9oF5Y25jgUGRUv3EgrMhrsv9pVwck93ds08zypaWz1vsr vM8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=HXKIC6n1/e1VLaTnr0CHjeiTxL8/4tdNPC17r9iojVM=; b=sBDqbKpADKesxzovFBzKxOgzZB7EXvzJPp/jgyrD5C6a0nk2h63AEnXYQi4V69WaBq 5LnaTUGpr8B3T5NSAzhPU2xPzhR9s+C7U/9HymMIFz+H+nEZAqPkzhTyjEO1qXfhtan0 Rq5/gpB8QNasiK3fjkhc+bFWCf4Uyz2UHKAoWWXV3RkD3cuDw1RwnP5FmkqxFlo7r7Y6 vsApAzOJR2dN60up85EyBYz+y3JaQdmqDU8/kX/kX2yVfZKQI38x5GmTxZNawPcC6SIK y68aMOP/P1ejDpqY5Cdt4i2LeFSjN2IHQxQ8Xi5Rfk1SSUv0O69avMdwFqg5LLqLJIAp KiIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a63e04c000000b00502f0d858e9si11959898pgj.174.2023.04.24.10.37.40; Mon, 24 Apr 2023 10:37:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232017AbjDXRf2 (ORCPT + 99 others); Mon, 24 Apr 2023 13:35:28 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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