[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 4 Apr 2024 10:35:44 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>, Dan Williams
<dan.j.williams@...el.com>
CC: Kwangjin Ko <kwangjin.ko@...com>, <dave@...olabs.net>,
<dave.jiang@...el.com>, <alison.schofield@...el.com>,
<vishal.l.verma@...el.com>, <ira.weiny@...el.com>,
<linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<kernel_team@...ynix.com>
Subject: Re: [PATCH v2 1/1] cxl/core: Fix initialization of mbox_cmd.size_out
in get event
Jonathan Cameron wrote:
[..]
> >
> > Fix looks correct, but I am concerned it is a band-aid for a more
> > general problem. For example, if I am not mistaken, we have a similar
> > bug in cxl_mem_get_poison().
> >
> > So perhaps a convention to always define @mbox_cmd immediately before
> > cxl_internal_send_cmd() like this:
>
> Makes sense to me. These aren't hot paths, so safe code is worth the
> possible extra writes.
Yeah, the before and after size wise is small:
text data bss dec hex filename
15407 2129 49 17585 44b1 drivers/cxl/core/mbox.o
text data bss dec hex filename
15461 2129 49 17639 44e7 drivers/cxl/core/mbox.o
..which I think is worth the peace of mind, and it matches what is
currently done in cxl_xfer_log()
I will send a follow on with this since this patch is already in
cxl-fixes.
Powered by blists - more mailing lists