From: "Wang, Haiyue" <haiyue.wang@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Jeroen de Borst <jeroendb@google.com>,
Catherine Sullivan <csully@google.com>,
"David Awogbemila" <awogbemila@google.com>,
"David S. Miller" <davem@davemloft.net>,
Willem de Bruijn <willemb@google.com>,
"Forrest, Bailey" <bcf@google.com>, Tao Liu <xliutaox@google.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
John Fraker <jfraker@google.com>,
"Yangchun Fu" <yangchun@google.com>,
open list <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v1] gve: fix zero size queue page list allocation
Date: Tue, 15 Feb 2022 05:34:02 +0000 [thread overview]
Message-ID: <BYAPR11MB34953364C58C489DCF901C2DF7349@BYAPR11MB3495.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220214213127.3aa9ea5b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Tuesday, February 15, 2022 13:31
> To: Wang, Haiyue <haiyue.wang@intel.com>
> Cc: netdev@vger.kernel.org; Jeroen de Borst <jeroendb@google.com>; Catherine Sullivan
> <csully@google.com>; David Awogbemila <awogbemila@google.com>; David S. Miller <davem@davemloft.net>;
> Willem de Bruijn <willemb@google.com>; Forrest, Bailey <bcf@google.com>; Tao Liu <xliutaox@google.com>;
> Christophe JAILLET <christophe.jaillet@wanadoo.fr>; John Fraker <jfraker@google.com>; Yangchun Fu
> <yangchun@google.com>; open list <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH v1] gve: fix zero size queue page list allocation
>
> On Tue, 15 Feb 2022 05:25:49 +0000 Wang, Haiyue wrote:
> > > On Mon, 14 Feb 2022 10:41:29 +0800 Haiyue Wang wrote:
> > > > According to the two functions 'gve_num_tx/rx_qpls', only the queue with
> > > > GVE_GQI_QPL_FORMAT format has queue page list.
> > > >
> > > > The 'queue_format == GVE_GQI_RDA_FORMAT' may lead to request zero sized
> > > > memory allocation, like if the queue format is GVE_DQO_RDA_FORMAT.
> > > >
> > > > The kernel memory subsystem will return ZERO_SIZE_PTR, which is not NULL
> > > > address, so the driver can run successfully. Also the code still checks
> > > > the queue page list number firstly, then accesses the allocated memory,
> > > > so zero number queue page list allocation will not lead to access fault.
> > > >
> > > > Use the queue page list number to detect no QPLs, it can avoid zero size
> > > > queue page list memory allocation.
> > >
> > > There's no bug here, strictly speaking, the driver will function
> > > correctly? In that case please repost without the Fixes tag and
> >
> > Code design bug, the 'queue_format == GVE_GQI_RDA_FORMAT' is not correct. But,
> > yes, it works. So still need to remove the tag ?
>
> A bug is something that users can notice. If there are conditions under
> which this may lead to user-visible mis-behavior then we should keep
> the tag and send the patch to stable as well.
>
> If there is no user-visible problem here, then the patch is just
> future-proofing / refactoring and we should not risk introducing real
> bugs by making people backport it (which is what adding a Fixes will
> do).
OK. Will remove the tag in v2.
prev parent reply other threads:[~2022-02-15 5:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 2:41 Haiyue Wang
2022-02-15 5:17 ` [PATCH net-next v2] gve: enhance no queue page list detection Haiyue Wang
2022-02-15 18:04 ` Bailey Forrest
2022-02-15 5:21 ` [PATCH v1] gve: fix zero size queue page list allocation Jakub Kicinski
2022-02-15 5:25 ` Wang, Haiyue
2022-02-15 5:31 ` Jakub Kicinski
2022-02-15 5:34 ` Wang, Haiyue [this message]
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=BYAPR11MB34953364C58C489DCF901C2DF7349@BYAPR11MB3495.namprd11.prod.outlook.com \
--to=haiyue.wang@intel.com \
--cc=awogbemila@google.com \
--cc=bcf@google.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=csully@google.com \
--cc=davem@davemloft.net \
--cc=jeroendb@google.com \
--cc=jfraker@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
--cc=xliutaox@google.com \
--cc=yangchun@google.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
all inboxes | Powered by JetHome®