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 A5874A054D for ; Fri, 23 Sep 2022 16:53:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82F8942BA6; Fri, 23 Sep 2022 16:53:42 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id F33FE40156 for ; Fri, 23 Sep 2022 16:53:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663944820; 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=jfIpaEOytcftDni40N8WbCLbzsKod+h6iJl4uliCzGs=; b=CmEhX02Yp8v5kHzrgRUvwxCAnYiMdBzEX7MroXAnaYqyq5NXBHUbZI0jLNtz0oGz/90P2+ TlYMLNbSe8aUgBJeHDVu9Ggpfhh/hPZbZB8ltLwnM4CoZg0zcaCgbCIcx73DF3cftOrnZT YHdHNU/BtA+OMNn/kklmCcB6CCuABn8= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-62-J5C83Id8NYCuTx1lnD-qdQ-1; Fri, 23 Sep 2022 10:53:34 -0400 X-MC-Unique: J5C83Id8NYCuTx1lnD-qdQ-1 Received: by mail-wm1-f72.google.com with SMTP id 7-20020a05600c020700b003b4ce6e6b12so136495wmi.0 for ; Fri, 23 Sep 2022 07:53:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=jfIpaEOytcftDni40N8WbCLbzsKod+h6iJl4uliCzGs=; b=ElSPt1xJSPv8s8LtzD5jytqSfgUsREVPVQ88v9a9aQ+wHS3i90GJqg+H9GFg/lW4Pg JkDfn9VLBhCal0T8qwa8eXhl8pDu6iThrYWdVpi8mwlQ8+1tedbYDvEyoliC+FK/tba4 wUUDe4YOlSJCfK5PMcWi8CSv1d2eGBg5R8mo8bJphZGHOAdn5fBQcSBnHKTm7m1Gf2Nc 6DtpudI1xpSvJ+OGF4ndpLYVZQhAuN7/akI78CdqkrswCQjzwd+VCTojeVY2DhmGOXJD qt941UN9l3VFCpklCM2MyvNZVolVQy74U6jdlQ5+yY6Sf0C/qLTrMdWx00SP06pqA7VE YVyQ== X-Gm-Message-State: ACrzQf207MC7j5FNTpFWRH9wb054ts9ov1Uw0K5bQvu37lrp/giJYJxp ldchOeMxrr4xxH/mMF8QHB4amGyjznH3slHYu7cZ6wrVOvO85JvPKfpt2LA6LQZQ6yVq+kylPsD ywT3deKE= X-Received: by 2002:a05:600c:a195:b0:3b4:fc79:f778 with SMTP id id21-20020a05600ca19500b003b4fc79f778mr8597606wmb.177.1663944812900; Fri, 23 Sep 2022 07:53:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4yjlvakuic2DY8sA5ivkOYPZdm1a7rBowYNXGECWIXPrfxMnIac8fm+wG9PTM7+UmInBT2dQ== X-Received: by 2002:a05:600c:a195:b0:3b4:fc79:f778 with SMTP id id21-20020a05600ca19500b003b4fc79f778mr8597596wmb.177.1663944812713; Fri, 23 Sep 2022 07:53:32 -0700 (PDT) Received: from [192.168.0.36] ([78.16.251.119]) by smtp.gmail.com with ESMTPSA id n21-20020a05600c4f9500b003b4764442f0sm2907012wmq.11.2022.09.23.07.53.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Sep 2022 07:53:32 -0700 (PDT) Message-ID: Date: Fri, 23 Sep 2022 15:53:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 To: Luca Boccassi , Christian Ehrhardt Cc: Maxime Coquelin , "stable@dpdk.org" , Xueming Li , Michael Phelan References: <7671019d-fff8-5e7f-1d92-f53d8ffc8032@redhat.com> From: Kevin Traynor Subject: Re: Early backport of Vhost regression fix in LTS branches In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 20/09/2022 12:10, Luca Boccassi wrote: > On Tue, 20 Sept 2022 at 12:03, Kevin Traynor wrote: >> >> On 20/09/2022 10:36, Maxime Coquelin wrote: >>> Hi LTS maintainers, >>> >>> We have discovered a regression causing deadlock in application using >>> the Vhost library (when vIOMMU is used & NUMA reallocation happens). >>> >>> The faulty commit [0] got backported in all maintained LTS branches, >>> following minor releases are impacted: >>> - V21.11.1+ >>> - V20.11.5+ >>> - V19.11.12+ >>> >>> The fix for this regression is already in main branch, and will be part >>> of next v22.11 release. >>> >>> Discussing with Kevin, he suggested the fix to be backported early to >>> all the LTS branches. >>> >> >> This issue is a deadlock likely to occur with an application such as >> OVS, that uses vIOMMU vhost ports and a multi-NUMA system. >> >> In normal circumstances, for example with OVS, we could just recommend >> users not to upgrade to the latest DPDK LTS releases until the issue is >> fixed. Where this one gets tricky is that the latest LTS releases >> contains CVE fixes. >> >> At the moment if a user wants the CVE fixes *and* the below deadlock >> fix, they will have to pick patches themselves. It might help some if >> the DPDK stable branches (which are still at last release point) >> backport the fix below early so a user can just pull the branch. >> >>> Below is the fix to be backported: >>> >>> ====================================================================== >>> commit 0b2a2ca35037d6a5168f0832c11d9858b8ae946a >>> Author: David Marchand >>> Date: Mon Jul 25 22:32:03 2022 +0200 >>> >>> vhost: fix virtqueue use after free on NUMA reallocation >>> >>> translate_ring_addresses (via numa_realloc) may change a virtio >>> device and >>> virtio queue. >>> The virtqueue object must be refreshed before accessing the lock. >>> >>> Fixes: 04c27cb673b9 ("vhost: fix unsafe vring addresses modifications") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: David Marchand >>> Reviewed-by: Maxime Coquelin >>> ====================================================================== >>> >>> The fix can be backported without conflicts to all the LTS branches, >>> except for v19.11, for which the Vhost directory rename can cause >>> issues. It can be overcome using below command: >>> >>> git cherry-pick -Xfind-renames=5% 0b2a2ca350 >>> >>> Is that OK for you? >>> >> >> I can take care of it for all branches if other maintainers are busy and >> ok with that. > > Sounds good to me, feel free to go ahead for 20.11, thank you. > 20.11 and 21.11 are done. @Christian, wasn't able to get in touch, not sure if you are on PTO etc. I don't see any big risk, this is just backporting a patch that would be backported in a couple of months anyway. So let's say I will push to the 19.11 branch on Monday if there are no objections. thanks, Kevin. > Kind regards, > Luca Boccassi >