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 35BAE431E1; Mon, 23 Oct 2023 12:01:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C2D940275; Mon, 23 Oct 2023 12:01:59 +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 341E740270 for ; Mon, 23 Oct 2023 12:01:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698055316; 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=m8Tx2Z+Psrd0cXy3X0+aMlMb/9PE5ko+SRc7+lovbwQ=; b=YB7tTNyyy5fTZfG6lnhgmEl7bXIz8VvR0vOR50lBY/n7NgZKMYanE8fUPDQa4THE85lzrJ rnztdS5xtpb+B2erX4m1VAHX4GgKMxxYdvCmVVsHm9P898q1FHOfg+9UeKgHHIDc4NXKXg nQPbYHyzTBqj+tYCRf0cMcNWAH6BfHY= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-223-73OReCizNIu9YqBLr6u6bA-1; Mon, 23 Oct 2023 06:01:55 -0400 X-MC-Unique: 73OReCizNIu9YqBLr6u6bA-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2c53ea92642so27632931fa.2 for ; Mon, 23 Oct 2023 03:01:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698055314; x=1698660114; 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=m8Tx2Z+Psrd0cXy3X0+aMlMb/9PE5ko+SRc7+lovbwQ=; b=b8EvJmVA7T4a25bp1IWtJUkhmAtomlL3Cw2f+/q+qoCaCJ2ocRrfmLgOwmZizgsU6p DBJBc9ubhgKGEhXyfROO2+DP/DFtIG33Nu+GWo3CXEyaHsUlnxxFIrIS7p6ekhQ2+iyV Vz4Pf1DS+sKHSnTSiApieS50mL3tBp/FFlyd25s8zhVYDWC9u0VjapdlvBohXv6q9552 CtyZ887iKM5fKwF+oVFgwsn+oV3OJaomoaDqzMK18DoB8GWMHfLbty/DcFe6cMZ9R2h7 HW3Uf950owD3ShUPw6SAcDPHVPy089mALLteJw6N5fdI9rB7DUT4m6yINwSO9C2CjO2q Wi4A== X-Gm-Message-State: AOJu0Yz8oq78KCR6MpTkIv78/nDLwDA1oX0++rAGuy7oG6fTW2nak5PO Cww/T83FgiMmb/85WXfNVkdkNbekChtw6KwE8etQMwSAwuB428GFKm4Rrb52gpYXY3b0zCbRBEX bOQkbwtqqBXuD+E1Y8tc= X-Received: by 2002:a05:651c:220a:b0:2c5:12c4:9f1d with SMTP id y10-20020a05651c220a00b002c512c49f1dmr6983784ljq.2.1698055314023; Mon, 23 Oct 2023 03:01:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfqPI1XAU9Ag1emQ+Mn20IZBYiyns6aiJw39FAzoW5e2cMehgbOrtluTM50Y6KQ0RdSRq46kXh2qBQ/OI+LFw= X-Received: by 2002:a05:651c:220a:b0:2c5:12c4:9f1d with SMTP id y10-20020a05651c220a00b002c512c49f1dmr6983768ljq.2.1698055313737; Mon, 23 Oct 2023 03:01:53 -0700 (PDT) MIME-Version: 1.0 References: <20231020084804.3625099-1-maxime.coquelin@redhat.com> In-Reply-To: <20231020084804.3625099-1-maxime.coquelin@redhat.com> From: David Marchand Date: Mon, 23 Oct 2023 12:01:42 +0200 Message-ID: Subject: Re: [PATCH v2 0/7] vhost: ensure virtqueue access status is checked To: Maxime Coquelin Cc: dev@dpdk.org, chenbo.xia@outlook.com, fengli@smartx.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 Fri, Oct 20, 2023 at 10:48=E2=80=AFAM Maxime Coquelin wrote: > > Li Feng initially reported segmentation fault in rte_vhost_vring_call() > because of not checking the virtqueue metadata can be accessed. > > This should be achieved by checking the access_ok status field of > the virtqueue. > > This series also takes the opportunity to fix the other APIs. > This is split in multiple patches to ease LTS maintainers backports, > but could be squashed if preferred. As a followup on this topic, I took some time to annotate this code around access_ok/access_lock. For those interested: https://patchwork.dpdk.org/project/dpdk/list/?series=3D29950&state=3D%2A&ar= chive=3Dboth --=20 David Marchand