]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: qat - fix parameter order used in ICP_QAT_FW_COMN_FLAGS_BUILD
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Thu, 20 Nov 2025 16:29:23 +0000 (16:29 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 Dec 2025 06:47:46 +0000 (14:47 +0800)
commite3d036fecd6f89d4d262034de7bef8d6e49b661b
tree63d492be46e24b1f6f39c9f5fba5634184ab61d5
parentb74fd80d7fe578898a76344064d2678ce1efda61
crypto: qat - fix parameter order used in ICP_QAT_FW_COMN_FLAGS_BUILD

The macro ICP_QAT_FW_COMN_FLAGS_BUILD sets flags in the firmware
descriptor to indicate:

  * Whether the content descriptor is a pointer or contains embedded
    data.
  * Whether the source and destination buffers are scatter-gather lists
    or flat buffers.

The correct parameter order is:

  * First: content descriptor type
  * Second: source/destination pointer type

In the asymmetric crypto code, the macro was used with the parameters
swapped. Although this does not cause functional issues, since both
macros currently evaluate to 0, it is incorrect.

Fix the parameter order in the Diffie-Hellman and RSA code paths.

Fixes: a990532023b9 ("crypto: qat - Add support for RSA algorithm")
Fixes: c9839143ebbf ("crypto: qat - Add DH support")
Reported-by: Qihua Dai <qihua.dai@intel.com> # off-list
Reviewed-by: Ahsan Atta <ahsan.atta@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c