Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6587087rwp; Tue, 18 Jul 2023 02:50:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCrA2rqbfmhruRkoomHVi5ZLOAZGXoTKVNNIllOzkgSmf/Z68t/Z5Gkoaw5dmUXNCdC6hO X-Received: by 2002:a05:6a00:c8b:b0:678:ee57:7b29 with SMTP id a11-20020a056a000c8b00b00678ee577b29mr18556386pfv.30.1689673804488; Tue, 18 Jul 2023 02:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689673804; cv=none; d=google.com; s=arc-20160816; b=CxIbpraNljZRwvZ6L28MiLg/VQQFfYAGmCmQSRu7fSH1r1gsCJ5jxVa4+fRNgi1Mvr OAtoYKziYG/uXopYZdFwdeknnuOun4/NAd9+nIrR1ZKjmx2Q/Mt6TsBixlJobK5ra3r5 r4xLtmMWsFFUV0koRquL6U8zXKW9uR5OwNPSMiknWc1d4ud1W2mSWPDQNAUrh5JMp994 EuxXS1x09eJv1r0K7kaZ6M0kiwM3HyMZE6dsseAgRJKl8CpjEWIEDkn9CFijykjt7LG9 rk8tQtnX3Vc93DoH19UgdZ4zy9w1ZBZ6mq8OzRccXY60DE0//s/CXnHsKVEQxhNT5RuS Eqkg== 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=X7uUIRPbBiV+R+Nq1sAwymhahOCvdxpkuDwx9uporHU=; fh=OA9WKjNjwOMpA3UWNMsqSibn9MKOxQ+Bs8gtmlI3RjM=; b=ibJZFDnGrB3bpOAU1EIDV1Tw+XVpmyvyweLZG1C6hiQyR8U4H6SN4Ol3azmtMllki8 3eAMb0A5oEuIfxG12QVBuzmYhFLQrEMyqBzWJ0e3qyJ/3te1zjS+vDKFupccFe7zglo/ 22TaPnbUQs2of1/YyvLi+/rSvrvU/+vKKr21kZPyu3tnqPeZ8u9A8JIlrn3XPYW/mq3N 0F5mLcBsQgi0JTOomSSY8KgEcffGjbG5qKiLxG+4lxNA+I/W4teWCnwkP7VlPkDQ0GId 7Yf5Qa44K0d7/JQVrV5O/lksmZwTL1ByMdtJlczvgJbvcITHLhh7f79oqu/+G5ycYIB1 mMTg== 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 c1-20020a056a000ac100b0068261ac6957si1368193pfl.112.2023.07.18.02.49.51; Tue, 18 Jul 2023 02:50:04 -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 S232287AbjGRJ3m (ORCPT + 99 others); Tue, 18 Jul 2023 05:29:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231420AbjGRJ3l (ORCPT ); Tue, 18 Jul 2023 05:29:41 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54B5FE0; Tue, 18 Jul 2023 02:29:40 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4R4tqf0h84z6D9CT; Tue, 18 Jul 2023 17:26:22 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 18 Jul 2023 10:29:38 +0100 Date: Tue, 18 Jul 2023 10:29:37 +0100 From: Jonathan Cameron To: Dave Jiang CC: Breno Leitao , Davidlohr Bueso , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , , kernel test robot , "open list:COMPUTE EXPRESS LINK (CXL)" , open list Subject: Re: [PATCH] cxl/acpi: Use printk specifier for resource Message-ID: <20230718102937.00001af0@Huawei.com> In-Reply-To: References: <20230717102625.4083462-1-leitao@debian.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,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, 17 Jul 2023 09:28:47 -0700 Dave Jiang wrote: > On 7/17/23 03:26, Breno Leitao wrote: > > Commit 3840e10e8dca ("cxl/acpi: Fix a use-after-free in cxl_parse_cfmws()") > > is using %llx to print resources pointers, but it is incorrect on 32-bits > > system, causing the following compilation warning on i386: > > > > drivers/cxl/acpi.c:300:4: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat] > > > > Instead of using pointers to the resource, uses the proper printk > > specifier that knows how to handle the struct "resources". > > > > This is the new format, being printed now: > > > > Failed to add decode range: [mem 0x4080000000-0x2baffffffff flags 0x200] > > > > Reported-by: kernel test robot > > Closes: https://lore.kernel.org/oe-kbuild-all/202307151059.2vvBt55H-lkp@intel.com/ > > Fixes: 3840e10e8dca ("cxl/acpi: Fix a use-after-free in cxl_parse_cfmws()") > > Suggested-by: Dan Williams > > Signed-off-by: Breno Leitao > > Reviewed-by: Dave Jiang FWIW Reviewed-by: Jonathan Cameron > > --- > > drivers/cxl/acpi.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c > > index 815b43859c16..d1c559879dcc 100644 > > --- a/drivers/cxl/acpi.c > > +++ b/drivers/cxl/acpi.c > > @@ -296,8 +296,7 @@ static int cxl_parse_cfmws(union acpi_subtable_headers *header, void *arg, > > else > > rc = cxl_decoder_autoremove(dev, cxld); > > if (rc) { > > - dev_err(dev, "Failed to add decode range [%#llx - %#llx]\n", > > - res->start, res->end); > > + dev_err(dev, "Failed to add decode range: %pr", res); > > return rc; > > } > > dev_dbg(dev, "add: %s node: %d range [%#llx - %#llx]\n", >