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]
Message-ID: <20241105120841.860068-1-huangjunxian6@hisilicon.com>
Date: Tue, 5 Nov 2024 20:08:39 +0800
From: Junxian Huang <huangjunxian6@...ilicon.com>
To: <dennis.dalessandro@...nelisnetworks.com>, <jgg@...pe.ca>,
	<leon@...nel.org>
CC: <linux-rdma@...r.kernel.org>, <linuxarm@...wei.com>,
	<linux-kernel@...r.kernel.org>, <tangchengchang@...wei.com>,
	<huangjunxian6@...ilicon.com>
Subject: [PATCH for-next 0/2] Small optimization for ib_map_mr_sg() and ib_map_mr_sg_pi()

ib_map_mr_sg() and ib_map_mr_sg_pi() allow ULPs to specify NULL as
the sg_offset/data_sg_offset/meta_sg_offset arguments. Drivers who
need to derefernce these arguments have to add NULL pointer checks
to avoid crashing the kernel.

This can be optimized by adding dummy sg_offset pointer to these
two APIs. When the sg_offset arguments are NULL, pass the pointer
of dummy to drivers. Drivers can always get a valid pointer, so no
need to add NULL pointer checks.

Junxian Huang (2):
  RDMA/core: Add dummy sg_offset pointer for ib_map_mr_sg() and
    ib_map_mr_sg_pi()
  RDMA: Delete NULL pointer checks for sg_offset in .map_mr_sg ops

 drivers/infiniband/core/verbs.c         | 12 +++++++++---
 drivers/infiniband/hw/mlx5/mr.c         | 18 ++++++------------
 drivers/infiniband/sw/rdmavt/trace_mr.h |  2 +-
 3 files changed, 16 insertions(+), 16 deletions(-)

--
2.33.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ