Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp721034rwr; Wed, 26 Apr 2023 05:41:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dYqLeNTyBQ5HhT4dKTPaJuWe/hSvUMmmNTx0EzdgTsWFK08NTVCks9dIvOQ5cn5cih9mD X-Received: by 2002:a05:6a20:3d93:b0:d9:6660:8746 with SMTP id s19-20020a056a203d9300b000d966608746mr2826669pzi.18.1682512877667; Wed, 26 Apr 2023 05:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682512877; cv=none; d=google.com; s=arc-20160816; b=O0Ytt1o2XqKys8wi5Qew1991oORCjmqoo/UiGVP7GvI1vN0iO7ob0iyUO4+iPNXsqV +uxBq43mskLU7TNNyHXGgJfDxJg9H6M+LRQtiI0687Y2gCQRGnPad90o3gXMcNXZ/nOi SIs58hmL7MwMRago8Id0+pEaGv8EDDKlx0OaqGHhIR4C/9TE7djZ9J12UEZ1XRNkN5wO a3cyhX3P8WbehDP7yqMxXfae4wPQBFTvepeS8SUTrGsf1A0pibNx2hiRduWPvqKrge8P lgMZHt1xbjSiRVbOwoBbCElaxhGhTJegpn8iB40VKsi95RkOWawA5A2BcUK4mNniGXdY PRjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=8LaY3/EdE4NVsF9YWnEonYJEbMaadgI0VtNBm8ceyN4=; b=gLUSTB/OIrN8tAmuNkWi8cKVvlUgPlzqLMFDZh8q0NGE9YaZbaTPVs4noQOejQcwgD VGpAEeZditLnI4Ovkf/uNRXzH43vMLjEkbEaVpvDNKGdbyqUXm25mFJFX/Z/Nnt8FLgi X53rr+J8Tz5dG7CkwZmlctjAtw52/aRfnU+yQRb70eWhYQGvFHukEcWulUmiESpaKRvo NMKZrdb8aYALVAljUIk9ceuWOcqgeZagBv452D6tBLoVZhrI1NMOm5wgmgtfbzifWVbm I1sIB/ZnPpfGUfhjyfu0KdC6ulXFnxg2vnhuhNxncNkzNF4Dcg8gelDOPtumIc/mDDtM WUxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=ezlHX53X; 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 j62-20020a638041000000b00524d69d682bsi14180596pgd.256.2023.04.26.05.41.05; Wed, 26 Apr 2023 05:41:17 -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=@ellerman.id.au header.s=201909 header.b=ezlHX53X; 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 S240898AbjDZMah (ORCPT + 99 others); Wed, 26 Apr 2023 08:30:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240918AbjDZMac (ORCPT ); Wed, 26 Apr 2023 08:30:32 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AA9B2733; Wed, 26 Apr 2023 05:30:04 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Q5yqr2YHkz4xFd; Wed, 26 Apr 2023 22:30:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1682512200; bh=8LaY3/EdE4NVsF9YWnEonYJEbMaadgI0VtNBm8ceyN4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ezlHX53XcQh0cJTlV2sS3bQ0g2PN0QTR0hk5JRJFcOcLThfA8983vId1vYMvP+RCJ WrG0FLBABNmivnreMK5adZwpHqgw0Re4T72gvomty/kkIUY4uGRyCxA0ltLvkqI1ts RyCEFIFgnHc6B5xPUOHtHhFtDNC+EVLo6ia4OtWscKwFXgYS4nH9Vu8nYhcGEdJv6N YhNR3Uv8LHXcPLOX7UE49wjPPxBNBtdJYH+vC0Ta/MaycXJ30W9qENqHtO+VTovb20 giHSyCC0cKz+xh82HBrU1OpLjhoSIaSOe6BJOXymMcev+qVhQy7kIZx3R2TD0t5a1w N5ukeAwPKWeew== From: Michael Ellerman To: Joel Fernandes , Zhouyi Zhou , Christophe Leroy Cc: Peter Zijlstra , Boqun Feng , Segher Boessenkool , linuxppc-dev , rcu , linux-kernel , lance@osuosl.org, "Paul E. McKenney" Subject: Re: BUG : PowerPC RCU: torture test failed with __stack_chk_fail In-Reply-To: References: <87fs8pzalj.fsf@mail.concordia> <20230424151351.GP19790@gate.crashing.org> <20230425101324.GD1331236@hirez.programming.kicks-ass.net> Date: Wed, 26 Apr 2023 22:29:59 +1000 Message-ID: <877ctyzv08.fsf@mail.concordia> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, 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 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. 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. cheers