mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Snowberg <eric.snowberg@oracle.com>
To: David Howells <dhowells@redhat.com>
Cc: "Jarkko Sakkinen" <jarkko@kernel.org>,
	"Mickaël Salaün" <mic@linux.microsoft.com>,
	"David Woodhouse" <dwmw2@infradead.org>,
	keyrings@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cert: Add kconfig dependency for validate_trust
Date: Tue, 23 Feb 2021 18:26:43 -0700	[thread overview]
Message-ID: <F6980CA4-737D-416A-BBE3-390CEBA8B192@oracle.com> (raw)
In-Reply-To: <3524595.1614124044@warthog.procyon.org.uk>


> On Feb 23, 2021, at 4:47 PM, David Howells <dhowells@redhat.com> wrote:
> 
> Eric Snowberg <eric.snowberg@oracle.com> wrote:
> 
>> The kernel test robot reports when building with Kconfig
>> CONFIG_INTEGRITY_PLATFORM_KEYRING defined and 
>> CONFIG_SYSTEM_DATA_VERIFICATION undefined:
>> 
>> ld.lld: error: undefined symbol: pkcs7_validate_trust
>> referenced by blacklist.c:128 (certs/blacklist.c:128)
>>             blacklist.o:(is_key_on_revocation_list) in archive certs/built-in.a
>> 
>> Make CONFIG_SYSTEM_DATA_VERIFICATION a dependency for validate_trust.
>> 
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
> 
> I wonder if it's better to provide a separate config option for the revocation
> list, say:
> 
> 	config SYSTEM_REVOCATION_LIST
> 		bool "Add revocation certs to the blacklist keyring"
> 		depends on SYSTEM_BLACKLIST_KEYRING
> 		depends on PKCS7_MESSAGE_PARSER
> 		help
> 		  ...
> 
> and use that in blacklist.c.
> 
> In keys/system_keyring.h, is_key_on_revocation_list() can then be defaulted to
> return 0 if that is disabled.

I tried something like that in the past.  The problem I ran into is someone 
could create a config with PKCS7_MESSAGE_PARSER=m.  Then pkcs7_validate_trust 
would give an undefined reference error. 

SYSTEM_DATA_VERIFICATION was the only thing I could find that guaranteed 
everything was available.  I supposed I could do:

	config SYSTEM_REVOCATION_LIST
		bool "Add revocation certs to the blacklist keyring"
		depends on SYSTEM_BLACKLIST_KEYRING
		depends on SYSTEM_DATA_VERIFICATION
		help
		  …

Would you rather I do that instead?

> Btw, I've just noticed that add_key_to_revocation_list() and
> is_key_on_revocation_list() lack kernel doc comments.

I’ll prepare a patch to add the kernel-doc comments.


  reply	other threads:[~2021-02-24  1:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 16:50 Eric Snowberg
2021-02-23 23:47 ` David Howells
2021-02-24  1:26   ` Eric Snowberg [this message]
2021-02-24 10:51   ` David Howells
2021-02-24 11:56     ` Mickaël Salaün
2021-02-24 12:40     ` David Howells
2021-02-25  4:03     ` Eric Snowberg
2021-02-25 14:43     ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F6980CA4-737D-416A-BBE3-390CEBA8B192@oracle.com \
    --to=eric.snowberg@oracle.com \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=jarkko@kernel.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mic@linux.microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®