Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1932885pxb; Fri, 25 Mar 2022 08:11:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNQo2sQUnXwy6utvACDRsoySHhg+Bn/pwQ6uY2JYdV/rTsBViC67cuqZuvaDVhtd42P/rX X-Received: by 2002:a17:902:7c0d:b0:155:d507:3cf0 with SMTP id x13-20020a1709027c0d00b00155d5073cf0mr3463680pll.103.1648221063838; Fri, 25 Mar 2022 08:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648221063; cv=none; d=google.com; s=arc-20160816; b=ip7BUUHSw/LAov80wXk+Ti0S5I75eucj7E2vLoyyemOv8kW/dOjRYTSJCaymEQhJO5 FosRbTdu+fGQSQ8REY39Nhu3N5TnAIbBevo0Z3Yi+ufLDCcF8lvhxyJgV6tBapC76Dfz d6p9qH/kVMgp9ZIbZQrD3QgmxljSKrj/2G7ePb+mHrfH8ofT8GZcqJbK3LRY99xdwPPm fXU/usfSemp9ySVdDcvP6ifva6yCpaz7XpnW099Qj8JRBmM6p9kMzMUmQzjJrvlnxL2s 5MXAqSaos9nNEegVDO9r4EMRu4U3XMlHngZX3TaoTn/14BqeQ5Y4fwKX/2UdNqgwx0qJ 7FtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=OpBSQhC6iOXd+X/q1w7V0CfNOVrHBn2iT8lCFiB+WkQ=; b=Nx4nGuAoDuD5E8aJDEvJ6o6aK5AdRR+j+nWJU3C1T6bJcTWXxOwDqLzVELP/lr6efU 1/B2h9kGbNW4PdgfzFsxFkQD9ffODbMYKB1m1uPRLaE/+6pfbyL2WE5vRhY4OEZE39ex emRJWNHYTcaUpWFxYG0CkYQkJ7YPDWtYx7yIog/CPLmfX2GUWhUwJ5iH7EwFYcMBHgcw mc68MW+Ton6lVc9boOhoeF0TU+HKnL0h0Nu72NH/HGUaBo0G6AOOuSZ3eec1v+cW9vzR vAFsOuyTqgenhGOuVfRKS+JOkzbIbNUfSXcrK7OfHB7NNMgZ8aUqBMYXcAUs4FOMzv3Q LP9w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e18-20020a17090301d200b00153b2d163fesi2828844plh.6.2022.03.25.08.10.49; Fri, 25 Mar 2022 08:11:03 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241054AbiCWVZR (ORCPT + 99 others); Wed, 23 Mar 2022 17:25:17 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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