lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52a8b6c1-1e3c-469e-8598-74f5b1cd417e@redhat.com>
Date: Thu, 19 Jun 2025 22:13:02 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Akihiko Odaki <akihiko.odaki@...nix.com>, netdev@...r.kernel.org
Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
 Jason Wang <jasowang@...hat.com>, Andrew Lunn <andrew+netdev@...n.ch>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, "Michael S. Tsirkin" <mst@...hat.com>,
 Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Eugenio Pérez
 <eperezma@...hat.com>, Yuri Benditovich <yuri.benditovich@...nix.com>
Subject: Re: [PATCH v4 net-next 3/8] vhost-net: allow configuring extended
 features

On 6/19/25 5:00 PM, Akihiko Odaki wrote:
> On 2025/06/18 1:12, Paolo Abeni wrote:
>> +
>> +		/* Any feature specified by user-space above VIRTIO_FEATURES_MAX is
>> +		 * not supported by definition.
>> +		 */
>> +		for (; i < count; ++i) {
>> +			if (copy_from_user(&features, argp, sizeof(u64)))
> 
> get_user() is a simpler alternative.

That would require an explicit cast of 'argp' to a suitable pointer
type, which is IMHO uglier. I prefer sticking with copy_from_user().

Side note: there is a bug in this loop, as it lacks the needed increment
of the src pointer at every iteration.

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ