From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4994645587; Thu, 4 Jul 2024 11:25:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19433410F1; Thu, 4 Jul 2024 11:25:52 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id B29F84025C for ; Thu, 4 Jul 2024 11:25:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720085150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lws6zfpGufq7NK30zeCdO10i35s5hME4m1xcVg/TctI=; b=IFwYZwv9x8a8AWKHR3dR29DGzcjH2biYFn9PJkhfO0NofjU3CngkAwK/nxEagCvnldTWkm jFgKhs3jzXp800pmWWYvGFt29dgPCsJkiV32q2kiOQY8S4q/dnm3GZrT09qKEdZqRoeQ8h nMF/zzD4c0SZYa3kZFE7FIkj9Lh9qRs= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-691-H075wwLePJGi-vjivISbHg-1; Thu, 04 Jul 2024 05:25:48 -0400 X-MC-Unique: H075wwLePJGi-vjivISbHg-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2ec4efbbb7aso4011471fa.2 for ; Thu, 04 Jul 2024 02:25:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720085147; x=1720689947; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lws6zfpGufq7NK30zeCdO10i35s5hME4m1xcVg/TctI=; b=e9kCmRCvAlQr8VRUaY3V/8c4KppQyboFL3f3C2V6CD+Fvo44pOsaByR50yamafGVOZ X26BlnP2Ao+xs719XtBL45ugC9pp7DcTXy8EhgpoL6zn8e5Ka6CE/LdYWI9JpFS3h8ex Nh+KpMFSbTLbuLQRvL/yoRK2bDvn0ER94OHDzrWzO9ygh/KJ3zm3PcMTHmgyr5IgZvQQ BsVs8xQJ6SGdMnAnN88CMp3MbrHjyJ1mxEw7MGq2bjw/OoyR2LkBn8bEJuZ4/L/uNEPF jYJlsJJqMbN9IxMSm3P3OmOzTtX0O0luJxBk9XJV2Z6SpIeJoSg22+WuQfm+zw/0MK6s JrbQ== X-Gm-Message-State: AOJu0YzkNttt497OpU9u/lHQRx5i3Ay9XzFewBs8VAYaLEN7zX5gkYPG ovEV5G5eLO87Y88lg9RahccB5mgSHme9lJOcI/7P7hxCKLctqWj+rshlnonAtGXEzqMis8dTvNU yw3avuPYy9Ar+taL5Qn/YVKVFFXHitVTktL6qwTeYeI5TvGxYkOfmtSe6+z92fwH5aibART0W4n fw4ypHXKchkcYJICs= X-Received: by 2002:a2e:9187:0:b0:2ee:7a7e:8ebd with SMTP id 38308e7fff4ca-2ee8ee20ca1mr9364351fa.46.1720085147099; Thu, 04 Jul 2024 02:25:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGO4+PUMDzg4cQO5ZUhpX6nqbrnv6D+t/ij5tcnvqxSMW64mY2cJG9rY5spmxgtx7VBbhLMGxcqv/9KVQliBfM= X-Received: by 2002:a2e:9187:0:b0:2ee:7a7e:8ebd with SMTP id 38308e7fff4ca-2ee8ee20ca1mr9364231fa.46.1720085146762; Thu, 04 Jul 2024 02:25:46 -0700 (PDT) MIME-Version: 1.0 References: <20240703162738.283162-1-maxime.coquelin@redhat.com> In-Reply-To: <20240703162738.283162-1-maxime.coquelin@redhat.com> From: David Marchand Date: Thu, 4 Jul 2024 11:25:35 +0200 Message-ID: Subject: Re: [PATCH] net/virtio-user: fix control queue allocation for non-vDPA To: Maxime Coquelin Cc: dev@dpdk.org, chenbox@nvidia.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Jul 3, 2024 at 6:27=E2=80=AFPM Maxime Coquelin wrote: > > For non-vDPA backends, where the backend does not support > control queue, it is still emulated in the Virtio-user > layer to handle multiqueue feature. The frontend setups a > control queue, which is hidden to the device. It means the > number of vrings metadata to allocate should be based on > the frontend features and not the device features. > > This patch fixes out-of-range access reported by ASan, > which could sometimes be noticed at exit time by a > segmentation fault when disabled: > > Fixes: b80947743f5e ("net/virtio-user: fix control queue allocation") > > Reported-by: David Marchand > Signed-off-by: Maxime Coquelin Reviewed-by: David Marchand --=20 David Marchand