iMX8qxp dm-verify build fail and how to verify

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX8qxp dm-verify build fail and how to verify

Jump to solution
1,060 Views
yellow_huang
Contributor II

Hi,

I try to enable dm-verity feature in Linux 4.14.98_2.3.3 BSP(non android variant) but compile fail, attached full bitbake linux-imx log to review:

```

/home/build/project_rs1100_tbox/imx-yocto-bsp/build_bringup/tmp/work-shared/imx8qxpc0mek/kernel-source/drivers/md/dm-verity-target.c: In function 'verity_hash_update':

/home/build/project_rs1100_tbox/imx-yocto-bsp/build_bringup/tmp/work-shared/imx8qxpc0mek/kernel-source/drivers/md/dm-verity-target.c:104:10: error: implicit declaration of function 'verity_complete_op'; did you mean 'reinit_completion'? [-Werror=implicit-function-declaration]
return verity_complete_op(res, crypto_ahash_update(req));
^~~~~~~~~~~~~~~~~~
reinit_completion

/home/build/project_rs1100_tbox/imx-yocto-bsp/build_bringup/tmp/work-shared/imx8qxpc0mek/kernel-source/drivers/md/dm-verity-target.c:104:29: error: 'res' undeclared (first use in this function); did you mean 'req'?
return verity_complete_op(res, crypto_ahash_update(req));
^~~
req

/home/build/project_rs1100_tbox/imx-yocto-bsp/build_bringup/tmp/work-shared/imx8qxpc0mek/kernel-source/drivers/md/dm-verity-target.c:104:29: note: each undeclared identifier is reported only once for each function it appears in

/home/build/project_rs1100_tbox/imx-yocto-bsp/build_bringup/tmp/work-shared/imx8qxpc0mek/kernel-source/drivers/md/dm-verity-target.c:121:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

cc1: some warnings being treated as errors

```

The kernel configurations I turn on as below

```

CONFIG_MD=y

CONFIG_BLK_DEV_DM_BUILTIN=y
CONFIG_BLK_DEV_DM=y

CONFIG_DM_VERITY=y

```

Can NXP resolve this module compile error and teach me how to verify?

Thanks,

0 Kudos
1 Solution
1,031 Views
frodolai
Contributor IV

cherry pick this commit

commit 4397f84f8d81d0535c6658fd6ead514c37c1d340
Author: Gilad Ben-Yossef <gilad@benyossef.com>
Date: Wed Oct 18 08:00:45 2017 +0100

dm: move dm-verity to generic async completion

dm-verity is starting async. crypto ops and waiting for them to complete.
Move it over to generic code doing the same.

This also avoids a future potential data coruption bug created
by the use of wait_for_completion_interruptible() without dealing
correctly with an interrupt aborting the wait prior to the
async op finishing, should this code ever move to a context
where signals are not masked.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
CC: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Conflicts:
drivers/md/dm-verity-target.c

Change-Id: Ie822c4f777ae7ee7467cf6e7d5d4012736cdd086

View solution in original post

0 Kudos
2 Replies
1,032 Views
frodolai
Contributor IV

cherry pick this commit

commit 4397f84f8d81d0535c6658fd6ead514c37c1d340
Author: Gilad Ben-Yossef <gilad@benyossef.com>
Date: Wed Oct 18 08:00:45 2017 +0100

dm: move dm-verity to generic async completion

dm-verity is starting async. crypto ops and waiting for them to complete.
Move it over to generic code doing the same.

This also avoids a future potential data coruption bug created
by the use of wait_for_completion_interruptible() without dealing
correctly with an interrupt aborting the wait prior to the
async op finishing, should this code ever move to a context
where signals are not masked.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
CC: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Conflicts:
drivers/md/dm-verity-target.c

Change-Id: Ie822c4f777ae7ee7467cf6e7d5d4012736cdd086

0 Kudos
1,042 Views
yellow_huang
Contributor II

Hi all,

 

Any update? dm-verity kernel module build fail at Linux 4.14.98_2.3.3 is critical issue for loop/squashfs hash content checking.

 

0 Kudos