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:   Thu,  3 Jun 2021 12:20:21 +0530
From:   Anand Khoje <anand.a.khoje@...cle.com>
To:     linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     dledford@...hat.com, jgg@...pe.ca, haakon.bugge@...cle.com,
        leon@...nel.org
Subject: [PATCH v2 0/3] IB/core: Obtaining subnet_prefix from cache in IB devices. 

This v2 patch series is used to read the port_attribute subnet_prefix 
from a valid cache entry instead of having to call device->ops.query_gid()
in Infiniband link-layer devices. This requires addition of a flag used
to check that the cache entry is initialized and that a valid value
is being read.

1. Removed the port validity check from ib_get_cached_subnet_prefix.
This check was not useful as the port_num is always valid.

2. Shuffled locks pkey_lost_lock and netdev_lock in struct ib_port_data.
This was done to add the 8 byte field flags used for checking the cache
entry validity. Output of pahole showed two 4-byte holes in the structure
ib_port_data after pkey_list_lock and netdev_lock. Moving netdev_lock
shaved off 8 bytes from the structure, which is used to add the 8 byte
field flags in patch 3.

3. Added flags to struct ib_port_data and enum ib_port_data_flags. These
are used to validate the status of cached subnet_prefix. This valid
cache entry of subnet_prefix is used in function __ib_query_port().
This allows the utilization of the cache entry and hence avoids a call
into device->ops.query_gid().

Anand Khoje (3):
  Removed port validity check from ib_get_cached_subnet_prefix
  Shuffle locks in ib_port_data to save memory
  Obtain subnet_prefix from cache in IB devices

 drivers/infiniband/core/cache.c     | 14 ++++++++------
 drivers/infiniband/core/core_priv.h |  2 +-
 drivers/infiniband/core/device.c    | 23 ++++++++++++++---------
 drivers/infiniband/core/security.c  |  7 ++-----
 include/rdma/ib_cache.h             |  6 ++++++
 include/rdma/ib_verbs.h             | 10 +++++++++-
 6 files changed, 40 insertions(+), 22 deletions(-)

-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ