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 5E845A0562 for ; Thu, 1 Apr 2021 14:04:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53C8714113B; Thu, 1 Apr 2021 14:04:28 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 857B114110D for ; Thu, 1 Apr 2021 14:04:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617278665; 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: in-reply-to:in-reply-to:references:references; bh=n4vnIz/Ophvmw/yJLnoqfX/DlNtiChrFxFlNmlTJE8o=; b=Hvd+1dIu/+xuwnYunMeVFZBPgQrLebA0u78QbSL4G12Rw5jtCHpWRMXueuvAlJRyoW/0Su mYYStYAMflfQh6qzWUVMYG5+Nfck5W66492qrfJ+cHpCxZBgiz3Sh2yQxhcH/W9EePYgMw 0NbJZW03ehHSVpIFEl4R34jsb8e8TBQ= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-373-ufIgdKToNi-j3Dszjzx47Q-1; Thu, 01 Apr 2021 08:04:23 -0400 X-MC-Unique: ufIgdKToNi-j3Dszjzx47Q-1 Received: by mail-vs1-f70.google.com with SMTP id b27so654746vsa.9 for ; Thu, 01 Apr 2021 05:04:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n4vnIz/Ophvmw/yJLnoqfX/DlNtiChrFxFlNmlTJE8o=; b=n6exbYfgKQ5C8GSGOgxal8Al3ZyEsbqd2J/ft6YESoxRzy5S3cD6PO0ZLPmPbRplx+ Ru2TXJih7j8Smwno1w0PEBij1rnFb6GlJdsKsuwSbBZgKk+Y+C2UOslcckltUpRsZyNA 22FGAKumH0d1aCjs5IJD7j3xWUm34x26SBZxNWVYnPjhOijHYg+LKTLXAmFf0FPAXRgY TnIrxl3LEa9HJAb0ALSf0WLnOOWAvtXhp++wXCuZaT9nyUWI4US4YR0adHgG5fXI3gLe Eamo8CTf4mptEH503jVUnROVoGVOzHhXncZ6hMO24PPxy1Jj1TPFulaPLcoax1XPknN2 DDZA== X-Gm-Message-State: AOAM53300K87eC8xmXGpStb763bK731d1VyTO91vHw4Mj7LDa3fOMYYK 85dyZNwIIDArblx9VnfbcepjMiXvC+IrrSuuJUSGTgw9KlHwiOYvMXpR/jAaDrEckB5xkV1QdCR LHrUmAD4S7QeoOAjvfBnruVk= X-Received: by 2002:a05:6102:3594:: with SMTP id h20mr4594383vsu.10.1617278662917; Thu, 01 Apr 2021 05:04:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkHbAitG/AB/fQStVUqRMTCqmCafZVVy251VVLrKDB8JHxjTOztJMagX5spGeMnn1XDhn4rqtCF+xDl88NqQs= X-Received: by 2002:a05:6102:3594:: with SMTP id h20mr4594338vsu.10.1617278662584; Thu, 01 Apr 2021 05:04:22 -0700 (PDT) MIME-Version: 1.0 References: <20210311063827.55394-1-xiao.w.wang@intel.com> <20210317063109.135662-1-xiao.w.wang@intel.com> In-Reply-To: <20210317063109.135662-1-xiao.w.wang@intel.com> From: David Marchand Date: Thu, 1 Apr 2021 14:04:10 +0200 Message-ID: To: Xiao Wang Cc: "Xia, Chenbo" , Maxime Coquelin , Marvin Liu , dev , "Ananyev, Konstantin" , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH v3] vhost: add header check in dequeue offload 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 Sender: "stable" On Wed, Mar 17, 2021 at 7:50 AM Xiao Wang wrote: > > When parsing the virtio net header and packet header for dequeue offload, > we need to perform sanity check on the packet header to ensure: > - No out-of-boundary memory access. > - The packet header and virtio_net header are valid and aligned. > > Fixes: d0cf91303d73 ("vhost: add Tx offload capabilities") > Cc: stable@dpdk.org > > Signed-off-by: Xiao Wang I spent some time digging on this topic. Afaiu the offload API, vhost is not supposed to populate tx offloads. I would drop this whole parse_ethernet function and replace vhost_dequeue_offload with what virtio does on the rx side. Please have a look at this series (especially the last patch): http://patchwork.dpdk.org/project/dpdk/list/?series=16052 Thanks. -- David Marchand