Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2288827pxp; Mon, 21 Mar 2022 16:00:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsUFrJ3bnPbrrdNYclAOMPmv2so+8c/ZLI21OQZJPoH3fD5bGvM3XjPyqlHRLxwwpL9nf8 X-Received: by 2002:a05:6870:51c9:b0:dd:ab37:c358 with SMTP id b9-20020a05687051c900b000ddab37c358mr547285oaj.173.1647903638615; Mon, 21 Mar 2022 16:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647903638; cv=none; d=google.com; s=arc-20160816; b=wga+Tf1Zsx2pMlJZRYrZ8GoUf59SZGqzeWuTFd4BUHo0leLFUV9a7zawHlBcoyjEth iIkhgCyIG4HygqBeKKQtRbXUSvKOeKBLm0IWuGXJcH5vuXarfU0kUOyZG9VlR9L/9MpV 8Rvyx7IT7aK8pDvJIAodsTSKG+SF1GWE/TZkcXZgReZooXsK1T01N13+u1kdmoarzyP2 a9zfgxhdQh+kRWXKepXohZiZCyn3Cc2/yQIAryDnm1KPgOTRShdEUNCPVgNAhoOKX5qk +feooFla9Hg68fZ3wQzK6dDEWD84qNoQT5ncEZ6kwR+bRFSmhEktEFL4anZqO2PPe2wk CF8g== 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=aFxzGpzAQGg1EGakyZS/LXoircaI04KYp45wi+/GbCQ=; b=l6hSVI12haIkf+0GtaNju6XB+64nnqtEo9njvUdVxsATpSv/E7IkL9WxsBoeB/v+QU /R/mk9tGciNXVp9n+G8R3YtyRIUwFqSDmp5zetKRE0i1cdhBYeQUfVC9w2ZymplyCHlb nzM7YCYqvFQIrvbCSwxzygENYTbefC62ewc4u0IXDDAe9pi+otZuTtC9GWF+py8tblZm exayS/+aKr7lUsY0joEv1CLfHCVbK0FT58iPBn36/qhK+CoQo0OYR70A+bkCNqmpH9u0 HfwR4Tw3LkBkKTGQWvrkptPx+N/GMga7VpJYme3543Ev3dwP8eITrGgGnH8XcLeiybxv /1Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MavGLUJG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f17-20020a056870899100b000ddb1d06a02si10205938oaq.139.2022.03.21.16.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 16:00:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MavGLUJG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F9373FFD46; Mon, 21 Mar 2022 14:59:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352516AbiCUTSy (ORCPT + 99 others); Mon, 21 Mar 2022 15:18:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244022AbiCUTSx (ORCPT ); Mon, 21 Mar 2022 15:18:53 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB25716F06E for ; Mon, 21 Mar 2022 12:17:26 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 25so21226566ljv.10 for ; Mon, 21 Mar 2022 12:17:26 -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=aFxzGpzAQGg1EGakyZS/LXoircaI04KYp45wi+/GbCQ=; b=MavGLUJGF5YnrI1FF05vdX2WdST/o+GU+GD0GclkvDK5kJekTuz+HWwZG77hOMfGbe tXReUUcfX93veYWmTFQGAbO3y10SvkBWvFMoNj2QcTMpRKj2sx/QjR/bO07uGKOUx1uH v/O2Pc0JyXzhgh/yeT2I22SHESPS7155zsoiw= 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=aFxzGpzAQGg1EGakyZS/LXoircaI04KYp45wi+/GbCQ=; b=qpEM0V+I8XqQYca9h/l2tQJ9j16iWtNCBOCtXMCAPT5jb/0tM0OBKpWB6ROBhiOvKG Apd070E878l2QXC7KdXhhK1KSjSTfCLYtn7qAVd11Q+SkFaTfeUHGEBeEdzx+x1Yuj88 enHr7ehxnS0j7ex2f9YDU1rC59QOjdGejbETkpDwFaXVLoJUasT/SHFI24NY/B4a5M1q A6oO3BhrBNDcYMVolHA8JT1ozrayBFEi5v1ZgXinD9kk/i1Dv3EYC4lGQWhq2glvbvCu 9YfbQJnWOb8vl6AQYZGkwVeYOzSeDTC+oAMJ5wuzcMaiZAVXWmN9B3NiLikdbeCtVFvC kXKw== X-Gm-Message-State: AOAM532Zy9lsPZsrUxNKGhFZ+ZYrA2lR0Bn3GH5xwyI/vxvSDidIeHNL I2asZOhwDjh9LQtk1ekcIvoow9mw+MkljCin4rw= X-Received: by 2002:a2e:92d5:0:b0:246:59e9:a591 with SMTP id k21-20020a2e92d5000000b0024659e9a591mr16198535ljh.1.1647890244593; Mon, 21 Mar 2022 12:17:24 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id b3-20020a056512304300b004488e49f2fasm1879514lfb.129.2022.03.21.12.17.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Mar 2022 12:17:23 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id w7so26220855lfd.6 for ; Mon, 21 Mar 2022 12:17:23 -0700 (PDT) X-Received: by 2002:a05:6512:b13:b0:448:90c6:dc49 with SMTP id w19-20020a0565120b1300b0044890c6dc49mr16158631lfu.542.1647890243315; Mon, 21 Mar 2022 12:17:23 -0700 (PDT) MIME-Version: 1.0 References: <164786042536.122591.4459156564791679956.tglx@xen13> <164786043041.122591.4693682080153649212.tglx@xen13> In-Reply-To: <164786043041.122591.4693682080153649212.tglx@xen13> From: Linus Torvalds Date: Mon, 21 Mar 2022 12:17:07 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT pull] x86/irq for v5.18-rc1 To: Thomas Gleixner , "Maciej W. Rozycki" , Dmitry Osipenko Cc: Linux Kernel Mailing List , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 Mon, Mar 21, 2022 at 4:02 AM Thomas Gleixner wrote: > > - Handle the IRT routing table format in AMI BIOSes correctly *Very* minor nit here in the hope of future cleanups: the other x86 irq routing table structions (Christ, that's a sentence that shouldn't exist in a sane world) use "__attribute__((packed))" and this one uses "__packed". They are all right next to each other, maybe they could be made to have the same syntax? HOWEVER. That's not what the problem with this pull is. I pulled this and then I unpulled it. Because that stupid IRT routing table code already been reported to cause bugs: https://lore.kernel.org/all/a2791312-2957-27e6-43af-c805bbb90266@collabora.com/ which seems to be because the $IRT signature check is complete garbage: > + for (addr = (u8 *)__va(0xf0000); addr < (u8 *)__va(0x100000); addr++) { > + rt = pirq_convert_irt_table(addr); > + if (rt) > + return rt; The above doesn't seem like it could really ever have been tested properly, since it will walk off the end of that __va(0x100000) address: it will walk every byte up to the 1MB physical address, and it will try to find that $IRT signature there, but if it never finds it, IT WILL CHECK THE SIGNATURE PAST THE 1MB mark! So I refuse to pull this, and it should never have been sent to me, considering that it had a known bug, and it took me only moments to see how completely wrong that code was. The fix seems obvious (you don't walk every byte to 1M, you walk to 1M - the size of the struct, and then you also check that the number of entries actually fits - Dmitry can presumably test), but no way do I want to get this kind of clearly broken thing this merge window. And yes, I'm unhappy. This bug was reported a week ago. This should not have been sent to me today. I also assume and suspect that the $IRT format isn't even used in modern PC's, so this must be some really odd special legacy case that very few people can care about. No? Linus