Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7653447rwl; Tue, 10 Jan 2023 03:47:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXvScvuIhpZ9WJNUqqdmkm7Xn2MvO+OH3OEBqjSa8Z+4Q1oWQl6QwNDA3AN1llepUyfdwzk8 X-Received: by 2002:a05:6402:685:b0:46c:e558:ce60 with SMTP id f5-20020a056402068500b0046ce558ce60mr58098124edy.22.1673351225359; Tue, 10 Jan 2023 03:47:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673351225; cv=none; d=google.com; s=arc-20160816; b=XfFnGvDqCexzmerPQM/xwukzfhcK5kHxgaK0A7lkidN77be6uiom+hB3Xd/ZjlIz5M K7GgywlmmZDqI9S3v5hN9MpoDTBIoYH7rZjSnuRVyInZTQxUYrgzdx7SZy63eCVW525H /AU2jTNuVDQwApD4e8njAh72R/BQPw13ZvSpNKRzKt0Klf5jJXPxchA6vfC+fBWJCEuS RauJ0C69kRMBLf2A7pKawkrrJ1/LW0J72x5ewIXEo9QGQpdOe+tD1JJ9sk2cSWaDWBgD CAZIZvQQqA8ignAW+XHRv9aJnY6fxbvWk3ZX6Tryzv8lk2PoDdXtkkDs/4Mha0VNpJL8 5qIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TjVHre6LdoOndqEHjLrK+qihKkTdcFZKI6AZWZ34mR0=; b=RL15M0EuwXTeu8DFnkEzy2aApKHhk41Fn3Snff9edhPPgZQXvNktB+ug0k5p2w1q5+ oDBwE27UsIZpO+90wGSNfxi9gfoQotA7LFl/XrrbHGcYtCpM9zDsVV3QMZTNEoykc/bL ovlAr7Y1q9yqbIZedHVHwDE3sAVhNSSdNw7MQ4dW7i3llkkfNgkLDCse33U3q+rADuaz 3SQtvAQJ0aiL/AgMs+B9BtB7mOBISf7KfPWxBH5npS3+PyS1kyF5ZBWUO5ilvI2Qtk4j YGobS1x3RMt/FWsdYWW8m4M34rnizTuoVWLKOdyX5ozHHemrDL+2uYDXfCvW0cvv4JC2 wTeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=k3tQygqv; 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 dr5-20020a170907720500b007c12e19ba40si12019477ejc.666.2023.01.10.03.46.53; Tue, 10 Jan 2023 03:47:05 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=k3tQygqv; 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 S230094AbjAJKpf (ORCPT + 53 others); Tue, 10 Jan 2023 05:45:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232009AbjAJKp0 (ORCPT ); Tue, 10 Jan 2023 05:45:26 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA0B45BA21 for ; Tue, 10 Jan 2023 02:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=TjVHre6LdoOndqEHjLrK+qihKkTdcFZKI6AZWZ34mR0=; b=k3tQygqvCUDVb84gJ2I/HrprVN GtRPlitqskloTVHL5lN97qTdP97uLBJNUmfJboWY2Ag5HEeOrL7x/5CGKTLavMSNMjc8VcCOMjXWV kk8aCyzoYLMfBZvUwFKBh1LewDPDKRmzVyRFSKAFMD+dcQ82IbsyYxNQcuodQydenSEnNR6YJNtdj rTMCas91d83njpKrYB+wYmDBi1dCby+Fz6EpgmZOPF1y/MXEW/0wgSC+aDoNOee75lGfA1sdUhznb yneM8SbXQqQJ+WFw034bEw23F+E519M900fJmKsMV9OztgV5H/iTiUZeDAuCOSgy5Nk1hKwq4ITyB fv7wFctQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFC7u-0038SO-9d; Tue, 10 Jan 2023 10:45:06 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B1D19300327; Tue, 10 Jan 2023 11:44:51 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9293B201ABB61; Tue, 10 Jan 2023 11:44:51 +0100 (CET) Date: Tue, 10 Jan 2023 11:44:51 +0100 From: Peter Zijlstra To: Linus Torvalds Cc: Guenter Roeck , Marco Elver , "Paul E. McKenney" , Kees Cook , Jaegeuk Kim , Vlastimil Babka , Linux Kernel Mailing List , dalias@libc.org Subject: Re: Linux 6.2-rc3 Message-ID: References: <20230109174742.GA1191249@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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_NONE, SPF_NONE 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 Mon, Jan 09, 2023 at 04:18:02PM -0600, Linus Torvalds wrote: > > In file included from : > > In function 'follow_pmd_mask', > > inlined from 'follow_pud_mask' at mm/gup.c:735:9, > > inlined from 'follow_p4d_mask' at mm/gup.c:752:9, > > inlined from 'follow_page_mask' at mm/gup.c:809:9: > > include/linux/compiler_types.h:358:45: error: call to '__compiletime_assert_263' declared with attribute error: Unsupported access size for {READ,WRITE}_ONCE(). > > 358 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > > > > Bisect points to commit 0862ff059c9e ("sh/mm: Make pmd_t similar to pte_t"). > > This commit introduces > > > > -typedef struct { unsigned long long pmd; } pmd_t; > > +typedef struct { > > + struct { > > + unsigned long pmd_low; > > + unsigned long pmd_high; > > + }; > > + unsigned long long pmd; > > +} pmd_t; > > > > That should probably be "typedef union", not "typedef struct". > > Ok, PeterZ has been off due to the holidays, but seems back. I agree, Yup, nearly 2 weeks of no email what so ever.. glorious! > that outer 'struct' should obviously be 'union', but let's make the > guilty party (ie Peter) fix it up. Urgh.. yes. How did the robots not yell at me before. So the original patch came in through x86/mm, but this is very much a SH only fix how do we route this? Linus you want to take this directly or Rich do you have an urgent queue for the next -rc somewhere? --- Subject: sh/mm: Fix pmd_t for real Because typing is hard... Fixes: 0862ff059c9e ("sh/mm: Make pmd_t similar to pte_t") Signed-off-by: Peter Zijlstra (Intel) --- diff --git a/arch/sh/include/asm/pgtable-3level.h b/arch/sh/include/asm/pgtable-3level.h index a889a3a938ba..d1ce73f3bd85 100644 --- a/arch/sh/include/asm/pgtable-3level.h +++ b/arch/sh/include/asm/pgtable-3level.h @@ -28,7 +28,7 @@ #define pmd_ERROR(e) \ printk("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e)) -typedef struct { +typedef union { struct { unsigned long pmd_low; unsigned long pmd_high;