lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 17 Apr 2019 12:56:04 -0700
From:   Jonathan Lemon <jonathan.lemon@...il.com>
To:     <netdev@...r.kernel.org>
CC:     <maximmi@...lanox.com>, <kernel-team@...com>
Subject: [PATCH 1/2 net-next] mlx5: Set AF_XDP data pointer correctly.

data starts at handle + headroom, so adjust appropriately.

Signed-off-by: Jonathan Lemon <jonathan.lemon@...il.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
index 2f0b5fd1ee97..e758f1015022 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
@@ -290,7 +290,8 @@ int mlx5e_xsk_page_alloc_umem(struct mlx5e_rq *rq,
 		return -ENOMEM;
 
 	dma_info->xsk.handle = handle + rq->buff.umem_headroom;
-	dma_info->xsk.data = xdp_umem_get_data(umem, handle);
+	dma_info->xsk.data = xdp_umem_get_data(umem, handle) +
+			     rq->buff.umem_headroom;
 
 	/* No need to add headroom to the DMA address. In striding RQ case, we
 	 * just provide pages for UMR, and headroom is counted at the setup
-- 
2.17.1

Powered by blists - more mailing lists