Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp497828imw; Fri, 15 Jul 2022 07:21:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uvqbhFw0/bCbK6McROTcA11HhheafS5jT4MkK82MWXPful/hAv+8ln8i1rsU0EAA3UCqZ4 X-Received: by 2002:a17:907:7e87:b0:72b:4af3:bf57 with SMTP id qb7-20020a1709077e8700b0072b4af3bf57mr14016273ejc.9.1657894909898; Fri, 15 Jul 2022 07:21:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657894909; cv=none; d=google.com; s=arc-20160816; b=gcboBRk0vJuqMEB+wkKYfLAV0IeJx7LBLwjxjkldBw3erK2eMYHceH54Na/nqMxke7 U1sXgdbYjBiDv0ARYUM3i4EWIs/rTRaZZF9bN0dr9WR8TTpVV6zCRKPvJBF+QaMKDljT xqK+b1Q301xzR4OgF9SyH7H4EKIQPVoYUfbeDSXLOAbc7/dPuby1CWlVL3eFs3KCbYjq Ta1JErZyjPuX7aBcwYk119MYQGTprFhow5j2JrB8jZbsBgzslS5rpUWILSqFR5CVIClj K5qX0F9nPKssQ/BxpdFUYazWIjzJ9GS2zM7FZ4ri4uo5hit7FCxFZZ0ksTvv0c43rUSV mf2Q== 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=QbGEmJveh3meLgmCPkkX0DKI0iC+qcLBcQMOHTKMAeA=; b=HEnFvPsLuxxd0BS9UlqXTAJkcz64vMaQ71YfwxH9XHb/lwoWx6ZHbOY7cF//nVDg2T xDXRwuiX+pjqGXcy1awwYyMlahDC6CIhNBfO2lAMVhNTTpPKF3rTl+6pL0z7+rA2HD2R 3UiT8oxitFZ5tWEPXTfCBgTaI7fSPMe2yXLWVuRRdLYKW6LZnEkUCuq5L23kyMsEyKes j+HuWNsSZH8iAmezOPykftYeKtPgmKDy+87662csADHniA8WIgcyvygmhQan4fQjsh89 FWlVqh5LCAP+MxWjbvEQCJxa6mL1DtnXcO4PqiKft7CUkIOihqSx4HgwmjoR9RJ3wvOi WstQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=LB2MDoPt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a170906248500b00720fab07981si5262941ejb.336.2022.07.15.07.21.24; Fri, 15 Jul 2022 07:21:49 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=LB2MDoPt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235116AbiGOOES (ORCPT + 99 others); Fri, 15 Jul 2022 10:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235384AbiGOOED (ORCPT ); Fri, 15 Jul 2022 10:04:03 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AB3A1085; Fri, 15 Jul 2022 07:03:58 -0700 (PDT) Received: from zn.tnic (p200300ea972976d6329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9729:76d6:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 4D6FE1EC0230; Fri, 15 Jul 2022 16:03:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1657893833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=QbGEmJveh3meLgmCPkkX0DKI0iC+qcLBcQMOHTKMAeA=; b=LB2MDoPtY6niEMtL5F7KecDtH4G0UZgkeTflXgMMlmXzw5ldpKCVemI9gqTPo5AbSxg4EW neTaQrJ9rtBNWQfLpqiya0QbagUNun22n4H4xbVnGw/H+WnaqfWZRgp/+bLcfLXcAu155u ALgPcfTW5UMjfnkyTyX7SUoHin+yrs0= Date: Fri, 15 Jul 2022 16:03:47 +0200 From: Borislav Petkov To: Linus Torvalds Cc: Guenter Roeck , Peter Zijlstra , Thadeu Lima de Souza Cascardo , Naresh Kamboju , Greg Kroah-Hartman , kvm list , Linux Kernel Mailing List , stable , Andrew Morton , Shuah Khan , patches@kernelci.org, lkft-triage@lists.linaro.org, Pavel Machek , Jon Hunter , Florian Fainelli , Sudip Mukherjee , Slade Watkins , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Dave Hansen , X86 ML , "H. Peter Anvin" , Alex =?utf-8?Q?Benn=C3=A9e?= , Anders Roxell Subject: Re: [PATCH 5.15 00/78] 5.15.55-rc1 review Message-ID: References: <20220712183238.844813653@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 Thu, Jul 14, 2022 at 01:39:25PM -0700, Linus Torvalds wrote: > On Thu, Jul 14, 2022 at 10:02 AM Borislav Petkov wrote: > > > > On Thu, Jul 14, 2022 at 09:51:40AM -0700, Linus Torvalds wrote: > > > Oh, absolutely. Doing an -rc7 is normal. > > > > Good. I'm gathering all the fallout fixes and will send them to you on > > Sunday, if nothing unexpected happens. > > Btw, I assume that includes the clang fix for the > x86_spec_ctrl_current section attribute. Yap. Here's the current lineup: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86/urgent > That's kind of personally embarrassing that it slipped through: I do > all my normal test builds that I actually *boot* with clang. > > But since I kept all of the embargoed stuff outside my normal trees, > it also meant that the test builds I did didn't have my "this is my > clang tree" stuff in it. > > And so I - like apparently everybody else - only did those builds with gcc. > > And gcc for some reason doesn't care about this whole "you redeclared > that variable with a different attribute" thing. ... so why does clang care? Or, why doesn't gcc care? I guess I need to talk to gcc folks again. > In the 'x86_spec_ctrl_current' case, that nonsensical code _worked_ > (with gcc), because despite the declaration being for a regular > variable, the actual definition was in the proper segment. I'm guessing this is the reason why gcc doesn't fail - it probably looks at the declaration but doesn't care too much about it. And it is the definition that matters. While clang goes, uh, ah, declaration and definition mismatch, I better warn. > But that 'myvariable' thing above does end up being another example of > how we are clearly missing some type checkng in this area. > > I'm not sure if there's any way to get that section mismatch at > compile-time at all. Well, apparently, clang can: arch/x86/kernel/cpu/bugs.c:58:21: error: section attribute is specified on redeclared variable [-Werror,-Wsection] so there's a -Wsection warning which gcc could implement too. > For the static declarations, we could just make DECLARE_PER_CPU() add > some prefix/postfix to the name (and obviously then do it at use time > too). > > We have that '__pcpu_scope_##name' thing to make sure of globally > unique naming due to the whole weak type thing. I wonder if we could > do something similar to verify that "yes, this has been declared as a > percpu variable" at use time? But how? We need to save the info how a var has been declared and then use that info at access time. Yeah, lemme bother compiler guys a bit... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette