From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C7E6606A322 for ; Sat, 5 Dec 2026 06:26:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=OvQ7ksF+ Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E780A40E11; Sat, 5 Dec 2026 07:26:00 +0100 (CET) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTPS id 88D3A40BA3 for ; Sat, 5 Dec 2026 07:25:57 +0100 (CET) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-3b59bcb3301so1566717a91.0 for ; Fri, 04 Dec 2026 22:25:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796451956; x=1797056756; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=BWS05Ams2dqJFRORyDYJUKc8Lb1cPKK5w0a2FAfsTTk=; b=OvQ7ksF+wv1OPR6UMinAHIzWhBJtf1T12ktreA5d4RsXX0apCmOz0VRcgMT70blf1J uhNdIEltzxQDOV/13AsvAvxg7dKbRuQQaxW0XyaCT5mjm+QPCbkDDxGBYTE1LgIcOOG4 pakXWWO07WZMgE0+bpdIx91h6AXdTVkinbGfskjpcMQCLjySIIWx+tozf63OJbDswvbC X7sifUxo6GvaCTiyuBv7PFtdPG8nj7doTewVOTysOJ3JOzRZoyolEn+z6cXOSVNy4V30 pp98aBaPP+5VEFwNnZBjitXjrACvQwIQhvFyy2qydQu1IlbH7ge4q6CX9ATWvS2p5VHe 41VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796451956; x=1797056756; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=BWS05Ams2dqJFRORyDYJUKc8Lb1cPKK5w0a2FAfsTTk=; b=11mJvU9RdwuaV4xF2DV1JZzIowwaQcuR0ZWHjgdiWkTo3SMY3MJbq8h408W1/hNuqC 78U5jJpdVUzqCLmEb/ZYU067a6b1Z5ziVDLw14ZKnoBC1CnGIA9xvfC+89tXZ9EdjNoi Ac6dz6VuCKkJK1nf/EX6yNVNTBtLflxZorohoAgRa1rw/kQdseh8dmcLV27fxg0udWcI CiNt9bG0Wc8roqJG4JNWVqvo1PW4M4UXnOlXXHlQEmv7Rxg6aMhZUiMMlZ6AJ0wiDS3z B/luzL61Ca5dE1f5XwR0VqmFJ0WKSW7GYSApg0+Iom4rg93Bfp6Eav0v8VRXtVx+hBiS KWSQ== X-Gm-Message-State: AB4q+uFzSzuqqhoL/S9/mJqsC84u8csrdfhFUHkLzWUUprNsdjd2f32n xSwuqQo66C1OgyAyKDCvKEtn1g4O2343NIcTvzVZqtG0QrGGkDxYwgVwSJcsi5Jy1WFcHO8e9pr Lhxrqllw= X-Gm-Gg: AZFdTZc2GrNL54rpPoVjEnEFmE4nmg2QSlAgCrsGKClM7/8FO3IY1iTY6kqVWSIZNGE Tyq25vF0C4gpMRQR65zd+HM12o1O+N4CeM3VNtTjFdkiQq78TY0butCz2zJM2sEBKhPx5tx60Iu vEiYre+JxBdrNJ9Amti1zTmCJfYVeNOlKj0bt3gocsGE+SmL9OuC+4pWbP0ZZrLJL8sKm9MrH/T OeOjvs4hrXEJmb0gFxQ2VFMpK51bS7yKNLCvr6edEfdv0LMjYJx2VnQc3U7luzAztyrJS1YbyRm Js43nYkLAo6xOeG/9waXp/KMdTW4X3U+ZCTg//4gSqPwXuZOh/4k56WSyNab9JwZnQRfk1/C4M6 /dKEEDhRIf7+hLavx/PjS4wtO5u+zTw9/9ye84zNndvuKLL/DkDq81VjHTkJTGB6NuTOFXp3ZHf fzg4amu5l7SHwuInA87yBCbzZJ/yPjPDoUoTehhY7Yl/PGAA1yNImMtDaIE+Njq67TB7NQcvFnQ n/wyqebjJzyswDyPjSTA/DW+cBlDJsJgiHnFBwGKIctKzu3UOgX3WYc+nk4u/nVD32QZFDI7tvY Y8lXppH423olybBXIypAOc/fzR9VnztTcPgHNdxBfYW9mGCtT1hfIkL3BwjhvJsEZync X-Received: by 2002:a17:90b:5306:b0:3a4:7195:ecba with SMTP id 98e67ed59e1d1-3b5e063169cmr2400695a91.20.1796451955850; Fri, 04 Dec 2026 22:25:55 -0800 (PST) Received: from phoenix.lan (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b6168d3e2fsm1162797a91.2.2026.12.04.22.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 22:25:55 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Maxime Coquelin , Chenbo Xia , Yuanhan Liu Subject: [PATCH v4 03/68] net/vhost: fix devargs parsing into wrong width Date: Fri, 4 Dec 2026 22:19:40 -0800 Message-ID: <20261205062551.19553-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261205062551.19553-1-stephen@networkplumber.org> References: <20260914054912.755403-1-stephen@networkplumber.org> <20261205062551.19553-1-stephen@networkplumber.org> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 open_int() stores through a uint16_t pointer, but seven of its eight callers pass the address of an int. Only two bytes of a four byte object are written. It happens to work on little endian because each caller initializes its variable to zero first, but it is still a store of the wrong width, and on big endian it would set the high half. Give those seven locals the uint16_t width that the handler actually writes. They are only ever tested against 0 and 1. Fixes: 39cac2adcad0 ("net/vhost: add client option") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/vhost/rte_eth_vhost.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 41b77d8533..e4e90e7a5c 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -1668,13 +1668,13 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev) uint16_t queues; uint64_t flags = RTE_VHOST_USER_NET_STATS_ENABLE; uint64_t disable_flags = 0; - int client_mode = 0; - int iommu_support = 0; - int postcopy_support = 0; - int tso = 0; - int linear_buf = 0; - int ext_buf = 0; - int legacy_ol_flags = 0; + uint16_t client_mode = 0; + uint16_t iommu_support = 0; + uint16_t postcopy_support = 0; + uint16_t tso = 0; + uint16_t linear_buf = 0; + uint16_t ext_buf = 0; + uint16_t legacy_ol_flags = 0; struct rte_eth_dev *eth_dev; const char *name = rte_vdev_device_name(dev); -- 2.53.0