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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202509180511.5pJaP7gr-lkp@intel.com>
Date: Thu, 18 Sep 2025 06:12:19 +0800
From: kernel test robot <lkp@...el.com>
To: Bobby Eshleman <bobbyeshleman@...il.com>,
	Stefano Garzarella <sgarzare@...hat.com>,
	Shuah Khan <skhan@...uxfoundation.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Stefan Hajnoczi <stefanha@...hat.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Jason Wang <jasowang@...hat.com>,
	Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
	Eugenio Pérez <eperezma@...hat.com>,
	"K. Y. Srinivasan" <kys@...rosoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>,
	Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
	Bryan Tan <bryan-bt.tan@...adcom.com>,
	Vishnu Dasa <vishnu.dasa@...adcom.com>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>
Cc: oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org,
	virtualization@...ts.linux.dev, linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	linux-hyperv@...r.kernel.org,
	Bobby Eshleman <bobbyeshleman@...il.com>, berrange@...hat.com
Subject: Re: [PATCH net-next v6 3/9] vsock: add netns to vsock core

Hi Bobby,

kernel test robot noticed the following build errors:

[auto build test ERROR on 949ddfb774fe527cebfa3f769804344940f7ed2e]

url:    https://github.com/intel-lab-lkp/linux/commits/Bobby-Eshleman/vsock-a-per-net-vsock-NS-mode-state/20250917-074823
base:   949ddfb774fe527cebfa3f769804344940f7ed2e
patch link:    https://lore.kernel.org/r/20250916-vsock-vmtest-v6-3-064d2eb0c89d%40meta.com
patch subject: [PATCH net-next v6 3/9] vsock: add netns to vsock core
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20250918/202509180511.5pJaP7gr-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250918/202509180511.5pJaP7gr-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509180511.5pJaP7gr-lkp@intel.com/

All errors (new ones prefixed by >>):

   net/vmw_vsock/hyperv_transport.c: In function 'hvs_open_connection':
>> net/vmw_vsock/hyperv_transport.c:316:14: error: too few arguments to function 'vsock_find_bound_socket'
     316 |         sk = vsock_find_bound_socket(&addr, vsock_global_dummy_net());
         |              ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from net/vmw_vsock/hyperv_transport.c:15:
   include/net/af_vsock.h:218:14: note: declared here
     218 | struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr, struct net *net,
         |              ^~~~~~~~~~~~~~~~~~~~~~~


vim +/vsock_find_bound_socket +316 net/vmw_vsock/hyperv_transport.c

   294	
   295	static void hvs_open_connection(struct vmbus_channel *chan)
   296	{
   297		guid_t *if_instance, *if_type;
   298		unsigned char conn_from_host;
   299	
   300		struct sockaddr_vm addr;
   301		struct sock *sk, *new = NULL;
   302		struct vsock_sock *vnew = NULL;
   303		struct hvsock *hvs = NULL;
   304		struct hvsock *hvs_new = NULL;
   305		int rcvbuf;
   306		int ret;
   307		int sndbuf;
   308	
   309		if_type = &chan->offermsg.offer.if_type;
   310		if_instance = &chan->offermsg.offer.if_instance;
   311		conn_from_host = chan->offermsg.offer.u.pipe.user_def[0];
   312		if (!is_valid_srv_id(if_type))
   313			return;
   314	
   315		hvs_addr_init(&addr, conn_from_host ? if_type : if_instance);
 > 316		sk = vsock_find_bound_socket(&addr, vsock_global_dummy_net());
   317		if (!sk)
   318			return;
   319	
   320		lock_sock(sk);
   321		if ((conn_from_host && sk->sk_state != TCP_LISTEN) ||
   322		    (!conn_from_host && sk->sk_state != TCP_SYN_SENT))
   323			goto out;
   324	
   325		if (conn_from_host) {
   326			if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog)
   327				goto out;
   328	
   329			new = vsock_create_connected(sk);
   330			if (!new)
   331				goto out;
   332	
   333			new->sk_state = TCP_SYN_SENT;
   334			vnew = vsock_sk(new);
   335	
   336			hvs_addr_init(&vnew->local_addr, if_type);
   337	
   338			/* Remote peer is always the host */
   339			vsock_addr_init(&vnew->remote_addr,
   340					VMADDR_CID_HOST, VMADDR_PORT_ANY);
   341			vnew->remote_addr.svm_port = get_port_by_srv_id(if_instance);
   342			ret = vsock_assign_transport(vnew, vsock_sk(sk));
   343			/* Transport assigned (looking at remote_addr) must be the
   344			 * same where we received the request.
   345			 */
   346			if (ret || !hvs_check_transport(vnew)) {
   347				sock_put(new);
   348				goto out;
   349			}
   350			hvs_new = vnew->trans;
   351			hvs_new->chan = chan;
   352		} else {
   353			hvs = vsock_sk(sk)->trans;
   354			hvs->chan = chan;
   355		}
   356	
   357		set_channel_read_mode(chan, HV_CALL_DIRECT);
   358	
   359		/* Use the socket buffer sizes as hints for the VMBUS ring size. For
   360		 * server side sockets, 'sk' is the parent socket and thus, this will
   361		 * allow the child sockets to inherit the size from the parent. Keep
   362		 * the mins to the default value and align to page size as per VMBUS
   363		 * requirements.
   364		 * For the max, the socket core library will limit the socket buffer
   365		 * size that can be set by the user, but, since currently, the hv_sock
   366		 * VMBUS ring buffer is physically contiguous allocation, restrict it
   367		 * further.
   368		 * Older versions of hv_sock host side code cannot handle bigger VMBUS
   369		 * ring buffer size. Use the version number to limit the change to newer
   370		 * versions.
   371		 */
   372		if (vmbus_proto_version < VERSION_WIN10_V5) {
   373			sndbuf = RINGBUFFER_HVS_SND_SIZE;
   374			rcvbuf = RINGBUFFER_HVS_RCV_SIZE;
   375		} else {
   376			sndbuf = max_t(int, sk->sk_sndbuf, RINGBUFFER_HVS_SND_SIZE);
   377			sndbuf = min_t(int, sndbuf, RINGBUFFER_HVS_MAX_SIZE);
   378			sndbuf = ALIGN(sndbuf, HV_HYP_PAGE_SIZE);
   379			rcvbuf = max_t(int, sk->sk_rcvbuf, RINGBUFFER_HVS_RCV_SIZE);
   380			rcvbuf = min_t(int, rcvbuf, RINGBUFFER_HVS_MAX_SIZE);
   381			rcvbuf = ALIGN(rcvbuf, HV_HYP_PAGE_SIZE);
   382		}
   383	
   384		chan->max_pkt_size = HVS_MAX_PKT_SIZE;
   385	
   386		ret = vmbus_open(chan, sndbuf, rcvbuf, NULL, 0, hvs_channel_cb,
   387				 conn_from_host ? new : sk);
   388		if (ret != 0) {
   389			if (conn_from_host) {
   390				hvs_new->chan = NULL;
   391				sock_put(new);
   392			} else {
   393				hvs->chan = NULL;
   394			}
   395			goto out;
   396		}
   397	
   398		set_per_channel_state(chan, conn_from_host ? new : sk);
   399	
   400		/* This reference will be dropped by hvs_close_connection(). */
   401		sock_hold(conn_from_host ? new : sk);
   402		vmbus_set_chn_rescind_callback(chan, hvs_close_connection);
   403	
   404		/* Set the pending send size to max packet size to always get
   405		 * notifications from the host when there is enough writable space.
   406		 * The host is optimized to send notifications only when the pending
   407		 * size boundary is crossed, and not always.
   408		 */
   409		hvs_set_channel_pending_send_size(chan);
   410	
   411		if (conn_from_host) {
   412			new->sk_state = TCP_ESTABLISHED;
   413			sk_acceptq_added(sk);
   414	
   415			hvs_new->vm_srv_id = *if_type;
   416			hvs_new->host_srv_id = *if_instance;
   417	
   418			vsock_insert_connected(vnew);
   419	
   420			vsock_enqueue_accept(sk, new);
   421		} else {
   422			sk->sk_state = TCP_ESTABLISHED;
   423			sk->sk_socket->state = SS_CONNECTED;
   424	
   425			vsock_insert_connected(vsock_sk(sk));
   426		}
   427	
   428		sk->sk_state_change(sk);
   429	
   430	out:
   431		/* Release refcnt obtained when we called vsock_find_bound_socket() */
   432		sock_put(sk);
   433	
   434		release_sock(sk);
   435	}
   436	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ