Re: [BUG] 3ce1217d6cd5 ima patch causes s390 to crash on boot

From: Heiko Carstens
Date: Fri Nov 22 2013 - 09:13:29 EST


On Fri, Nov 22, 2013 at 02:28:33PM +0100, Roberto Sassu wrote:
> On 11/22/2013 12:48 PM, Heiko Carstens wrote:
> >Hi Roberto,
> >
> >your patch 3ce1217d6cd5 "ima: define template fields library and new helpers"
> >causes s390 to crash on boot:
> >
>
> Hi Heiko
>
> thanks for the information. I think this issue is related to the error
> detected by the kbuild test robot. Please, try to apply the attached
> patch to see if it solves the problem.

No, the patch doesn't fix the problem.

> From: Fengguang Wu <fengguang.wu@xxxxxxxxx>
> Subject: [PATCH] ima: fix coccinelle warnings
> TO: Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx>
> CC: Roberto Sassu <roberto.sassu@xxxxxxxxx>
> CC: linux-kernel@xxxxxxxxxxxxxxx
>
> security/integrity/ima/ima_template.c:62:41-47: ERROR: application of sizeof to pointer
>
> sizeof when applied to a pointer typed expression gives the size of
> the pointer
>
> Generated by: coccinelle/misc/noderef.cocci
>
> CC: Roberto Sassu <roberto.sassu@xxxxxxxxx>
> CC: Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
> ---
>
> cocci-output-13142-271b5e-ima_template.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/security/integrity/ima/ima_template.c
> +++ b/security/integrity/ima/ima_template.c
> @@ -59,7 +59,7 @@ static int template_desc_init_fields(cha
> if (template_num_fields > IMA_TEMPLATE_NUM_FIELDS_MAX)
> return -EINVAL;
>
> - *fields = kzalloc(template_num_fields * sizeof(*fields), GFP_KERNEL);
> + *fields = kzalloc(template_num_fields * sizeof(**fields), GFP_KERNEL);
> if (*fields == NULL) {
> result = -ENOMEM;
> goto out;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/