Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2345378rwd; Fri, 19 May 2023 04:40:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4nZUCNBBb3ZT/jopNL/KNY/00GDl2BpYiaFO+XzDHllpyKzmitik89rN8kDwZufs+cZf+r X-Received: by 2002:a05:6a00:a21:b0:646:9232:df6 with SMTP id p33-20020a056a000a2100b0064692320df6mr2862673pfh.33.1684496410389; Fri, 19 May 2023 04:40:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684496410; cv=none; d=google.com; s=arc-20160816; b=TbUheTMQEVf63LAEtz9YEg0d5JGNV1x8HXbUXHmoe5yBd1XeofDb1tBuRf/XfT9BCR UzXEOx1cFQp+0Hnpt1qNXpRLnlVyb8238kX4/TekgzyWAwkYrHnjY6ytBmjxCQAEhcnc lX+RnVKa1Z/JNYdW9THtbsW30PoT89iINTE6o4UZFSzqNjiUmtmRx9Xn0pzDfuId7nBv HkRn80T7v3ptY1XsoCSiJTpnLFYfRENEuaHOhiyqhuT3CXoY+OX+zc0YpdH1kaf9mUWa D/MfimABWlRc/ZSRF11oqhqQndo7kUu3TTvgIt+2845uFJIA8lRJTZKtepJSjr0GMV1v OI6g== 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=yiBR+Yba3j/23iOE52mgUEBP1N5u342gIKguQlNdIXk=; b=QW1ZmrR9B1bb478ryQafUZbR+r5LzGXEyHBZJ3fcj8DMvTVdHuO8YysnfB0gvdizRj IuAHRPtLLadmV1MTvLAXqpgoukBEuKE+2pT33iKXblwnb9SFHBOa7UYPh1x6aEkA9vg4 YCM343aoCXCpPCgXvXv5bZ4hDTz2UBH04K70IeleTXl4AZZ4FgoyH/C9mNPE7A1Y6rAR 2mFMJ3YvN4SgY6Q5oowZoKMsAVpJFMLaBYh5lDZpqDhXmt8mpEmqiY8Jf3JrZh3X3bf1 2nl4YqKKX4IWBTAWh4RIHOdv7j5Z1jlSs5uFELsOvgvj8ViGvt+u4xAtOiD7TLF6c/Yr OErQ== 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 n15-20020aa7984f000000b0063b6bc7df13si3899143pfq.209.2023.05.19.04.39.57; Fri, 19 May 2023 04:40:10 -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 S230093AbjESLVz (ORCPT + 99 others); Fri, 19 May 2023 07:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjESLVx (ORCPT ); Fri, 19 May 2023 07:21:53 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DFB13AD; Fri, 19 May 2023 04:21:51 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 62BB992009E; Fri, 19 May 2023 13:21:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 5B8CC92009B; Fri, 19 May 2023 12:21:50 +0100 (BST) Date: Fri, 19 May 2023 12:21:50 +0100 (BST) From: "Maciej W. Rozycki" To: Christophe JAILLET cc: Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 1/2] x86/PCI: Fix a sanity check in pirq_convert_irt_table() In-Reply-To: Message-ID: References: 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 Sat, 6 May 2023, Christophe JAILLET wrote: > We compare the size in bytes of a struct (and its ending flexible array) > with the number of elements in a flexible array. Incorrect, see the inline documentation for the struct. > This is wrong and "ir->size < ir->used" is likely to be always false. Hopefully, but we've seen all kinds of rubbish in PC BIOS data, and this data structure seems available for OEMs to program with a tool called BCP. Better safe than sorry. Therefore, NAK. Maciej