Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp671439ybl; Fri, 13 Dec 2019 02:48:03 -0800 (PST) X-Google-Smtp-Source: APXvYqxTQvniEfV0jFWMlSoTgX/bVU8Sz2MjZ2NuyERQojda1xB8gYhai5wrjk/E7Bh5xc6ziHA0 X-Received: by 2002:a9d:7d8e:: with SMTP id j14mr13263245otn.227.1576234083247; Fri, 13 Dec 2019 02:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576234083; cv=none; d=google.com; s=arc-20160816; b=AAWam85BQbxHDo6Hg0SJI0MlHJcPYVB9BJjR6yv9JK6U/fhX9d8g5da8CAOcyZvNKZ FrpYYRX4pjiNuRHSgUaowYGM2U1G4JP91zA3V1VreRwfZ7ZbN6xVwWx9i8aIj4Gh/6Fi ljx35h1G50uqgb9e3ESQ68TaTW+gyaGhoGgkyp+yRwV5oqkVfyRFY0JlEGM2nAhR097L zsC1Kb87YAT3VCTz0HPb8DH7Prw5QMi6gaiNU84hmBfMPw3DYGcXwV34GdGhPTfxy8Yj J4R4Kb3RbOX1NIBD5yDgXdclzdl9G3WbQ2b2c9msH+tzvfZNmL3Het4/REalv9GoNUxX TUsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=aaItiTBk+e/R7wwZriBm1tDINaCLpM0u6e3njFKqqz8=; b=ApLg+ObYkDid4Z4/S5YEVENpk4V9b4qf3ulWdmGEpeTVXrZBAtt/TdjlQPtJpYujcz 0iVxGUWqNVLEGstN4XXvoEyujDCyMZar3QIT/S/NB1wZ1IRJSWISxZx5x7S115J6SMpw F/zIb+w1Et3Aaj251J1iNEl0VSgA2dGa6JD1y3VYYhvuhFBWcSuG0foZAf/3dWmZeSi1 xPgo6CeYc/4T32UT2e8qlGqM9VRgqWQjVTUTe0bJqcBxRFv1OUkXKZKCAeMlBOt6CHuh eOS2df26DCeHAUEkztj/T2zeqFMsaSw6pub0bMGudXlxSrkS0y8dIguDDV1qBn5U35gy mBKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k2toVqK3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v25si4618818oth.136.2019.12.13.02.47.51; Fri, 13 Dec 2019 02:48:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k2toVqK3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726463AbfLMKrL (ORCPT + 99 others); Fri, 13 Dec 2019 05:47:11 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38310 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbfLMKrL (ORCPT ); Fri, 13 Dec 2019 05:47:11 -0500 Received: by mail-wm1-f66.google.com with SMTP id u2so1047731wmc.3; Fri, 13 Dec 2019 02:47:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aaItiTBk+e/R7wwZriBm1tDINaCLpM0u6e3njFKqqz8=; b=k2toVqK3xMpoQjPSunK5wQX2k/4FJdeWG6RMkZAOfcidd8oWAypdSfZVmj7VqJPARt D9jsVNfdnktzLM9kafptKzLf/MBDUHACylS71VvxJt7joO/PueWSlwl2tfrDfs/OB3A5 9nCBlOpxsQ7z9OaxavDF50HpmkILhzxJAg+/RavBVin1voVF96sfcYcSpKx9j8YSDsMK wtD9Q3zk7/sQHPjUfcqEUXsoym55yhSOs0arrNE7BUzb5IeSai+o9nINSC8MklBR2Xeo ArjWDcuB4XqhR8P1+e5GcvXGXXYJj2Xlvr5AGErgkBbdrVFbwWjMdHUGWWmahvHJnBx1 5wig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=aaItiTBk+e/R7wwZriBm1tDINaCLpM0u6e3njFKqqz8=; b=lEutt7d66XMEm0FwfLzfHsMToMup5/6p3AtfL58ns9R4q6vWV+uJpLYPE5p+BnTMpC QyeKSxm57ORtafaGkoJVPaprm8JFtnKmYFufhIR6zgTgeuE9qVx8NeDAB8SvBjmX5mAk ZwESjPzHU5yo89neTyh4/AtTQtv2jO8qQM0RK2ejKxaaLQmzcmAcNfyhmzifWvPnXUiR ihn2c2A09vpstDgZT25xH5sXogcuL3vqtYGV4lo58rfHXt+NMpiN4tbwH6Tmo2KQV9/R foXpE0t7itNotMlR1Yw8ABF13mlCk/RQaD0XNlvkUfTUtQWxcnHu713wdzqEtKm6N1Z/ JQ+g== X-Gm-Message-State: APjAAAW514bEMvFLC4H+CsJugVESz0aIFxBCTi3JY+VkhxgW0LuYMMXG 5XRQM+jmERgFMBFBgRSr281ulbKI X-Received: by 2002:a1c:e90e:: with SMTP id q14mr12593233wmc.108.1576234029069; Fri, 13 Dec 2019 02:47:09 -0800 (PST) Received: from ltop.local ([2a02:a03f:40f6:4600:c498:c79c:5e:9634]) by smtp.gmail.com with ESMTPSA id x17sm8764911wrt.74.2019.12.13.02.47.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 02:47:08 -0800 (PST) Date: Fri, 13 Dec 2019 11:47:06 +0100 From: Luc Van Oostenryck To: Peter Zijlstra Cc: Will Deacon , Linus Torvalds , Michael Ellerman , dja@axtens.net, Linux Kernel Mailing List , linuxppc-dev@lists.ozlabs.org, Christophe Leroy , linux-arch , Mark Rutland , Segher Boessenkool , Arnd Bergmann , Christian Borntraeger Subject: Re: READ_ONCE() + STACKPROTECTOR_STRONG == :/ (was Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.5-2 tag (topic/kasan-bitops)) Message-ID: <20191213104706.xnpqaehmtean3mkd@ltop.local> References: <875zimp0ay.fsf@mpe.ellerman.id.au> <20191212080105.GV2844@hirez.programming.kicks-ass.net> <20191212100756.GA11317@willie-the-truck> <20191212104610.GW2827@hirez.programming.kicks-ass.net> <20191212180634.GA19020@willie-the-truck> <20191212193401.GB19020@willie-the-truck> <20191212202157.GD11457@worktop.programming.kicks-ass.net> <20191212205338.GB11802@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191212205338.GB11802@worktop.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 12, 2019 at 09:53:38PM +0100, Peter Zijlstra wrote: > Now, looking at the current GCC source: > > https://github.com/gcc-mirror/gcc/blob/97d7270f894395e513667a031a0c309d1819d05e/gcc/c/c-parser.c#L3707 > > it seems that __typeof__() is supposed to strip all qualifiers from > _Atomic types. That lead me to try: > > typeof(_Atomic typeof(p)) __p = (p); > > But alas, I still get the same junk you got for ool_store_release() :/ I was checking this to see if Sparse was ready to support this. I was a bit surprised because at first sigth GCC was doing as it claims (typeof striping const & volatile on _Atomic types) but your exampe wasn't working. But it's working if an intermediate var is used: _Atomic typeof(p) tmp; typeof(tmp) __p = (p); or, uglier but probably more practical: typeof(({_Atomic typeof(p) tmp; })) __p = (p); Go figure! OTOH, at least on GCC 8.3, it seems to always do the same with volatiles than it does with consts. -- Luc Van Oostenryck