Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4616347imw; Tue, 19 Jul 2022 09:52:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vaa/J0a5mJW4obgvm7EqpOKW6LCtkxwVWwNLeMDodaAW0qakvlrgr7Aia0XOrkfl67KElA X-Received: by 2002:a17:907:94c3:b0:72f:3f8b:d628 with SMTP id dn3-20020a17090794c300b0072f3f8bd628mr8122600ejc.313.1658249552435; Tue, 19 Jul 2022 09:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658249552; cv=none; d=google.com; s=arc-20160816; b=AVCqmwCiHgzvg+u5KCMZ2mhWjCPqs+F8/vbCUP39jEu55jjJFWT/YI561j3Ro9fjg1 nkHn8tgAgA/FKHhY//lhWqBd1QheodFHgjbFmqkUGWcRGMKiPOhRIavPbkHhu1LyHOGG 15Tk37uTujH8sl+R/zDq+gy9D9q+IkKEGhooiUbLwmZT13hEK7pJWCnMSC6BVDpn+/8+ tgVfsM048LVK4TafRrsVrVi3OGEpaviN1H+cEhmWblekCxYUZjrM7x5VXjnEZavwrLum Lhjx15oaXfhxmlyXmYWR37hB42nOghP7ix6v1Q6DkLyGD1UV55fbT/SA6Ubk5ZPi7OYE bsNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=MBmLWyaZ30FceqFgusBS/ik0ibjGzPKsczBmZu8/JzY=; b=rHIhVoA/5PewKDtNSoeSgIj2YQ0hQMScO7wOn01/Gzcexkvxx1XZjYG/56hP1Nzhiz PsRhutN2v4BcvVnocoM0oh4ab45xXwwlVgXM6LRqIrM/f0p7rMSgVFjR5DrI+j9hiWvZ nB/3JVPYgJmDTSrTJWf4php2xdT62WQmROOiTMJmAOdvweixmZgAExmECXbBgsGDfjmD qB5IBlDN8Kgjc5tZywH55GVoEL0Sgo4RH/R3T4rbWJOYYZ7OnA+vCvUJarTkda15Fr3l +45b6BfgfepfDJUQA75cUryB1DglC5/cglzIw/Fu9hGMXowbnkyTD6O1n9TV+6oPGl+V V+rg== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p25-20020a056402501900b0043761340274si19299714eda.127.2022.07.19.09.52.06; Tue, 19 Jul 2022 09:52:32 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231495AbiGSQrX (ORCPT + 99 others); Tue, 19 Jul 2022 12:47:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbiGSQrW (ORCPT ); Tue, 19 Jul 2022 12:47:22 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C592A545E3; Tue, 19 Jul 2022 09:47:17 -0700 (PDT) Received: from fraeml745-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LnPpC6PYwz67xX3; Wed, 20 Jul 2022 00:45:23 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml745-chm.china.huawei.com (10.206.15.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 19 Jul 2022 18:47:06 +0200 Received: from localhost (10.81.209.49) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 19 Jul 2022 17:47:05 +0100 Date: Tue, 19 Jul 2022 17:47:04 +0100 From: Jonathan Cameron To: Dan Williams CC: , Bjorn Helgaas , Lukas Wunner , Alison Schofield , "Vishal Verma" , Dave Jiang , "Ben Widawsky" , , , Subject: Re: [PATCH V14 7/7] cxl/port: Introduce cxl_cdat_valid() Message-ID: <20220719174704.0000344e@Huawei.com> In-Reply-To: <62d221b999ece_242d29476@dwillia2-xfh.jf.intel.com.notmuch> References: <20220715030424.462963-1-ira.weiny@intel.com> <20220715030424.462963-8-ira.weiny@intel.com> <62d221b999ece_242d29476@dwillia2-xfh.jf.intel.com.notmuch> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.81.209.49] X-ClientProxiedBy: lhreml749-chm.china.huawei.com (10.201.108.199) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 Fri, 15 Jul 2022 19:26:01 -0700 Dan Williams wrote: > ira.weiny@ wrote: > > From: Ira Weiny > > > > The CDAT data is protected by a checksum and should be the proper > > length. > > > > Introduce cxl_cdat_valid() to validate the data. While at it check and > > store the sequence number. > > I am going to drop this one. Userspace can determine validity when it > parses it. When the kernel grows a CDAT parser it will rely on the > standard validation of ACPI-table-like structures from a future > __acpi_table_parse_entries() derivative for this purpose. OK, for now I guess.