All of lore.kernel.org
 help / color / mirror / Atom feed
* [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
@ 2020-01-05  9:00 ` kbuild test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2020-01-05  9:00 UTC (permalink / raw)
  To: Lakshmi Ramasubramanian; +Cc: kbuild-all, linux-integrity, Mimi Zohar

[-- Attachment #1: Type: text/plain, Size: 5272 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity-testing
head:   cc3e145566e2f2b697e67f01ed973b3782ba8b83
commit: cc3e145566e2f2b697e67f01ed973b3782ba8b83 [5/5] IMA: Defined timer to free queued keys
config: x86_64-randconfig-e003-20200105 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout cc3e145566e2f2b697e67f01ed973b3782ba8b83
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
    void ima_init_key_queue(void)
         ^~~~~~~~~~~~~~~~~~
   In file included from security/integrity/ima/ima_asymmetric_keys.c:16:0:
   security/integrity/ima/ima.h:222:20: note: previous definition of 'ima_init_key_queue' was here
    static inline void ima_init_key_queue(void) {}
                       ^~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c:60:39: warning: 'struct ima_key_entry' declared inside parameter list will not be visible outside of this definition or declaration
    static void ima_free_key_entry(struct ima_key_entry *entry)
                                          ^~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c: In function 'ima_free_key_entry':
   security/integrity/ima/ima_asymmetric_keys.c:63:14: error: dereferencing pointer to incomplete type 'struct ima_key_entry'
      kfree(entry->payload);
                 ^~
   security/integrity/ima/ima_asymmetric_keys.c: In function 'ima_alloc_key_entry':
   security/integrity/ima/ima_asymmetric_keys.c:76:25: error: dereferencing pointer to incomplete type 'struct ima_key_entry'
     entry = kzalloc(sizeof(*entry), GFP_KERNEL);
                            ^~~~~~
   security/integrity/ima/ima_asymmetric_keys.c:94:22: error: passing argument 1 of 'ima_free_key_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ima_free_key_entry(entry);
                         ^~~~~
   security/integrity/ima/ima_asymmetric_keys.c:60:13: note: expected 'struct ima_key_entry *' but argument is of type 'struct ima_key_entry *'
    static void ima_free_key_entry(struct ima_key_entry *entry)
                ^~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c: In function 'ima_queue_key':
   security/integrity/ima/ima_asymmetric_keys.c:119:22: error: passing argument 1 of 'ima_free_key_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ima_free_key_entry(entry);
                         ^~~~~
   security/integrity/ima/ima_asymmetric_keys.c:60:13: note: expected 'struct ima_key_entry *' but argument is of type 'struct ima_key_entry *'
    static void ima_free_key_entry(struct ima_key_entry *entry)
                ^~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c: At top level:
   security/integrity/ima/ima_asymmetric_keys.c:130:6: error: redefinition of 'ima_process_queued_keys'
    void ima_process_queued_keys(void)
         ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from security/integrity/ima/ima_asymmetric_keys.c:16:0:
   security/integrity/ima/ima.h:221:20: note: previous definition of 'ima_process_queued_keys' was here
    static inline void ima_process_queued_keys(void) {}
                       ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/timer.h:5:0,
                    from security/integrity/ima/ima_asymmetric_keys.c:14:
   security/integrity/ima/ima_asymmetric_keys.c: In function 'ima_process_queued_keys':
   include/linux/list.h:664:57: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     for (pos = list_first_entry(head, typeof(*pos), member), \
                                                            ^
   security/integrity/ima/ima_asymmetric_keys.c:156:2: note: in expansion of macro 'list_for_each_entry_safe'
     list_for_each_entry_safe(entry, tmp, &ima_keys, list) {
     ^~~~~~~~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c:164:22: error: passing argument 1 of 'ima_free_key_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ima_free_key_entry(entry);
                         ^~~~~
   security/integrity/ima/ima_asymmetric_keys.c:60:13: note: expected 'struct ima_key_entry *' but argument is of type 'struct ima_key_entry *'
    static void ima_free_key_entry(struct ima_key_entry *entry)
                ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/ima_init_key_queue +53 security/integrity/ima/ima_asymmetric_keys.c

    48	
    49	/*
    50	 * This function sets up a timer to free queued keys in case
    51	 * custom IMA policy was never loaded.
    52	 */
  > 53	void ima_init_key_queue(void)
    54	{
    55		timer_setup(&ima_key_queue_timer, ima_timer_handler, 0);
    56		mod_timer(&ima_key_queue_timer,
    57			  jiffies + msecs_to_jiffies(ima_key_queue_timeout));
    58	}
    59	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35966 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
@ 2020-01-05  9:00 ` kbuild test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2020-01-05  9:00 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5363 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity-testing
head:   cc3e145566e2f2b697e67f01ed973b3782ba8b83
commit: cc3e145566e2f2b697e67f01ed973b3782ba8b83 [5/5] IMA: Defined timer to free queued keys
config: x86_64-randconfig-e003-20200105 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout cc3e145566e2f2b697e67f01ed973b3782ba8b83
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
    void ima_init_key_queue(void)
         ^~~~~~~~~~~~~~~~~~
   In file included from security/integrity/ima/ima_asymmetric_keys.c:16:0:
   security/integrity/ima/ima.h:222:20: note: previous definition of 'ima_init_key_queue' was here
    static inline void ima_init_key_queue(void) {}
                       ^~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c:60:39: warning: 'struct ima_key_entry' declared inside parameter list will not be visible outside of this definition or declaration
    static void ima_free_key_entry(struct ima_key_entry *entry)
                                          ^~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c: In function 'ima_free_key_entry':
   security/integrity/ima/ima_asymmetric_keys.c:63:14: error: dereferencing pointer to incomplete type 'struct ima_key_entry'
      kfree(entry->payload);
                 ^~
   security/integrity/ima/ima_asymmetric_keys.c: In function 'ima_alloc_key_entry':
   security/integrity/ima/ima_asymmetric_keys.c:76:25: error: dereferencing pointer to incomplete type 'struct ima_key_entry'
     entry = kzalloc(sizeof(*entry), GFP_KERNEL);
                            ^~~~~~
   security/integrity/ima/ima_asymmetric_keys.c:94:22: error: passing argument 1 of 'ima_free_key_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ima_free_key_entry(entry);
                         ^~~~~
   security/integrity/ima/ima_asymmetric_keys.c:60:13: note: expected 'struct ima_key_entry *' but argument is of type 'struct ima_key_entry *'
    static void ima_free_key_entry(struct ima_key_entry *entry)
                ^~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c: In function 'ima_queue_key':
   security/integrity/ima/ima_asymmetric_keys.c:119:22: error: passing argument 1 of 'ima_free_key_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ima_free_key_entry(entry);
                         ^~~~~
   security/integrity/ima/ima_asymmetric_keys.c:60:13: note: expected 'struct ima_key_entry *' but argument is of type 'struct ima_key_entry *'
    static void ima_free_key_entry(struct ima_key_entry *entry)
                ^~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c: At top level:
   security/integrity/ima/ima_asymmetric_keys.c:130:6: error: redefinition of 'ima_process_queued_keys'
    void ima_process_queued_keys(void)
         ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from security/integrity/ima/ima_asymmetric_keys.c:16:0:
   security/integrity/ima/ima.h:221:20: note: previous definition of 'ima_process_queued_keys' was here
    static inline void ima_process_queued_keys(void) {}
                       ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/timer.h:5:0,
                    from security/integrity/ima/ima_asymmetric_keys.c:14:
   security/integrity/ima/ima_asymmetric_keys.c: In function 'ima_process_queued_keys':
   include/linux/list.h:664:57: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     for (pos = list_first_entry(head, typeof(*pos), member), \
                                                            ^
   security/integrity/ima/ima_asymmetric_keys.c:156:2: note: in expansion of macro 'list_for_each_entry_safe'
     list_for_each_entry_safe(entry, tmp, &ima_keys, list) {
     ^~~~~~~~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima_asymmetric_keys.c:164:22: error: passing argument 1 of 'ima_free_key_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ima_free_key_entry(entry);
                         ^~~~~
   security/integrity/ima/ima_asymmetric_keys.c:60:13: note: expected 'struct ima_key_entry *' but argument is of type 'struct ima_key_entry *'
    static void ima_free_key_entry(struct ima_key_entry *entry)
                ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/ima_init_key_queue +53 security/integrity/ima/ima_asymmetric_keys.c

    48	
    49	/*
    50	 * This function sets up a timer to free queued keys in case
    51	 * custom IMA policy was never loaded.
    52	 */
  > 53	void ima_init_key_queue(void)
    54	{
    55		timer_setup(&ima_key_queue_timer, ima_timer_handler, 0);
    56		mod_timer(&ima_key_queue_timer,
    57			  jiffies + msecs_to_jiffies(ima_key_queue_timeout));
    58	}
    59	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35966 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
  2020-01-05  9:00 ` kbuild test robot
  (?)
@ 2020-01-05 17:57 ` Lakshmi Ramasubramanian
  2020-01-05 18:15   ` James Bottomley
  -1 siblings, 1 reply; 9+ messages in thread
From: Lakshmi Ramasubramanian @ 2020-01-05 17:57 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all, linux-integrity, Mimi Zohar

On 1/5/2020 1:00 AM, kbuild test robot wrote:

> 
>>> security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
>      void ima_init_key_queue(void)
>           ^~~~~~~~~~~~~~~~~~
>     In file included from security/integrity/ima/ima_asymmetric_keys.c:16:0:
>     security/integrity/ima/ima.h:222:20: note: previous definition of 'ima_init_key_queue' was here
>      static inline void ima_init_key_queue(void) {}

In the given config file the following configs are specified

	CONFIG_IMA=y
	CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m

If CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is selected 
ima_asymmetric_keys.c file is built and linked (as given in the 
Makefile). ima_init_key_queue() is declared in ima.h

But if CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is not selected 
ima_asymmetric_keys.c is not built. ima_init_key_queue() is declared as 
an empty function (static inline in ima.h)

#ifdef CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
void ima_init_key_queue(void);
#else
static inline void ima_init_key_queue(void) {}
#endif /* CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE */

If I understand the reported build error, it looks like 
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE was disabled first and then enabled 
later - in the same build sequence.

Is that correct?

thanks,
  -lakshmi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
  2020-01-05 17:57 ` Lakshmi Ramasubramanian
@ 2020-01-05 18:15   ` James Bottomley
  2020-01-05 18:56     ` Lakshmi Ramasubramanian
  0 siblings, 1 reply; 9+ messages in thread
From: James Bottomley @ 2020-01-05 18:15 UTC (permalink / raw)
  To: Lakshmi Ramasubramanian, kbuild test robot
  Cc: kbuild-all, linux-integrity, Mimi Zohar

On Sun, 2020-01-05 at 09:57 -0800, Lakshmi Ramasubramanian wrote:
> On 1/5/2020 1:00 AM, kbuild test robot wrote:
> 
> > 
> > > > security/integrity/ima/ima_asymmetric_keys.c:53:6: error:
> > > > redefinition of 'ima_init_key_queue'
> > 
> >      void ima_init_key_queue(void)
> >           ^~~~~~~~~~~~~~~~~~
> >     In file included from
> > security/integrity/ima/ima_asymmetric_keys.c:16:0:
> >     security/integrity/ima/ima.h:222:20: note: previous definition
> > of 'ima_init_key_queue' was here
> >      static inline void ima_init_key_queue(void) {}
> 
> In the given config file the following configs are specified
> 
> 	CONFIG_IMA=y
> 	CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m
> 
> If CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is selected 
> ima_asymmetric_keys.c file is built and linked (as given in the 
> Makefile). ima_init_key_queue() is declared in ima.h
> 
> But if CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is not selected 
> ima_asymmetric_keys.c is not built. ima_init_key_queue() is declared
> as an empty function (static inline in ima.h)
> 
> #ifdef CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
> void ima_init_key_queue(void);
> #else
> static inline void ima_init_key_queue(void) {}
> #endif /* CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE */
> 
> If I understand the reported build error, it looks like 
> CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE was disabled first and then
> enabled later - in the same build sequence.
> 
> Is that correct?

I don't think so.  The specific problem is that
ASYMMETRIC_PUBLIC_KEY_SUBTYPE is defined as a tristate in
crypto/asymmetric_keys/Kconfig, so the above m setting for it is
perfectly legal regardless of the IMA setting.  This line you
introduced to the Makefile:

obj-$(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += ima_asymmetric_keys.o

Then causes ima_asymmetric_keys.o to be added to obj-m causing the
kernel to think it's building it as a module.

To fix this, I think you have to force ASYMMETRIC_PUBLIC_KEY_SUBTYPE to
be built in if IMA is.

James


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
  2020-01-05 18:15   ` James Bottomley
@ 2020-01-05 18:56     ` Lakshmi Ramasubramanian
  2020-01-05 19:16       ` James Bottomley
  0 siblings, 1 reply; 9+ messages in thread
From: Lakshmi Ramasubramanian @ 2020-01-05 18:56 UTC (permalink / raw)
  To: James Bottomley, kbuild test robot
  Cc: kbuild-all, linux-integrity, Mimi Zohar

On 1/5/2020 10:15 AM, James Bottomley wrote:

>> #ifdef CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
>> void ima_init_key_queue(void);
>> #else
>> static inline void ima_init_key_queue(void) {}
>> #endif /* CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE */
>>
>> If I understand the reported build error, it looks like
>> CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE was disabled first and then
>> enabled later - in the same build sequence.
>>
>> Is that correct?
> 
> I don't think so.  The specific problem is that
> ASYMMETRIC_PUBLIC_KEY_SUBTYPE is defined as a tristate in
> crypto/asymmetric_keys/Kconfig, so the above m setting for it is
> perfectly legal regardless of the IMA setting.  This line you
> introduced to the Makefile:
> 
> obj-$(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += ima_asymmetric_keys.o
> 
> Then causes ima_asymmetric_keys.o to be added to obj-m causing the
> kernel to think it's building it as a module.
> 
> To fix this, I think you have to force ASYMMETRIC_PUBLIC_KEY_SUBTYPE to
> be built in if IMA is.
> 
> James

Thanks for the info James. That explains the other error reported 
earlier - ima_asymmetric_keys.c being built as a kernel module.

Since IMA can currently be enabled without enabling the KEYS subsystem, 
I feel forcing ASYMMETRIC_PUBLIC_KEY_SUBTYPE to be built if IMA is may 
not be safe. Right?

Instead can CONFIG_ASYMMETRIC_KEY_TYPE be used to enable key measurement 
code in IMA?

crypto\asymmetric_keys\Kconfig

# SPDX-License-Identifier: GPL-2.0
menuconfig ASYMMETRIC_KEY_TYPE
	bool "Asymmetric (public-key cryptographic) key type"
	depends on KEYS
         help
	  This option provides support for a key type that holds the
           data for the asymmetric keys used for public key cryptographic
           operations such as encryption, decryption, signature
           generation and signature verification.

thanks,
  -lakshmi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
  2020-01-05 18:56     ` Lakshmi Ramasubramanian
@ 2020-01-05 19:16       ` James Bottomley
  2020-01-06  3:58         ` Lakshmi Ramasubramanian
  0 siblings, 1 reply; 9+ messages in thread
From: James Bottomley @ 2020-01-05 19:16 UTC (permalink / raw)
  To: Lakshmi Ramasubramanian; +Cc: kbuild-all, linux-integrity, Mimi Zohar

On Sun, 2020-01-05 at 10:56 -0800, Lakshmi Ramasubramanian wrote:
> On 1/5/2020 10:15 AM, James Bottomley wrote:
> 
> > > #ifdef CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
> > > void ima_init_key_queue(void);
> > > #else
> > > static inline void ima_init_key_queue(void) {}
> > > #endif /* CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE */
> > > 
> > > If I understand the reported build error, it looks like
> > > CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE was disabled first and then
> > > enabled later - in the same build sequence.
> > > 
> > > Is that correct?
> > 
> > I don't think so.  The specific problem is that
> > ASYMMETRIC_PUBLIC_KEY_SUBTYPE is defined as a tristate in
> > crypto/asymmetric_keys/Kconfig, so the above m setting for it is
> > perfectly legal regardless of the IMA setting.  This line you
> > introduced to the Makefile:
> > 
> > obj-$(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE) +=
> > ima_asymmetric_keys.o
> > 
> > Then causes ima_asymmetric_keys.o to be added to obj-m causing the
> > kernel to think it's building it as a module.
> > 
> > To fix this, I think you have to force
> > ASYMMETRIC_PUBLIC_KEY_SUBTYPE to
> > be built in if IMA is.
> > 
> > James
> 
> Thanks for the info James. That explains the other error reported 
> earlier - ima_asymmetric_keys.c being built as a kernel module.
> 
> Since IMA can currently be enabled without enabling the KEYS
> subsystem, I feel forcing ASYMMETRIC_PUBLIC_KEY_SUBTYPE to be built
> if IMA is may  not be safe. Right?

In general trying to force via select can have unintended consequences
for options with large dependencies, yes.

> Instead can CONFIG_ASYMMETRIC_KEY_TYPE be used to enable key
> measurement code in IMA?

Well, yes, you just need to condition the build of ima_asymmetric_keys
on a boolean instead of a tristate, so you introduce an intermediate
one:

config IMA_ASYMMETRIC_KEYS
	bool
	default y
	depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y

James


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
  2020-01-05 19:16       ` James Bottomley
@ 2020-01-06  3:58         ` Lakshmi Ramasubramanian
  2020-01-06 13:23           ` Mimi Zohar
  2020-01-06 14:58           ` James Bottomley
  0 siblings, 2 replies; 9+ messages in thread
From: Lakshmi Ramasubramanian @ 2020-01-06  3:58 UTC (permalink / raw)
  To: James Bottomley, Mimi Zohar; +Cc: linux-integrity

On 1/5/20 11:16 AM, James Bottomley wrote:

> Well, yes, you just need to condition the build of ima_asymmetric_keys
> on a boolean instead of a tristate, so you introduce an intermediate
> one:
> 
> config IMA_ASYMMETRIC_KEYS
> 	bool
> 	default y
> 	depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
> 
> James

Thanks for your help James.

Hi Mimi,

I have defined a new config as James has suggested above and verified 
the kernel builds fine with the ".config" files given by
"kbuild test robot <lkp@intel.com>".

Would it be possible to share all the ".config" files that
"kbuild test robot" would build with? I'll make sure my changes build 
fine with all those.

thanks,
  -lakshmi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
  2020-01-06  3:58         ` Lakshmi Ramasubramanian
@ 2020-01-06 13:23           ` Mimi Zohar
  2020-01-06 14:58           ` James Bottomley
  1 sibling, 0 replies; 9+ messages in thread
From: Mimi Zohar @ 2020-01-06 13:23 UTC (permalink / raw)
  To: Lakshmi Ramasubramanian, James Bottomley; +Cc: linux-integrity

On Sun, 2020-01-05 at 19:58 -0800, Lakshmi Ramasubramanian wrote:
> On 1/5/20 11:16 AM, James Bottomley wrote:
> 
> > Well, yes, you just need to condition the build of ima_asymmetric_keys
> > on a boolean instead of a tristate, so you introduce an intermediate
> > one:
> > 
> > config IMA_ASYMMETRIC_KEYS
> > 	bool
> > 	default y
> > 	depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
> > 
> > James
> 
> Thanks for your help James.
> 
> Hi Mimi,
> 
> I have defined a new config as James has suggested above and verified 
> the kernel builds fine with the ".config" files given by
> "kbuild test robot <lkp@intel.com>".
> 
> Would it be possible to share all the ".config" files that
> "kbuild test robot" would build with? I'll make sure my changes build 
> fine with all those.

Different groups are doing automatic testing.  This one is coming from
Intel's kbuild test robot, but there is syzbot and smatch testing as
well.  Your question would need to be directed to them.

Mimi


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue'
  2020-01-06  3:58         ` Lakshmi Ramasubramanian
  2020-01-06 13:23           ` Mimi Zohar
@ 2020-01-06 14:58           ` James Bottomley
  1 sibling, 0 replies; 9+ messages in thread
From: James Bottomley @ 2020-01-06 14:58 UTC (permalink / raw)
  To: Lakshmi Ramasubramanian, Mimi Zohar; +Cc: linux-integrity

On Sun, 2020-01-05 at 19:58 -0800, Lakshmi Ramasubramanian wrote:
> On 1/5/20 11:16 AM, James Bottomley wrote:
> 
> > Well, yes, you just need to condition the build of
> > ima_asymmetric_keys
> > on a boolean instead of a tristate, so you introduce an
> > intermediate
> > one:
> > 
> > config IMA_ASYMMETRIC_KEYS
> > 	bool
> > 	default y
> > 	depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
> > 
> > James
> 
> Thanks for your help James.
> 
> Hi Mimi,
> 
> I have defined a new config as James has suggested above and
> verified the kernel builds fine with the ".config" files given by
> "kbuild test robot <lkp@intel.com>".
> 
> Would it be possible to share all the ".config" files that
> "kbuild test robot" would build with? I'll make sure my changes
> build fine with all those.

I'm afraid it's not possible: the kbuild robot is doing make
randconfig, which generates a random configuration for the kernel.  The
randconfig testing is the easiest way to detect Kconfig problems like
this one.  You can, of course, do make randconfig yourself, but you
have to run through it a lot of times to get the coverage the robot
gets.

James


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-01-06 14:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-05  9:00 [integrity:next-integrity-testing 5/5] security/integrity/ima/ima_asymmetric_keys.c:53:6: error: redefinition of 'ima_init_key_queue' kbuild test robot
2020-01-05  9:00 ` kbuild test robot
2020-01-05 17:57 ` Lakshmi Ramasubramanian
2020-01-05 18:15   ` James Bottomley
2020-01-05 18:56     ` Lakshmi Ramasubramanian
2020-01-05 19:16       ` James Bottomley
2020-01-06  3:58         ` Lakshmi Ramasubramanian
2020-01-06 13:23           ` Mimi Zohar
2020-01-06 14:58           ` James Bottomley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.