Re: [PATCH] block: fix part_pack_uuid() build error
From: Andrew Morton
Date: Mon Feb 25 2013 - 18:16:47 EST
On Sun, 24 Feb 2013 10:15:44 -0500
Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx> wrote:
> Fix a build error when CONFIG_BLOCK is not enabled, by defining
> a wrapper called blk_part_pack_uuid(). The wrapper returns
> -EINVAL, when CONFIG_BLOCK is not defined.
>
> security/integrity/ima/ima_policy.c:538:4: error: implicit declaration
> of function 'part_pack_uuid' [-Werror=implicit-function-declaration]
>
> ...
>
> diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
> index b27535a..399433a 100644
> --- a/security/integrity/ima/ima_policy.c
> +++ b/security/integrity/ima/ima_policy.c
> ima_log_string(ab, "fsuuid", args[0].from);
>
> if (memchr_inv(entry->fsuuid, 0x00,
> - sizeof(entry->fsuuid))) {
> + sizeof(entry->fsuuid))) {
> result = -EINVAL;
> break;
> }
>
> - part_pack_uuid(args[0].from, entry->fsuuid);
> - entry->flags |= IMA_FSUUID;
> - result = 0;
> + result = blk_part_pack_uuid(args[0].from,
> + entry->fsuuid);
> + if (!result)
> + entry->flags |= IMA_FSUUID;
This will cause ima_parse_rule() to newly return -EINVAL if the fsuuid=
option is used when CONFIG_BLOCK=n.
This functional change was not changelogged, forcing me to ask: was it
deliberate or was it accidental?
And it is a non-back-compatible change, introducing some potential to
break existing userspace code. Is the risk considered acceptable? If
so, why?
--
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/