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:   Tue,  8 Jun 2021 22:03:24 +0300
From:   Vadym Kochan <vadym.kochan@...ision.eu>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Rob Herring <robh+dt@...nel.org>, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org
Cc:     Robert Marko <robert.marko@...tura.hr>,
        Vadym Kochan <vadym.kochan@...ision.eu>
Subject: [PATCH v2 0/3] nvmem: add ONIE NVMEM cells parser

This series adds cells parser for the ONIE TLV attributes which are
stored on NVMEM device. It adds possibility to read the mac address (and
other info) by other drivers.

Because ONIE stores info in TLV format it should be parsed first and
then register the cells. Current NVMEM API allows to register cell
table with known cell's offset which is not guaranteed in case of TLV.

To make it properly handled the NVMEM parser object is introduced. The
parser needs to be registered before target NVMEM device is registered.
During the registration of NVMEM device the parser is called to parse
the device's cells and reister the cell table.

v2:
    1) Series title changed, "provider" is replaced by "parser".

    2) onie-cells.c renamed to onie-tlv-cells.c

    3) Do not register onie cells parser via platform driver,
       but via module_init().

    4) Removed cells_remove callback from nvmem_parser_config because
       now cells table and lookups are registered by core.c

    5) Introduced nvmem_parser_data which is passed to parser
       handler/driver to fill cells table & lookups.

    6) core.c registers cells table & lookups to simplify the parser
       handler logic.

    7) parser's module refcount is incremented/decremented on each parser
       bind/unbind to nvmem device.

    8) core.c relies on parser name which is obtained via
       device_property API, instead of of_node which was used
       in previous version.

    9) nvmem-cell-parser-name DT nvmem property was added to bind
       cells parser to nvmem device during the nvmem registration.

P.S.
I marked it with v2 as relative to series which was sent as:

    "nvmem: add ONIE NVMEM cells provider"
    
Vadym Kochan (3):
  nvmem: core: introduce cells parser
  dt-bindings: nvmem: document nvmem-cells-parser-name property
  nvmem: add ONIE nvmem cells parser

 .../devicetree/bindings/nvmem/nvmem.yaml      |   5 +
 drivers/nvmem/Kconfig                         |   9 +
 drivers/nvmem/Makefile                        |   2 +
 drivers/nvmem/core.c                          | 178 +++++++++++
 drivers/nvmem/onie-tlv-cells.c                | 302 ++++++++++++++++++
 include/linux/nvmem-provider.h                |  31 ++
 6 files changed, 527 insertions(+)
 create mode 100644 drivers/nvmem/onie-tlv-cells.c

-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ