[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b1d02aee-17cb-4461-8f02-b5bd513790ae@app.fastmail.com>
Date: Thu, 20 Apr 2023 10:51:58 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Tariq Toukan" <ttoukan.linux@...il.com>,
"Arnd Bergmann" <arnd@...nel.org>,
"Yishai Hadas" <yishaih@...dia.com>,
"Jason Gunthorpe" <jgg@...pe.ca>,
"Leon Romanovsky" <leon@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>,
"Eric Dumazet" <edumazet@...gle.com>,
"Jakub Kicinski" <kuba@...nel.org>,
"Paolo Abeni" <pabeni@...hat.com>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 2/2] net/mlx4: avoid overloading user/kernel pointers
On Wed, Apr 19, 2023, at 09:09, Tariq Toukan wrote:
> On 18/04/2023 14:47, Arnd Bergmann wrote:
>
> Now we should maintain the values of the two pointers before any call.
> I'm not sure this is less error-prune. One can mistakenly update
> kbuf_addr for example without nullifying ubuf_addr.
That would cause a compiler warning about the uninitialized variable.
> Also, I'm not a big fan of passing two pointers when exactly one of them
> is effectively used.
> We can think maybe of passing a union of both types, and a boolean
> indicating which pointer type is to be used.
This is basically what you have today. I've dropped this patch from
my randconfig tree and will ignore the problem.
Arnd
Powered by blists - more mailing lists