From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E31E7C433EF for ; Wed, 23 Mar 2022 21:23:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241084AbiCWVZS (ORCPT ); Wed, 23 Mar 2022 17:25:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbiCWVZQ (ORCPT ); Wed, 23 Mar 2022 17:25:16 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 94B7B10FFF for ; Wed, 23 Mar 2022 14:23:46 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 7276F92009C; Wed, 23 Mar 2022 22:23:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 6C84E92009B; Wed, 23 Mar 2022 21:23:44 +0000 (GMT) Date: Wed, 23 Mar 2022 21:23:44 +0000 (GMT) From: "Maciej W. Rozycki" To: Linus Torvalds cc: Thomas Gleixner , Dmitry Osipenko , Linux Kernel Mailing List , the arch/x86 maintainers Subject: Re: [GIT pull] x86/irq for v5.18-rc1 In-Reply-To: Message-ID: References: <164786042536.122591.4459156564791679956.tglx@xen13> <164786043041.122591.4693682080153649212.tglx@xen13> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Mar 2022, Linus Torvalds wrote: > 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! Drat! I did verify this code in a simulated environment that does supply a $IRT table (for a reporter who has an actual system; I'm not lucky enough to have one), however somehow I didn't think of verifying it with a setup that has neither a $PIR nor a $IRT table. Therefore this issue has slipped ($PIR scanner works in 16-byte intervals, so it escapes the range overrun), and then of course things started moving only while I am away enjoying Italian mountains. Oh well, nobody's perfect. Thanks for narrowing this down, I'll post a fixed version on or shortly after this coming weekend. And sorry for the mess-up! Maciej