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: <20200730232008.2648488-1-jacob.e.keller@intel.com>
Date:   Thu, 30 Jul 2020 16:20:04 -0700
From:   Jacob Keller <jacob.e.keller@...el.com>
To:     netdev@...r.kernel.org
Cc:     Jacob Keller <jacob.e.keller@...el.com>,
        Jiri Pirko <jiri@...lanox.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Jonathan Corbet <corbet@....net>,
        Michael Chan <michael.chan@...adcom.com>,
        Bin Luo <luobin9@...wei.com>,
        Saeed Mahameed <saeedm@...lanox.com>,
        Leon Romanovsky <leon@...nel.org>,
        Ido Schimmel <idosch@...lanox.com>,
        Danielle Ratson <danieller@...lanox.com>
Subject: [net-next 0/4] devlink flash update overwrite mask

This series introduces support for a new attribute to the flash update
command: DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK. This attribute is a u32
value that represents a bitmask of which subsections of flash to
request/allow overwriting when performing a flash update.

The intent is to support the ability to control overwriting options of the
ice hardware flash update. Specifically, the ice flash components combine
settings and identifiers within the firmware flash section. This series
introduces the two subsections, "identifiers" and "settings". With the new
attribute, users can request to overwrite these subsections when performing
a flash update. By existing convention, it is assumed that flash program
binaries are always updated (and thus overwritten), and no mask bit is
provided to control this.

I updated the .flash_update command to take a new parameters structure, and
pass the new overwrite mask through there. All existing drivers besides ice
and netdevsim are updated to always reject the overwrite mask. netdevsim
gains a new debugfs knob to set what overwrite values the flash update
command should accept. I added some simple tests to the devlink.sh test file
to help verify the interface works.

Patches to enable support for specifying the overwrite sections are also
provided for iproute2-next. This is done primarily in order to enable the
tests for netdevsim. As discussed previously on the list, the primary
motivations for the overwrite mode are two-fold.

First, supporting update with a customized image that has pre-configured
settings and identifiers, used with overwrite of both settings and
identifiers. This enables an initial update to overwrite default values and
customize the adapter with a new serial ID and fresh settings. Second, it
may sometimes be useful to allow overwriting of settings when updating in
order to guarantee that the settings in the flash section are "known good".

The first two patches are for net-next, and the latter two patches are for
iproute2-next. (Note I expect the first iproute2 patch to be replaced by the
usual update of headers after the new attribute is merged).

Cc: Jiri Pirko <jiri@...lanox.com>
Cc: Jakub Kicinski <kuba@...nel.org>
Cc: Jonathan Corbet <corbet@....net>
Cc: Michael Chan <michael.chan@...adcom.com>
Cc: Bin Luo <luobin9@...wei.com>
Cc: Saeed Mahameed <saeedm@...lanox.com>
Cc: Leon Romanovsky <leon@...nel.org>
Cc: Ido Schimmel <idosch@...lanox.com>
Cc: Danielle Ratson <danieller@...lanox.com>

Jacob Keller (2):
  devlink: convert flash_update to use params structure
  devlink: introduce flash update overwrite mask

 .../networking/devlink/devlink-flash.rst      | 29 ++++++++++++++++
 Documentation/networking/devlink/ice.rst      | 31 +++++++++++++++++
 .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 15 ++++----
 .../net/ethernet/huawei/hinic/hinic_devlink.c |  7 ++--
 drivers/net/ethernet/intel/ice/ice_devlink.c  | 34 ++++++++++++++-----
 .../net/ethernet/intel/ice/ice_fw_update.c    | 16 +++++++--
 .../net/ethernet/intel/ice/ice_fw_update.h    |  2 +-
 .../net/ethernet/mellanox/mlx5/core/devlink.c |  7 ++--
 drivers/net/ethernet/mellanox/mlxsw/core.c    |  6 ++--
 drivers/net/ethernet/mellanox/mlxsw/core.h    |  2 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  6 ++--
 .../net/ethernet/netronome/nfp/nfp_devlink.c  |  9 ++---
 drivers/net/netdevsim/dev.c                   | 19 +++++++----
 drivers/net/netdevsim/netdevsim.h             |  1 +
 include/net/devlink.h                         | 15 ++++++--
 include/uapi/linux/devlink.h                  | 24 +++++++++++++
 net/core/devlink.c                            | 23 +++++++++----
 .../drivers/net/netdevsim/devlink.sh          | 18 ++++++++++
 18 files changed, 210 insertions(+), 54 deletions(-)

Jacob Keller (2):
  Update devlink header for overwrite mask attribute
  devlink: support setting the overwrite mask

 devlink/devlink.c            | 37 ++++++++++++++++++++++++++++++++++--
 include/uapi/linux/devlink.h | 24 +++++++++++++++++++++++
 2 files changed, 59 insertions(+), 2 deletions(-)

base-commit: 41d707b7332f1386642c47eb078110ca368a46f5
-- 
2.28.0.163.g6104cc2f0b60

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ