From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: Breno Leitao <leitao@debian.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>, <leit@meta.com>,
kernel test robot <lkp@intel.com>,
"open list:COMPUTE EXPRESS LINK (CXL)"
<linux-cxl@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cxl/acpi: Use printk specifier for resource
Date: Tue, 18 Jul 2023 10:29:37 +0100 [thread overview]
Message-ID: <20230718102937.00001af0@Huawei.com> (raw)
In-Reply-To: <a607c370-030a-2b96-9aca-886a23248e83@intel.com>
On Mon, 17 Jul 2023 09:28:47 -0700
Dave Jiang <dave.jiang@intel.com> 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 <lkp@intel.com>
> > 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 <dan.j.williams@intel.com>
> > Signed-off-by: Breno Leitao <leitao@debian.org>
>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
FWIW
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > ---
> > 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",
>
next prev parent reply other threads:[~2023-07-18 9:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 10:26 [PATCH] cxl/acpi: Use printk specifier for resource Breno Leitao
2023-07-17 16:28 ` Dave Jiang
2023-07-18 9:29 ` Jonathan Cameron [this message]
2023-07-18 17:58 ` Verma, Vishal L
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230718102937.00001af0@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=leit@meta.com \
--cc=leitao@debian.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox