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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 751EBC433DB for ; Fri, 22 Jan 2021 17:47:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EB30323A68 for ; Fri, 22 Jan 2021 17:47:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB30323A68 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 28C1F6B0005; Fri, 22 Jan 2021 12:47:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 23B296B0007; Fri, 22 Jan 2021 12:47:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 12B9B6B0008; Fri, 22 Jan 2021 12:47:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id ED6D76B0005 for ; Fri, 22 Jan 2021 12:47:57 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A5951181AF5F7 for ; Fri, 22 Jan 2021 17:47:57 +0000 (UTC) X-FDA: 77734144194.27.crowd60_380c9672756d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id CDF053D682 for ; Fri, 22 Jan 2021 17:47:55 +0000 (UTC) X-HE-Tag: crowd60_380c9672756d X-Filterd-Recvd-Size: 5447 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 Jan 2021 17:47:55 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id o13so8707750lfr.3 for ; Fri, 22 Jan 2021 09:47:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9BI9UmKtX79h66/CQZ3IJ6vmAlgkat1H+gnMZ1+LnI0=; b=ZX7i47LbJuaQXq6bQiKIG0XprrvIqBEewRCdU/KclPepZbN8Q8Bt2Bg0k9pRjLbccy Ukwn7141QK6bW8RSFCY+xd4lZaj9IkTpBDXtTxxrjgOve3se8ozgoyr+DgUhaF6PZt8a i0NLZhqARpo5bDPqeNGNM13idS+dZ1yzYdZe8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9BI9UmKtX79h66/CQZ3IJ6vmAlgkat1H+gnMZ1+LnI0=; b=RGSY7roce8X21adHpgooD7ZTMVWgBEyXohZVHqXQJR4J/d4p1kDiuWADpaSRz9Dglz FA0tnRiPHhH6slHYyoAmneL3QB9eFMJFYEzxPX8Xdb0nBJ4HAH4Dqm4562zpx+bQK4hi xEz3W3TadJBYq4wFZ/RFrmZXpKcrN5uvwSr9773kWDUeIt3k7Uq/rgvvhuW53JGoVtrn DfOSwrIrshMmQa80z8+3KPUoYBEVImR6gNzTR4UJYQsgYEQM+Tvb/GgOKKllDAp537eo UQ34SbrkN0kS7nbPlyunJvXmi3FDbheE4uzzs+PTGwTARfmWCdX7S4nZv9PCCHkhVm4p JQQw== X-Gm-Message-State: AOAM533NE4XlEainGnaxWColorsZoIDcXAYYfkPqKTZe4m1+haZUgDzu ElDI+WnZTcG5NpJbFeCuTCHp8ppIspfCqg== X-Google-Smtp-Source: ABdhPJw/FLtO4QK6VIMW4YLku5bzmco9wxlgXdXY6LQKprzePEpCMj3gVWLS29FWRkR08qHz4UT2JQ== X-Received: by 2002:a19:8c15:: with SMTP id o21mr1433658lfd.101.1611337673266; Fri, 22 Jan 2021 09:47:53 -0800 (PST) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id y18sm827661lfe.29.2021.01.22.09.47.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jan 2021 09:47:52 -0800 (PST) Received: by mail-lj1-f169.google.com with SMTP id l12so4942974ljc.3 for ; Fri, 22 Jan 2021 09:47:51 -0800 (PST) X-Received: by 2002:a2e:9ad7:: with SMTP id p23mr908941ljj.465.1611337671368; Fri, 22 Jan 2021 09:47:51 -0800 (PST) MIME-Version: 1.0 References: <20210120173612.20913-1-will@kernel.org> <20210120173612.20913-9-will@kernel.org> <20210121131101.GD22123@willie-the-truck> In-Reply-To: <20210121131101.GD22123@willie-the-truck> From: Linus Torvalds Date: Fri, 22 Jan 2021 09:47:35 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 8/8] mm: Mark anonymous struct field of 'struct vm_fault' as 'const' To: Will Deacon Cc: Luc Van Oostenryck , Nick Desaulniers , LKML , Linux Memory Management List , Linux ARM , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , "Kirill A . Shutemov" , Vinayak Menon , Hugh Dickins , kernel-team Content-Type: text/plain; charset="UTF-8" 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 21, 2021 at 5:11 AM Will Deacon wrote: > > > (It turns out that sparse gets this wrong too, so it's not just clang). > > Adding Luc, as hopefully that's fixable. I had talked to Luc about this earlier, and he just sent out a fix for sparse. It's not in the git repo yet, but it's coming. Having looked at what sparse does, I suspect the clang behavior stems from a similar approach to looking up unnamed struct/union members. And the sparse fix was fairly straightforward: changing the _lookup_ is painful, because that's late and trying to fix types after-the-fact is just not great. But just (recursively) modifying the type modifiers at type parsing time for anonymous struct/union members is quite straightforward, probably in clang too. So honestly - I think the clang push-back was by somebody who thought it would be nasty to fix, and who was thus actively trying to mis-read the standards language. I'm not willing to argue with compiler people who do standards language weasel-wording (I've seen it before, my life is too short to deal with those kinds of people), but maybe Nick is more used to deal with clang people. Nick - I suspect that the sparse type system model is different enough from the clang one that the sparse patch is not really helpful as a "look, this is how it was done in sparse, maybe clang can do something similar", but I'll bounce it to you separately anyway just in case. Maybe your clang knowledge means that you go "yeah, in clang that function is called 'xyz', and we can do something very similar". Linus