From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AF58C433E0 for ; Fri, 15 Jan 2021 09:23:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 987AC233CF for ; Fri, 15 Jan 2021 09:23:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 987AC233CF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 098F88D0146; Fri, 15 Jan 2021 04:23:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 049088D0023; Fri, 15 Jan 2021 04:23:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E2C7D8D0146; Fri, 15 Jan 2021 04:23:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0195.hostedemail.com [216.40.44.195]) by kanga.kvack.org (Postfix) with ESMTP id CB0D18D0023 for ; Fri, 15 Jan 2021 04:23:20 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9662A18000DBB for ; Fri, 15 Jan 2021 09:23:20 +0000 (UTC) X-FDA: 77707470960.14.spoon83_4507a0b2752e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 7561D18229835 for ; Fri, 15 Jan 2021 09:23:20 +0000 (UTC) X-HE-Tag: spoon83_4507a0b2752e X-Filterd-Recvd-Size: 3596 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Jan 2021 09:23:19 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id A6C1523128; Fri, 15 Jan 2021 09:23:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610702598; bh=YUOoXIAq/McVqyyFlnSUnFFrxg1lB2e+xTyNR3jGHyA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hEqu4l3j282rJAOphaS8MwVUBWSv9TQZdio0FDP+NxklrAhEgedE4wiyjcXV27oVH cuRO6fZEXjx26Egc7ICn3VrW/EJGj3OvXedjlLywgwx/oHVdHl61qAuRjUXn++6lOr ORCUtywMXqtaG7loHLP3FqxSqXJGCql/v5zeqIky2zzgwlfFuAsZ4TABILEO1J40R9 mXIIbYoTR9aZ4Toj523mBY7xcOZ+WnEC8dYgRfCY1ohe0IqfK9b6zoAH99EvOeXvR/ XkqP2hf5I+p22GOeQxk6SmGIYtT/KROrCiTqoZVEHMWNnfuFpgT3BWg+lI2QBYjjVX /+JV6lQm7iHPQ== Date: Fri, 15 Jan 2021 09:23:13 +0000 From: Will Deacon To: Linus Torvalds Cc: Nick Desaulniers , Linux Kernel Mailing List , Linux-MM , Linux ARM , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , "Kirill A . Shutemov" , Vinayak Menon , Hugh Dickins , Android Kernel Team Subject: Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault' Message-ID: <20210115092313.GA13700@willie-the-truck> References: <20210114175934.13070-1-will@kernel.org> <20210114175934.13070-5-will@kernel.org> <20210114190021.GB13135@willie-the-truck> <20210114194129.GA13314@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jan 14, 2021 at 01:11:12PM -0800, Linus Torvalds wrote: > On Thu, Jan 14, 2021 at 11:41 AM Will Deacon wrote: > > > > Sure enough, an arm64 defconfig builds perfectly alright with that change, > > but it really shouldn't. I'm using clang 11.0.5, so I had another go with > > GCC 9.2.1 and bang: > > Ok, looks like a clang bug, but a reasonably benign one. > > As long as we have sufficient coverage with gcc, we'll get error > reporting in a timely manner for any new incorrect assignments, so I > think we can do that constant anonymous struct even if it does mean > that clang might let some bad cases through (I personally use gcc for > build testing, and then clang for building my boot kernels, so I'd > catch anything x86-64 allmodconfig in my build tests). > > And keeping it unnamed it would avoid a lot of noisy churn.. Hmm. The feedback on the clang bug suggests that GCC is the one in the wrong here (although the argument is based on C11 and I haven't trawled through the standards to see how this has evolved): https://bugs.llvm.org/show_bug.cgi?id=48755#c1 There is at least some sympathy to generating a warning, so that might be good enough. Otherwise, I suppose we can explicitly mark the fields as 'const' but I won't jump to that immediately. Will