Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp942661imw; Thu, 14 Jul 2022 13:58:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v+5HryBTojzTcsBAiP2aUhJRn/nVhUMrYAGRIKpwle0IGWepVW1jEThf6sxRj1ZwKh8UHW X-Received: by 2002:a17:907:2d25:b0:72b:83c2:ab90 with SMTP id gs37-20020a1709072d2500b0072b83c2ab90mr10493082ejc.373.1657832330972; Thu, 14 Jul 2022 13:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657832330; cv=none; d=google.com; s=arc-20160816; b=LePD5A9qKcjlUkYZztrwje2Wci5PdJrX4a22RgGx0wznEyNUzNn9MFXAgJsfmtRrDN KGVlDoaPVqBSyGEOXne7CJb0OFe2AE6Cj2flPVmvgCVhOJscWwo1m3AuWpUqwXuKnK89 Cd1gSK8SxbHApjS2XX7WsERZGcKZO48zEK0WVxQLj3tRyQqkqCvp6kYJ1Xbkeb+36HJ0 fJ/BjkRfavu7iJlFeOeSUElTxAIEPZot9dSHVa0Ud9ra9wS7HFzpaMDzNOxYMDyHptwF S06oHb1gMCc+AQF/yU/jPyw5FnrclGPJ9fMbUO4LyZzVoC2R++zK9Ve2dpQ/4DXqhlrF GYiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=TExNSZ/s/035rcwvcGhKf8b3mCtg1+8MAx2E+0mZs0k=; b=iG5EwlDR+jmhMXQBe64N/7ntC/vIWOGbIhWm1Yfr0+NAxm4fZLGsB8IXnZm6K+7gY8 E9cZW5KwQAe0MPfIHfQCZrkUwFcOM0zXZWAP4ZoEgDMYz1Zq10yly6NrsPshM50oUNv0 FlBFmTD+xeNmqCkaDppb6JJAMi/N3ISvPfwTv/k+ijOs0MZX9ackErG6nyL9F+UReJMH Ng2c1etZ623AO5xUKrWnfNTq1y+FuYBlmVHoPPFYMp0zYZJ/X6tweh1fdUqfY5OvJm4D IzLouhH0YjGkF6a/vYGbG77yjDVtmUwMv9DY380+Ql85G6QfdEzA9tZAnnJdMAvVbbKg X/Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=QlimJt9j; 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 cs18-20020a170906dc9200b0072b5ed5a846si3861106ejc.43.2022.07.14.13.58.19; Thu, 14 Jul 2022 13:58:50 -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=@linux-foundation.org header.s=google header.b=QlimJt9j; 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 S240512AbiGNUjy (ORCPT + 99 others); Thu, 14 Jul 2022 16:39:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240511AbiGNUjt (ORCPT ); Thu, 14 Jul 2022 16:39:49 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A6BC422E0 for ; Thu, 14 Jul 2022 13:39:48 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id y4so3914813edc.4 for ; Thu, 14 Jul 2022 13:39:48 -0700 (PDT) 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=TExNSZ/s/035rcwvcGhKf8b3mCtg1+8MAx2E+0mZs0k=; b=QlimJt9jnXA9WGUrrQpsyCnanjLLw2jppJeg8tlDJyUjoU7EVZkhjwQfw1utPbJFYw V2J/VhZUmpGT/0AOkO/cGcOvDnr/166nGbtK/23TIpPRTkOHY0byi1fwM5PVz2v65CaC CGxmh6/85iCwDd/Ru/CPAYbK8QhOpNrWTrRyY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TExNSZ/s/035rcwvcGhKf8b3mCtg1+8MAx2E+0mZs0k=; b=p3sU8ocDWUtN5XERyvV71L5gL58j8+/DbbU07TtK0+z2w+r7LEPHZkfvK3rjgJysWW Qk1T1y/Il2nAidLu83x6twkmfXbZFa3RGsy2MjwDL0095ObYpaEW5uoqJQlEYA/psUgL XrCzToqcNqdFzgHJMIKb3/6x2dkdtnSXR97JMyrORDiL3pxiBa9rIFClLJAzPK6+Es6Z /kosi2wy8YR3CTTOdtR3le1acuIFJfSJaUBKGr1V3jbopyTuCu7br7dowC4fgGduEplS CGvbdycNi8eJl9YEB6ooauadgnpEJQjan+LC23ypXK4TocA0BMnn3hiAmC0MH/twe+lV PXMg== X-Gm-Message-State: AJIora+lrwht2ZP1j9qEjsgd1pHlVJ88jR6ChPCvfaDKcCb19D38kqOm pZiUnl9SGvOzBlTU55pHwGpVKb99QqUWJsQJ3tE= X-Received: by 2002:a05:6402:2549:b0:43a:dcf2:27f8 with SMTP id l9-20020a056402254900b0043adcf227f8mr14632764edb.143.1657831186903; Thu, 14 Jul 2022 13:39:46 -0700 (PDT) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com. [209.85.221.46]) by smtp.gmail.com with ESMTPSA id y18-20020a1709063a9200b007030c97ae62sm1090567ejd.191.2022.07.14.13.39.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Jul 2022 13:39:43 -0700 (PDT) Received: by mail-wr1-f46.google.com with SMTP id r2so3068952wrs.3 for ; Thu, 14 Jul 2022 13:39:41 -0700 (PDT) X-Received: by 2002:a05:6000:1f8c:b0:21d:7e98:51ba with SMTP id bw12-20020a0560001f8c00b0021d7e9851bamr9427301wrb.442.1657831181447; Thu, 14 Jul 2022 13:39:41 -0700 (PDT) MIME-Version: 1.0 References: <20220712183238.844813653@linuxfoundation.org> In-Reply-To: From: Linus Torvalds Date: Thu, 14 Jul 2022 13:39:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5.15 00/78] 5.15.55-rc1 review To: Borislav Petkov 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" , =?UTF-8?B?QWxleCBCZW5uw6ll?= , Anders Roxell Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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. 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. And sadly, our percpu accessor functions don't verify these things either, so you can write code like this: unsigned long myvariable; unsigned long test_fn(void) { return this_cpu_read(myvariable); } and the compiler will not complain about anything at all, and happily generate completely nonsensical code like movq %gs:myvariable(%rip), %rax for it, which will do entirely the wrong thing because 'myvariable' wasn't allocated in the percpu section. 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. 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. 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? Linus