Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp246039rwi; Wed, 2 Nov 2022 11:24:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6u6j36kTNmKpmB4fNihFeTEawUy0cU3+X4i+T9EU/4StJjGxsfvgXzI42uftXnFTEvtcnR X-Received: by 2002:a17:906:4fcd:b0:78d:8059:17c with SMTP id i13-20020a1709064fcd00b0078d8059017cmr25057717ejw.423.1667413479893; Wed, 02 Nov 2022 11:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667413479; cv=none; d=google.com; s=arc-20160816; b=X6KijnzjU/6GGe7N5ZewX7mJ8mhRPwvBvCMySc/p/LoqnPAEgF0564Tc+sbf6MAiqc MjB5o4rrHo6JP9mjsn+VpDQ7AwgWF/UR6aNfwFclHopZBVha9Fzyer6sW1qJStghJD3a yNrpdwDbxJnk8zpKfCYbI6iIbvrKOPGGFPEOaswbHKN5qacPm5h1swdfpLAxw+zdeVK6 m+y5VHsPM/8HMq++tlOYAwIK6p29YO3WLEsZ2vBubz1CGJGmhZNm6V3C/UVESTz8l6Kp F7MjMQ4KgddWZ/0WXVd5/7qnLkz8EGazYRIgHISgaKSNuSNbfzN9x8AeCpCywgB2hbWg 6tZA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Z1k7rDDaIMVjobICrNSXs8aCnXtji++forUZA9r7Xeg=; b=UVclsxxYBYpAL3aZV0+jR7eCKickrzEs1QoRxDguyWaE0mTw8HJjHZF2vPDg9kalZ/ S1yxjo3TbyAbE+ZcBNKGpXIenGVNflzEuXPiumJU5FqWngo6Xxn3GEdQr8dcnRq8ZY9t AALF3nl5P7+4M0JLwUVdM/x66S0v/x7Y+1RB6hfdey458d0ARqe/qVC31Dx1TwjeqIzb y28boCz0Ca1Qi6JRUk0mtANuWUFnFKTQ0L88QWBfSQqh1zW8ZUMXwMSZNomnyUnASi59 rd22Mi9ik2fOjmj0ieFVA5d2Ccw7NRMJhQZy/RKQVwjaMopEonbmITV/XRXAfFNw91bv EM1g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=inclyc.cn Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt13-20020a1709072d8d00b007836ec6999dsi19540162ejc.904.2022.11.02.11.24.15; Wed, 02 Nov 2022 11:24:39 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=inclyc.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbiKBSHt (ORCPT + 98 others); Wed, 2 Nov 2022 14:07:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230513AbiKBSHr (ORCPT ); Wed, 2 Nov 2022 14:07:47 -0400 Received: from mail-m118205.qiye.163.com (mail-m118205.qiye.163.com [115.236.118.205]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E58F52EF2E for ; Wed, 2 Nov 2022 11:07:45 -0700 (PDT) Received: from lyc-workstation.. (unknown [221.212.176.48]) by mail-m118205.qiye.163.com (HMail) with ESMTPA id AE4722C0508; Thu, 3 Nov 2022 02:07:41 +0800 (CST) From: YingChi Long To: bp@alien8.de Cc: chang.seok.bae@intel.com, dave.hansen@linux.intel.com, david.laight@aculab.com, hpa@zytor.com, linux-kernel@vger.kernel.org, me@inclyc.cn, mingo@redhat.com, ndesaulniers@google.com, pbonzini@redhat.com, tglx@linutronix.de, x86@kernel.org Subject: Re: [PATCH RESEND v3] x86/fpu: use _Alignof to avoid UB in TYPE_ALIGN Date: Thu, 3 Nov 2022 02:07:19 +0800 Message-Id: <20221102180719.2115424-1-me@inclyc.cn> X-Mailer: git-send-email 2.37.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFPN1dZLVlBSVdZDwkaFQgSH1lBWUNNSBhWHU0aGhpPSBgeT04YVQIWExYaEhckFA4PWV dZGBILWUFZSUlKVUlKSVVKTE1VT0NZV1kWGg8SFR0UWUFZT0tIVUpKS0hKQ1VKS0tVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Pwg6Syo4MDlDNzQdHy8*STQj MhcwCTNVSlVKTU1MT0pJT01JTE5DVTMWGhIXVRYeOxIVGBcCGFUYFUVZV1kSC1lBWUlJSlVJSklV SkxNVU9DWVdZCAFZQUlKSEI3Bg++ X-HM-Tid: 0a8439870ab72d27kusnae4722c0508 X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS autolearn=no 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 > What does that paragraph have to do with fixing the kernel? The clang patch D133574 has been made to satisfy the requirements of WG14 N2350. Compiling the kernel with this patched clang allows me to test where type definitions are used in the kernel in the first argument of offsetof. > Is this patch going to be part of clang? If so, which version? Yes. Probably clang-16 because this patch is not landed to LLVM codebase currently. The kernel needs this patch to be successfully compiled, in order not to break the ability of LLVM mainline to compile the kernel, I am happy to not landing D133574 for now. > Does gcc need it too? Since WG14 N2350 is generally applied to the C standard, I feel that GCC should reject/fire a warning pointing out type definitions within offsetof. > If so, should a gcc bug be opened too? I'm not very familiar with the GCC community, but I thought it should be good to file a bug. Link: https://reviews.llvm.org/D133574