Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6034868rwr; Mon, 24 Apr 2023 12:38:40 -0700 (PDT) X-Google-Smtp-Source: AKy350YF0gJSQq6RjoY86oTVn1Zl2FQwo3zCoKDNFziMPYoTd5sTq6zhu31aWhurjYWvJx/midsk X-Received: by 2002:a05:6a20:8f27:b0:f0:718f:8eeb with SMTP id b39-20020a056a208f2700b000f0718f8eebmr19679139pzk.60.1682365119698; Mon, 24 Apr 2023 12:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682365119; cv=none; d=google.com; s=arc-20160816; b=um1efV1ohAuysKo1F9PZSCt0C/UESsgpgGyh4f+C71KesXLX6+uL518JBsozo7mV9G EiZ4Ef/vxcUZSehEqIncO+km3ltWZH/iBBY+TWBrcqPiS1gYoU1wojHARKLOG0GLnryq ysLshEF6W1h+AD3yyGr0P0a6vDO5bF2lIZbAhZ8biRJu2Rqn+QQ8AplFteyMj1Raivk1 qNnEvfAr1tzMnZ5tT7DZq6a5HUJo1UeaZmpK5ZxXu+aD2mD6+Wk7TKf5l6hnHRbuT7Bf zzO3YVlhP7xz/ZavUW3HLQ3IeGOqAdTmMCJ0bez5LBsLTsf2gHGDc53Jt7VBFLl3rR/w 5CVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=j5WcTX+EeaGsxdM7iEyZFoPrBHwjvydFJtcBq7twcJE=; b=t1wNqdU7eGUwMC3uKU754/wIA7K3zbjL0wh7RcMNs3zYX+cZNsn1Jz2kVx0E6q6xpd ZRS7Qd0bd5/xSiD/wnOFFtpJq+Ae7zMhujPWJdfB2V3ACzvYQ7IKm/tukzcGAzQgjlhx tnCOziq90X/P1BuEqs8HjPwDyBW0gYvOBg409vemzf7P0WIXF6EqQ8InyPiYRj8Qpi0p yR/BxSdju1etliUJQoYpnYh6Y4gmMuxhhSzxQfXvMbnZkvJHJfT5M3NR27BkQqTHjxcx CxQdOlh4AcxFIIu4MNI9t5ft91kuQGyiRSIXYXtDzFC01JP24lpiaL6x/EoZU33J42a9 VoJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Q7kqlzPw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t144-20020a635f96000000b0050bea5bf413si12160694pgb.705.2023.04.24.12.38.27; Mon, 24 Apr 2023 12:38:39 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Q7kqlzPw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232251AbjDXT0Z (ORCPT + 99 others); Mon, 24 Apr 2023 15:26:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231360AbjDXT0Y (ORCPT ); Mon, 24 Apr 2023 15:26:24 -0400 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10AC044B1; Mon, 24 Apr 2023 12:26:23 -0700 (PDT) Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-3e8b3aed55bso23151141cf.3; Mon, 24 Apr 2023 12:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682364382; x=1684956382; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=j5WcTX+EeaGsxdM7iEyZFoPrBHwjvydFJtcBq7twcJE=; b=Q7kqlzPwtnz9GHcfA3FamK1WCOGenrygc8tdrlX+VPt4u+vIyXEtNyjNZag0Csm8PI cBh06puZK8ynWwiyKDW0V7GpKQOoH4Zp5iB2ur0Th0zORUbDZU/gevLheLDMnv9716aF yE3Fvlb1ntmT2RsJK9CNVZ/yzOWB/gP/o+dZnbrY/NoDwB36uNYX8MSezk9960RuHBz3 vq7UOlZROP4aWaMetE3961fITx3CMxFmwDOOyjVvr1jctSOMbDpd7f8mnrYQYeSTPlhr adf6cJnm4WmeItHzq1mnNaB9uus9imw4/FIHIV8j5tSGYSpPda7OWLCkHuftpscRqj8/ KdsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682364382; x=1684956382; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j5WcTX+EeaGsxdM7iEyZFoPrBHwjvydFJtcBq7twcJE=; b=LhGpa0bF7hl/euEavuSXZQG+a4UVM6A41w/iKyaG0/Z+t7KDeXZNoBEmEjwF3NILF5 ajxvVrUCuS33IYwJreaJOYAR2fMoeIZO4bqbbYIqCkIX2dwi1aHVXbNvfSjOTFZ3FPqj tzsK0se01nvtWWTbw/Va+yAsMiis0hH4WjI3yhncRUbbz/L7L/9+GFtlBCddTFO34AKJ QgtjSF9uWl51orIcLzJEmtFLSJVnQxCZr6tuQYzdR5iDOw9SjWvLDhCs4fbJ1twiBEtg 0qz8ZIjXIFrZdTWru5O3GFIjjFYOH5uBYB+1Wc794lnQ2dZ57LUzxRVI/QsqCFhAAYzq InWQ== X-Gm-Message-State: AAQBX9cVY6AxYn8gqNwUQZ8bYcpZW3tcRDNCn/+vktfgXkkP+3DuNGBP inYr5h4Mxnd57dxOqJ2nGpE= X-Received: by 2002:ac8:5814:0:b0:3ef:57c1:ad7 with SMTP id g20-20020ac85814000000b003ef57c10ad7mr26361936qtg.30.1682364382044; Mon, 24 Apr 2023 12:26:22 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id x15-20020ac84d4f000000b003ef28a76a11sm3847395qtv.68.2023.04.24.12.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 12:26:21 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id D316927C0054; Mon, 24 Apr 2023 15:26:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 24 Apr 2023 15:26:20 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedutddgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhq uhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrf grthhtvghrnhepffehkeeuhfeigeevveejvefftdehueevfeetleevfefgudeitedvudev ieevkedunecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepsghoqhhunhdomhgvshhmthhprghuthhhphgv rhhsohhnrghlihhthidqieelvdeghedtieegqddujeejkeehheehvddqsghoqhhunhdrfh gvnhhgpeepghhmrghilhdrtghomhesfhhigihmvgdrnhgrmhgv X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Apr 2023 15:26:19 -0400 (EDT) Date: Mon, 24 Apr 2023 12:25:42 -0700 From: Boqun Feng To: Segher Boessenkool 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: References: <87fs8pzalj.fsf@mail.concordia> <20230424151351.GP19790@gate.crashing.org> <20230424172900.GR19790@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230424172900.GR19790@gate.crashing.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 12:29:00PM -0500, Segher Boessenkool wrote: > 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 It's more like this, however, in this case r13 is not changed: CPU 0 CPU 1 {r13 = 0x00} {r13 = 0x04} _switch(): _switch(): as you can see thread 1 schedules from CPU 0 to CPU 1 and neither CPU changes its r13, but in the point of view for thread 1, its r13 changes. > r13 some other way, via assembler code perhaps)? Or is there a compiler > bug? > This looks to me a compiler bug, but I'm not 100% sure. Regards, Boqun > 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