From nobody Thu Oct 26 10:01:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGLtS6yMjz4xb4Y; Thu, 26 Oct 2023 10:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SGLtS6Wl7z3N1R; Thu, 26 Oct 2023 10:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698314512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=stETuPhZmf+tDNmM5BKvKKg0e5r68WGkbOSJOwCarmc=; b=oEEga2XQirj/FuDHMYLie+DxRrgd4ub4Sn8ya4IRcrebQacqNbltoB/tDJx1o4G5cfPBEz gG9323Efau3+kFW8O1ejZZqZ36SoPzfTuTnu5DrisbRXK8UCjDdwcb79D/Jng8KQnP/l7M uz4DMNeVDuAU+6zWDyIad3XisQXiEzfCxmHX1FMJZLzzRj+bTumxpSt7HSLL+DC3joGmn/ a6KBpUPha7Wo8yUtWSK1I1XUxKKx/XOgZQ3BIONNfLaE37/p7OrVMZyaM2ne7k1c5ph+gI /7Qexr0ZYeM4KTSgol6/5+leTvToMB+38DzGIAGVxsoYS4rlILwMNPwc3P8kfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698314512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=stETuPhZmf+tDNmM5BKvKKg0e5r68WGkbOSJOwCarmc=; b=OiWGxfqdHKKD6UcqGzmHbpIdDNUltZZCY3umOrJd+2v3Cba8PThCM48mQB6x3fIM6kQKsO pTAV5oVb+lm8dfs7igfPUyW+ZK3+a+pZSHN4NXywB4JCETAPDhmvBd6jK3uF8+cYPByiZS zKaxydceKO0PxbBDojDGNnK7clF2S+nDFM8hX2g5y2ky5waWWORyQErz4cUY9UTh+7KQGw 9KsAIQuAldVa2K5xAXSjUUz9gNCTG4S0xS6IggVMBhIgI8JNcQR/4rSj23ENyXVgVX9X18 R1wmCYVfdPDesnH4BeFGzS4BzKBL+ERtBkw+O2foAtUEjir5fTXhfvRiTif5cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698314512; a=rsa-sha256; cv=none; b=TbMYUqJZeZT+F/14S9kw7gD70KeHeIl5bDkFgedBus629jL2mmY7yJQLg/WeetmyAcS5aA YnkXB7PozO27fOV1VXCE/rq6jAU8lGKMOv3CqGnWoNR7oQI+6YNcdKBeFDiVL6MNnc+oPr 6eUJm8RYSlAlAVdZmxlQHRx/tADEPFy4gLue9uyYjer8Tg0iTYUxTfel7f/EIEYafxDCuf wcfM1CwjccobD5Kvu4HCIJ05vcCRf41vEh7G0aMjseAmg+PYdSTGy+CDAFcCeA/hIBKNgR +5/pFzqSWijIsqLuMw4umICcfAkqktFTAy5Qde15TwyVn0YU58IucqpdyCn8Hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGLtS5ZVYzBbh; Thu, 26 Oct 2023 10:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QA1qKD034784; Thu, 26 Oct 2023 10:01:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QA1q2p034781; Thu, 26 Oct 2023 10:01:52 GMT (envelope-from git) Date: Thu, 26 Oct 2023 10:01:52 GMT Message-Id: <202310261001.39QA1q2p034781@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: f407a72a506d - main - bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f407a72a506d2630d60d9096c42058f12dff874e Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f407a72a506d2630d60d9096c42058f12dff874e commit f407a72a506d2630d60d9096c42058f12dff874e Author: Gleb Smirnoff AuthorDate: 2023-10-26 09:59:21 +0000 Commit: Gleb Smirnoff CommitDate: 2023-10-26 09:59:21 +0000 bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) ioctl(2)'s with integer argument shall pass command argument by value, not by pointer. The ioctl(2) manual page is not very clear about that. See sys/kern/sys_generic.c:sys_ioctl() near IOC_VOID. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42366 Fixes: fd8b9c73a5a63a7aa438a73951d7a535b4f25d9a --- usr.sbin/bhyve/net_backends.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index 99781cfdcbb6..de6afab53854 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -238,7 +238,7 @@ tap_init(struct net_backend *be, const char *devname, goto error; } - if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, &up)) { + if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, up)) { WPRINTF(("tap device link up failed")); goto error; }