[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-keyrings
Subject:    Re: [PATCH v8 3/5] KEYS: Call the IMA hook to measure keys
From:       Lakshmi Ramasubramanian <nramas () linux ! microsoft ! com>
Date:       2019-11-19 1:58:30
Message-ID: 3e051f5c-927e-cba6-7714-388e0216974a () linux ! microsoft ! com
[Download RAW message or body]

On 11/18/19 5:18 PM, Eric Snowberg wrote:

> > +#ifdef CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
> > +extern void ima_post_key_create_or_update(struct key *keyring,
> > +					  struct key *key,
> > +					  unsigned long flags, bool create);
> > +#endif
> 
> The extern void ima_post_key_create_or_update will only be defined if CONFIG_IMA=y.
> 

> 
> This will cause a compile error if CONFIG_IMA is not defined and \
> CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y. 
> security/keys/key.c: In function 'key_create_or_update':
> security/keys/key.c:940:2: error: implicit declaration of function \
> 'ima_post_key_create_or_update'; did you mean 'key_create_or_update'? \
> [-Werror=implicit-function-declaration] ima_post_key_create_or_update(keyring, key, \
> flags, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> key_create_or_update
> cc1: some warnings being treated as errors

You are right - Thanks for catching this error.
I'll fix this and send an update.

thanks,
  -lakshmi


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic