[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANH7hM5tYYU7GyYLboEVdin6xivV3LmbPxMxEa3sxb_YEBfH8w@mail.gmail.com>
Date: Tue, 15 Feb 2022 10:04:42 -0800
From: Bailey Forrest <bcf@...gle.com>
To: Haiyue Wang <haiyue.wang@...el.com>
Cc: Networking <netdev@...r.kernel.org>,
Jeroen de Borst <jeroendb@...gle.com>,
Catherine Sullivan <csully@...gle.com>,
David Awogbemila <awogbemila@...gle.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Willem de Bruijn <willemb@...gle.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Tao Liu <xliutaox@...gle.com>,
John Fraker <jfraker@...gle.com>,
Yangchun Fu <yangchun@...gle.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v2] gve: enhance no queue page list detection
On Mon, Feb 14, 2022 at 9:52 PM Haiyue Wang <haiyue.wang@...el.com> wrote:
>
> The commit
> a5886ef4f4bf ("gve: Introduce per netdev `enum gve_queue_format`")
> introduces three queue format type, only GVE_GQI_QPL_FORMAT queue has
> page list. So it should use the queue page list number to detect the
> zero size queue page list. Correct the design logic.
>
> Using 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.
>
> Signed-off-by: Haiyue Wang <haiyue.wang@...el.com>
Reviewed-by: Bailey Forrest <bcf@...gle.com>
Powered by blists - more mailing lists