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 BDE69A0C4C for ; Mon, 12 Jul 2021 15:11:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B77FA4069D; Mon, 12 Jul 2021 15:11:48 +0200 (CEST) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mails.dpdk.org (Postfix) with ESMTP id 9009C4069D for ; Mon, 12 Jul 2021 15:11:47 +0200 (CEST) Received: by mail-wm1-f51.google.com with SMTP id w13so11384297wmc.3 for ; Mon, 12 Jul 2021 06:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3yUCmDcSThvy0bfAOOSrSjNnD0/GMPK/sQAAt+JYym8=; b=W1Iu+DtIobkq+N7NGqyXEZYa+Jo4yUwTWj82YxidefBMG+A7OkvFt2yVmTQptZRcuj 9Lgg7pGksAuDke5Lq7M2vKDUROcb7pS6WlBmlvSn6NAG7FGqZCYmqdvJcyvTCxBPzSar jm+s/Fu8TGSKBM8e2qocYEYvm+QYxMn5Ug4zJAnoIPffvXKWWp4JnkFzKugkT8k/2IQw 0PGMS0oDVKlVCV/nGzSNFjLdACY0nvsHT/NgoKAgUcoeTYa4daMyuu1LQL53VwNoM/Y3 VSfBkUz5uyWgUzlVLofF5hRG7z0FnIAUqcA6rwCHQ0nxYEWBVmqDspSbvA6tXrUvCuWo 9Wtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3yUCmDcSThvy0bfAOOSrSjNnD0/GMPK/sQAAt+JYym8=; b=AosJZ2zR5gNfLEVjec9yGkGtIwoXLHUOdReHZ1TKpFUr1nIwfTK64P3LcoPInhaaWA 7ery/IFiY0Lo52HwVGS9XwI6pE8ME84bLuxmAfRzn7UocYsX0bUE5+pB3ES6dVojQlYO 48mOQwbN+qYr3BDfHVmMUOjcfvFEiy0l0oUpDKhLcrk8/BdgHJskYNCylofFXjkU+Pu4 88phwdroNZ+WRz2I8xfG91RA0WdMsH9lg6vg8aPrKE6TVmyrfrP4UcrExb5hBhJPOBPW eYbYPpV0MFujgxxKRgCdJTQWSvN7znYBxoC1rVRTl6flLnG8rASAHxGuZ4w6/0Sth3zG hfAA== X-Gm-Message-State: AOAM533xIVvauQe24Q0l+qRZ433jGACDDiORTfqM3KaPqW8WgOHREBJx 5iqAybJJrJozRRTrTA+MO0s= X-Google-Smtp-Source: ABdhPJwam5XZUHvkJvvLA311oIbgz2FSv0HdqFwzozy+rxgNh1CKvVDz1swyEpybYGQa8UIlJbEeIA== X-Received: by 2002:a1c:f216:: with SMTP id s22mr55108238wmc.18.1626095507249; Mon, 12 Jul 2021 06:11:47 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id p18sm257100wmg.46.2021.07.12.06.11.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:11:46 -0700 (PDT) From: luca.boccassi@gmail.com To: Ferruh Yigit Cc: Ajit Khaparde , dpdk stable Date: Mon, 12 Jul 2021 14:04:27 +0100 Message-Id: <20210712130551.2462159-32-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'kni: fix crash on userspace VA for segmented packets' has been queued to stable release 20.11.3 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" Hi, FYI, your patch has been queued to stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/14/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/75be3a8eb3f877fcdeb1a5be63b7d66c5f91c20e Thanks. Luca Boccassi --- >From 75be3a8eb3f877fcdeb1a5be63b7d66c5f91c20e Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 22 Jun 2021 13:29:56 +0100 Subject: [PATCH] kni: fix crash on userspace VA for segmented packets [ upstream commit 9b83a7ed2ac160aca64eed4d45102aadf26bc053 ] When IOVA=VA, address translation for segmented packets is wrong, it assumes the address in the mbuf->next is physical address, not VA address. Fixing the address translation to work both PA & VA mode. Fixes: e73831dc6c26 ("kni: support userspace VA") Signed-off-by: Ferruh Yigit Acked-by: Ajit Khaparde --- kernel/linux/kni/kni_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index f259327954..611719b5ee 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c @@ -245,7 +245,7 @@ kni_fifo_trans_pa2va(struct kni_dev *kni, break; prev_kva = kva; - kva = pa2kva(kva->next); + kva = get_kva(kni, kva->next); /* Convert physical address to virtual address */ prev_kva->next = pa2va(prev_kva->next, kva); } @@ -422,7 +422,7 @@ kni_net_rx_normal(struct kni_dev *kni) break; prev_kva = kva; - kva = pa2kva(kva->next); + kva = get_kva(kni, kva->next); data_kva = kva2data_kva(kva); /* Convert physical address to virtual address */ prev_kva->next = pa2va(prev_kva->next, kva); @@ -501,7 +501,7 @@ kni_net_rx_lo_fifo(struct kni_dev *kni) kni->va[i] = pa2va(kni->pa[i], kva); while (kva->next) { - next_kva = pa2kva(kva->next); + next_kva = get_kva(kni, kva->next); /* Convert physical address to virtual address */ kva->next = pa2va(kva->next, next_kva); kva = next_kva; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:38.394922019 +0100 +++ 0032-kni-fix-crash-on-userspace-VA-for-segmented-packets.patch 2021-07-12 13:41:36.294118528 +0100 @@ -1 +1 @@ -From 9b83a7ed2ac160aca64eed4d45102aadf26bc053 Mon Sep 17 00:00:00 2001 +From 75be3a8eb3f877fcdeb1a5be63b7d66c5f91c20e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9b83a7ed2ac160aca64eed4d45102aadf26bc053 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org