[PATCH v2] crypto/fsl: fsl_hash: Fix crash in flush dcache

Fabio Estevam festevam at gmail.com
Tue Jun 14 23:24:56 CEST 2022


Hi Gaurav,

On Thu, Jun 9, 2022 at 9:47 AM Gaurav Jain <gaurav.jain at nxp.com> wrote:

> +       flush_dcache_range((ulong)ctx->sg_tbl,
> +                          (ulong)(ctx->sg_tbl) + (ctx->sg_num * sizeof(struct sg_entry)));
> +       for (i = 0; i < ctx->sg_num; i++) {
> +               sg_entry_len = (sec_in32(&ctx->sg_tbl[i].len_flag) &
> +                               SG_ENTRY_LENGTH_MASK);
> +               len += sg_entry_len;
> +               addr = sec_in32(&ctx->sg_tbl[i].addr_hi);
> +               addr = (addr << 32) | sec_in32(&ctx->sg_tbl[i].addr_lo);

This breaks the build:

arm: + ls1021aiot_qspi
1183+drivers/crypto/fsl/fsl_hash.c: In function 'caam_hash_finish':
1184+drivers/crypto/fsl/fsl_hash.c:150:30: error: left shift count >=
width of type [-Werror=shift-count-overflow]
1185+ 150 | addr = (addr << 32) | sec_in32(&ctx->sg_tbl[i].addr_lo);
1186+ | ^~
1187+cc1: all warnings being treated as errors

Please check:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/448344


More information about the U-Boot mailing list