mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Snowberg <eric.snowberg@oracle.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: dhowells@redhat.com, dwmw2@infradead.org,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	jmorris@namei.org, serge@hallyn.com, nayna@linux.ibm.com,
	Mimi Zohar <zohar@linux.ibm.com>,
	erichte@linux.ibm.com, mpe@ellerman.id.au,
	keyrings@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-crypto@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2] certs: Add EFI_CERT_X509_GUID support for dbx entries
Date: Wed, 9 Sep 2020 16:44:37 -0600	[thread overview]
Message-ID: <0D3BE738-67D5-41DB-B58E-FCD2ECD9A4F0@oracle.com> (raw)
In-Reply-To: <5074bc5c-8dd4-16d7-2760-3e657b90bfa2@infradead.org>


> On Sep 9, 2020, at 11:40 AM, Randy Dunlap <rdunlap@infradead.org> wrote:
> 
> On 9/9/20 10:27 AM, Eric Snowberg wrote:
>> diff --git a/include/crypto/pkcs7.h b/include/crypto/pkcs7.h
>> index 38ec7f5f9041..d8f2e0fdfbf4 100644
>> --- a/include/crypto/pkcs7.h
>> +++ b/include/crypto/pkcs7.h
>> @@ -26,11 +26,19 @@ extern int pkcs7_get_content_data(const struct pkcs7_message *pkcs7,
>> 				  const void **_data, size_t *_datalen,
>> 				  size_t *_headerlen);
>> 
>> +#ifdef CONFIG_PKCS7_MESSAGE_PARSER
>> /*
>>  * pkcs7_trust.c
>>  */
>> extern int pkcs7_validate_trust(struct pkcs7_message *pkcs7,
>> 				struct key *trust_keyring);
>> +#else
>> +static inline int pkcs7_validate_trust(struct pkcs7_message *pkcs7,
>> +				       struct key *trust_keyring)
>> +{
>> +	return -ENOKEY;
>> +}
>> +#endif
> 
> Just to be clear, you want to do the #else block when
> CONFIG_PKCS7_MESSAGE_PARSER=m.  Is that correct?
> 
> If so, it might be clearer to use
> 
> #if IS_BUILTIN(CONFIG_PKCS7_MESSAGE_PARSER)
> 

I just added this part to fix a build error when none of the
asymmetrical keys are defined within a config.  I failed to notice
CONFIG_PKCS7_MESSAGE_PARSER could be configured to build as a module
too.  The code I added that uses pkcs7_validate_trust is always 
builtin. Taking this into account, please disregard this patch.  
I will need to solve this a different way.  Thanks for pointing this 
out.


  reply	other threads:[~2020-09-10  4:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 17:27 Eric Snowberg
2020-09-09 17:40 ` Randy Dunlap
2020-09-09 22:44   ` Eric Snowberg [this message]
     [not found] ` <20200914180127.GA9369@linux.intel.com>
2020-09-14 18:02   ` Jarkko Sakkinen

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=0D3BE738-67D5-41DB-B58E-FCD2ECD9A4F0@oracle.com \
    --to=eric.snowberg@oracle.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=erichte@linux.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=nayna@linux.ibm.com \
    --cc=rdunlap@infradead.org \
    --cc=serge@hallyn.com \
    --cc=zohar@linux.ibm.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®