fpga: m10bmc-sec: expose max10 canceled keys in sysfs
authorRuss Weight <russell.h.weight@intel.com>
Mon, 6 Jun 2022 16:00:37 +0000 (09:00 -0700)
committerXu Yilun <yilun.xu@intel.com>
Wed, 8 Jun 2022 09:04:38 +0000 (17:04 +0800)
commit7f03d84a672d87630448339a8a0e1d689f6980f9
treee84306d2c5532268db043805acb6101d5ae95471
parent154afa5c31cd2de5e6c2c4f35eee390993ee345a
fpga: m10bmc-sec: expose max10 canceled keys in sysfs

Extend the MAX10 BMC Secure Update driver to provide sysfs files to
expose the 128 bit code signing key (CSK) cancellation vectors. These use
the standard bitmap list format (e.g. 1,2-6,9).

Each CSK is assigned an ID, a number between 0-127, during the signing
process. CSK ID cancellation information is stored in 128-bit fields in
write-once locations in flash.  The cancellation of a CSK can be used
to prevent the card from being rolled back to older images that were
signed with a CSK that is now cancelled.

Reviewed-by: Tom Rix <trix@redhat.com>
Tested-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Link: https://lore.kernel.org/r/20220606160038.846236-5-russell.h.weight@intel.com
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-sec-update
drivers/fpga/intel-m10-bmc-sec-update.c