[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8eba665e-637c-d341-c77d-4f2645d3b246@linux.microsoft.com>
Date: Wed, 13 Nov 2019 12:52:46 -0800
From: Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>
To: Mimi Zohar <zohar@...ux.ibm.com>, dhowells@...hat.com,
matthewgarrett@...gle.com, sashal@...nel.org,
jamorris@...ux.microsoft.com, linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org, keyrings@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 2/3] IMA: Define an IMA hook to measure keys
On 11/13/19 12:09 PM, Mimi Zohar wrote:
>
> All that is is needed is the key and public_key structures, which are
> defined in include/linux/keys.h and include/crypto/public_key.h. If
> the keys subsystem is disabled, then the new IMA hook won't be called.
> There's no need for a new Kconfig option or a new file.
>
> Please move the hook to just after ima_kexec_cmdline().
>
> Mimi
Yes - IMA hook won't be called when KEYS subsystem is disabled.
But, build dependency is breaking since "struct key" is not defined
without CONFIG_KEYS.
Sasha was able to craft a .config that enabled IMA without enabling KEYS
and found the build break.
Please see the build output he'd shared.
***********************************************************************
In file included from security/integrity/ima/ima.h:25,
from security/integrity/ima/ima_fs.c:26:
./include/keys/asymmetric-type.h: In function ‘asymmetric_key_ids’:
./include/keys/asymmetric-type.h:72:12: error: dereferencing pointer to
incomplete type ‘const struct key’
return key->payload.data[asym_key_ids];
^~
make[3]: *** [scripts/Makefile.build:266:
security/integrity/ima/ima_fs.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from security/integrity/ima/ima.h:25,
from security/integrity/ima/ima_queue.c:22:
./include/keys/asymmetric-type.h: In function ‘asymmetric_key_ids’:
./include/keys/asymmetric-type.h:72:12: error: dereferencing pointer to
incomplete type ‘const struct key’
return key->payload.data[asym_key_ids];
***********************************************************************
thanks,
-lakshmi
Powered by blists - more mailing lists