linux/drivers/crypto/qat/qat_common
Srinivas Kerekare 908f24270d crypto: qat - add check to validate firmware images
The function qat_uclo_check_image() validates the MMP and AE firmware
images. If the QAT device supports firmware authentication (indicated
by the handle to firmware loader), the input signed binary MMP and AE
images are validated by parsing the following information:
- Header length
- Full size of the binary
- Type of binary image (MMP or AE Firmware)

Firmware binaries use RSA3K for signing and verification.
The header length for the RSA3k is 0x384 bytes.

All the size field values in the binary are quantified
as DWORDS (1 DWORD = 4bytes).

On an invalid value the function prints an error message and returns
with an error code "EINVAL".

Signed-off-by: Srinivas Kerekare <srinivas.kerekare@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2022-08-19 18:39:33 +08:00
..
adf_accel_devices.h crypto: qat - expose device state through sysfs for 4xxx 2022-07-08 15:15:59 +08:00
adf_accel_engine.c crypto: qat - add support for compression for 4xxx 2021-12-24 14:18:27 +11:00
adf_admin.c crypto: qat - enable power management for QAT GEN4 2022-02-18 16:21:09 +11:00
adf_aer.c crypto: qat - simplify adf_enable_aer() 2021-10-12 17:37:15 -05:00
adf_cfg_common.h crypto: qat - store the ring-to-service mapping 2021-12-24 14:18:26 +11:00
adf_cfg_strings.h crypto: qat - add support for compression for 4xxx 2021-12-24 14:18:27 +11:00
adf_cfg_user.h crypto: qat - replace user types with kernel ABI __u types 2020-06-18 17:26:42 +10:00
adf_cfg.c crypto: qat - change behaviour of adf_cfg_add_key_value_param() 2022-07-08 15:15:59 +08:00
adf_cfg.h crypto: qat - convert to SPDX License Identifiers 2020-06-18 17:19:44 +10:00
adf_common_drv.h crypto: qat - relocate and rename adf_sriov_prepare_restart() 2022-07-08 15:15:59 +08:00
adf_ctl_drv.c crypto: qat - add misc workqueue 2022-02-18 16:21:09 +11:00
adf_dev_mgr.c crypto: qat - fix excluded_middle.cocci warnings 2020-11-27 17:13:41 +11:00
adf_gen2_hw_data.c crypto: qat - fix ETR sources enabled by default on GEN2 devices 2022-04-15 16:34:26 +08:00
adf_gen2_hw_data.h crypto: qat - fix ETR sources enabled by default on GEN2 devices 2022-04-15 16:34:26 +08:00
adf_gen2_pfvf.c crypto: qat - remove line wrapping for pfvf_ops functions 2022-04-15 16:34:27 +08:00
adf_gen2_pfvf.h crypto: qat - add pfvf_ops 2021-11-26 16:20:46 +11:00
adf_gen4_hw_data.c crypto: qat - add the adf_get_pmisc_base() helper function 2021-12-24 14:18:24 +11:00
adf_gen4_hw_data.h crypto: qat - move and rename GEN4 error register definitions 2022-02-18 16:21:09 +11:00
adf_gen4_pfvf.c crypto: qat - remove line wrapping for pfvf_ops functions 2022-04-15 16:34:27 +08:00
adf_gen4_pfvf.h crypto: qat - add PFVF support to the GEN4 host driver 2021-12-24 14:18:27 +11:00
adf_gen4_pm.c crypto: qat - enable power management for QAT GEN4 2022-02-18 16:21:09 +11:00
adf_gen4_pm.h crypto: qat - enable power management for QAT GEN4 2022-02-18 16:21:09 +11:00
adf_hw_arbiter.c crypto: qat - configure arbiter mapping based on engines enabled 2021-01-14 17:10:26 +11:00
adf_init.c crypto: qat - relocate and rename adf_sriov_prepare_restart() 2022-07-08 15:15:59 +08:00
adf_isr.c crypto: qat - replace disable_vf2pf_interrupts() 2022-04-15 16:34:27 +08:00
adf_pfvf_msg.h crypto: qat - fix wording and formatting in code comment 2022-04-15 16:34:26 +08:00
adf_pfvf_pf_msg.c crypto: qat - exchange ring-to-service mappings over PFVF 2021-12-24 14:18:26 +11:00
adf_pfvf_pf_msg.h crypto: qat - exchange ring-to-service mappings over PFVF 2021-12-24 14:18:26 +11:00
adf_pfvf_pf_proto.c crypto: qat - fix off-by-one error in PFVF debug print 2022-04-15 16:34:27 +08:00
adf_pfvf_pf_proto.h crypto: qat - abstract PFVF messages with struct pfvf_message 2021-12-24 14:18:25 +11:00
adf_pfvf_utils.c crypto: qat - introduce support for PFVF block messages 2021-12-24 14:18:26 +11:00
adf_pfvf_utils.h crypto: qat - introduce support for PFVF block messages 2021-12-24 14:18:26 +11:00
adf_pfvf_vf_msg.c crypto: qat - fix initialization of pfvf rts_map_msg structures 2022-03-09 15:12:32 +12:00
adf_pfvf_vf_msg.h crypto: qat - exchange ring-to-service mappings over PFVF 2021-12-24 14:18:26 +11:00
adf_pfvf_vf_proto.c crypto: qat - add PFVF support to enable the reset of ring pairs 2021-12-24 14:18:27 +11:00
adf_pfvf_vf_proto.h crypto: qat - introduce support for PFVF block messages 2021-12-24 14:18:26 +11:00
adf_sriov.c crypto: qat - relocate and rename adf_sriov_prepare_restart() 2022-07-08 15:15:59 +08:00
adf_sysfs.c crypto: qat - expose device config through sysfs for 4xxx 2022-07-08 15:15:59 +08:00
adf_transport_access_macros.h crypto: qat - remove hardcoded bank irq clear flag mask 2020-10-30 17:34:57 +11:00
adf_transport_debug.c crypto: qat - change format string and cast ring size 2021-01-14 17:10:26 +11:00
adf_transport_internal.h crypto: qat - add backlog mechanism 2022-05-20 13:49:17 +08:00
adf_transport.c crypto: qat - add backlog mechanism 2022-05-20 13:49:17 +08:00
adf_transport.h crypto: qat - add backlog mechanism 2022-05-20 13:49:17 +08:00
adf_vf_isr.c crypto: qat - add missing restarting event notification in VFs 2022-04-15 16:34:26 +08:00
icp_qat_fw_init_admin.h crypto: qat - enable power management for QAT GEN4 2022-02-18 16:21:09 +11:00
icp_qat_fw_la.h crypto: qat - add AES-CTR support for QAT GEN4 devices 2020-12-11 21:54:15 +11:00
icp_qat_fw_loader_handle.h crypto: qat - check MMP size before writing to the SRAM 2021-05-28 14:20:40 +08:00
icp_qat_fw_pke.h crypto: qat - replace user types with kernel ABI __u types 2020-06-18 17:26:42 +10:00
icp_qat_fw.h crypto: qat - replace user types with kernel ABI __u types 2020-06-18 17:26:42 +10:00
icp_qat_hal.h crypto: qat - add gen4 firmware loader 2020-11-13 20:38:55 +11:00
icp_qat_hw.h crypto: qat - allow detection of dc capabilities for 4xxx 2021-12-24 14:18:27 +11:00
icp_qat_uclo.h crypto: qat - add check to validate firmware images 2022-08-19 18:39:33 +08:00
Makefile crypto: qat - expose device state through sysfs for 4xxx 2022-07-08 15:15:59 +08:00
qat_algs_send.c crypto: qat - add backlog mechanism 2022-05-20 13:49:17 +08:00
qat_algs_send.h crypto: qat - add backlog mechanism 2022-05-20 13:49:17 +08:00
qat_algs.c crypto: qat - replace get_current_node() with numa_node_id() 2022-06-24 17:12:29 +08:00
qat_asym_algs.c crypto: qat - replace get_current_node() with numa_node_id() 2022-06-24 17:12:29 +08:00
qat_crypto.c crypto: qat - re-enable registration of algorithms 2022-05-20 13:49:18 +08:00
qat_crypto.h crypto: qat - honor CRYPTO_TFM_REQ_MAY_SLEEP flag 2022-05-20 13:49:18 +08:00
qat_hal.c crypto: qat - add support for 401xx devices 2022-05-20 13:49:18 +08:00
qat_uclo.c crypto: qat - add check to validate firmware images 2022-08-19 18:39:33 +08:00