Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp817586rwr; Wed, 26 Apr 2023 06:49:19 -0700 (PDT) X-Google-Smtp-Source: AKy350b4hmlmvuMu8se2l2lhHfTi4z8Wc5oIH0F1MWPRIWCGi0FbG7yU0aZBpn4+VjvTDftzEm1A X-Received: by 2002:a05:6a20:7d8e:b0:f2:6eeb:211b with SMTP id v14-20020a056a207d8e00b000f26eeb211bmr24496422pzj.37.1682516958873; Wed, 26 Apr 2023 06:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682516958; cv=none; d=google.com; s=arc-20160816; b=gWud/eVN7k64aUladhp9Is7oNIiG0jrmoWGNpV+zXwTAXgndN8D3WtaqDE6niv1pUT SDEBwkekslV3qk37Yfj/7rpBwDLezgKyP4OVwoYdOlLL0VAnQzGhE07LXKCj0C40J2Rf 9fg8gxyIzS8tALzibhW274o2aCKq5wij4ZVm5JkjwuPiW1G5EaTuVGcqMUwS7JA1wl/1 OdaEObbteWExkuPznX97skrVZ3P3xOkZagymG5CGs/OJEqqDBjPjvhsHNM+ttGRqpmQc ziMFkBrQ5qql2/EzRmkOqTt7KDhtE5njBmUvg837vxIhnOFm2pDZP4z/bFeOuZ4vfrHi hmGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=hlzacH95S9G7WQYp+n1NPz67OBwaM3/l9HiCCYW0Vx0=; b=Qbvd7W877cCqDjjkMukkDWQWB2M20Eq2Zt7VMNMuMzGU6wA1qkpGrmBIQdKYhxgnoo oIQymDAA2an4MoDtLC4yj5/vjbTDpiw6yQEcqJCScY4kmSNmEyQKdRB81AX8RzPd4/bX jiQa/RXR+QQQ6jQL/XU0Vl0f4RUuP8SUT6eqNadjQw9BY9XJZyX4mZ8XSmCssHqpoMvR A940tDpDRnj7fccGYVgzzPTax1/ls5wR/rHqknIINYoQtIfwADVmCc4+/W+1Vo/hY1J+ GKkrPz+kBTK1OlsBUQ+E9j1ftZmkTsHPwuJ6uo9Cdtm8ylhxJwm1vLvRI61CVjPYPz5A wQyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=DChMHSbV; 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 q23-20020aa79837000000b0063b80f4bfa6si16280886pfl.132.2023.04.26.06.49.06; Wed, 26 Apr 2023 06:49:18 -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=@joelfernandes.org header.s=google header.b=DChMHSbV; 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 S240920AbjDZNoh (ORCPT + 99 others); Wed, 26 Apr 2023 09:44:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbjDZNog (ORCPT ); Wed, 26 Apr 2023 09:44:36 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4893349FA for ; Wed, 26 Apr 2023 06:44:35 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-b99f0a0052fso3385059276.3 for ; Wed, 26 Apr 2023 06:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1682516674; x=1685108674; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hlzacH95S9G7WQYp+n1NPz67OBwaM3/l9HiCCYW0Vx0=; b=DChMHSbVBySgl3y5N6nCQPhXy7ImLFSFkKAR/Jszb2rzvjrN589ggtoht5HpDQJVWX UNTPvCLGnJY7mgve07WL+obQWUBbz99i4YJcMulOtipltF6CLhrn2iqVvLrsUODk5QDA bSt/W/8rVjne4zvyZ015pAZtm4RkbOQgtBmg8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682516674; x=1685108674; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hlzacH95S9G7WQYp+n1NPz67OBwaM3/l9HiCCYW0Vx0=; b=NRjbbj2e4Wo9oPjBRrM/93cv1BbHThZtnlCxbHLA0ko4B85qItzntQRVdXAzCOB7/e 7VBLmyt8K3CbNQ9PJqz6WWMoIy7GJDsPQe2brgc0njU9jPBvYSPzabV9Ulde1sNsHsL/ DbdxiUvSRSK54q2UVK0wCVfseHjreKCOgFCfYAj7ijzZALumntyKP7DYs17OBi6K0w0G eGxn3HIJi8IxqckWr8CjZQNVBzwD3rfCjON0XH/8XXTBAEiJJIculv0brWLBOSqhZ/on dOCauGa05y9N1wvIkPJ/iAWYQ3R8N/3uI0EY/iUj3iq8TJoNcwkDC+dL+pWbQZJnT5X2 nLKw== X-Gm-Message-State: AAQBX9dKK0n1nfwGVl8zcmBUBqGxQrATWdyXjLRypeftdcNq/6NpHFCv VCJJDMRy29fu0Ya4XZxU6qyN9tOh+R8DVThxcucLaA== X-Received: by 2002:a25:34d4:0:b0:b8f:32aa:1d50 with SMTP id b203-20020a2534d4000000b00b8f32aa1d50mr12351252yba.55.1682516674401; Wed, 26 Apr 2023 06:44:34 -0700 (PDT) MIME-Version: 1.0 References: <87fs8pzalj.fsf@mail.concordia> <20230424151351.GP19790@gate.crashing.org> <20230425101324.GD1331236@hirez.programming.kicks-ass.net> <877ctyzv08.fsf@mail.concordia> In-Reply-To: <877ctyzv08.fsf@mail.concordia> From: Joel Fernandes Date: Wed, 26 Apr 2023 09:44:22 -0400 Message-ID: Subject: Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail To: Michael Ellerman Cc: Zhouyi Zhou , Christophe Leroy , Peter Zijlstra , Boqun Feng , Segher Boessenkool , linuxppc-dev , rcu , linux-kernel , lance@osuosl.org, "Paul E. McKenney" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, Apr 26, 2023 at 8:30=E2=80=AFAM Michael Ellerman wrote: > > Joel Fernandes writes: > > On Tue, Apr 25, 2023 at 6:58=E2=80=AFAM Zhouyi Zhou wrote: > ... > > > > Out of curiosity for PPC folks, why cannot 64-bit PPC use per-task > > canary? Michael, is this an optimization? Adding Christophe as well > > since it came in a few years ago via the following commit: > > I think Christophe also answered these in his reply. > > We do use a per-task canary, but because we don't have "current" in a > register, we can't use the value in current for GCC. > > In one of my replies I said a possible solution would be to keep current > in a register on 64-bit, but we'd need to do that in addition to the > paca, so that would consume another GPR which we'd need to think hard > about. Makes sense. I'd think it is not worth allocating a separate GPR just for this, and may cause similar register optimization issues as well. > There's another reason to have it in the paca, which is that the paca is > always accessible, even when the MMU is off, whereas current isn't (in > some situations). > > In general we don't want to use stack protector in code that runs with > the MMU off, but if the canary wasn't in the paca then we'd have a hard > requirement to not use stack protector in that code. How could you control which code paths don't have the stack protector? Just curious. thanks, - Joel