LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: [PATCH 0/1] Add explicit error for missing CONFIG_ASN1
Date: Tue, 22 Sep 2020 12:44:35 -0700 [thread overview]
Message-ID: <15cc1edce12357799ae3caea3b89a3aad3a3bd07.camel@HansenPartnership.com> (raw)
In-Reply-To: <36232f66-58b1-77a8-91a3-f9d3428fffb5@infradead.org>
On Tue, 2020-09-22 at 12:38 -0700, Randy Dunlap wrote:
> On 9/22/20 12:19 PM, James Bottomley wrote:
> > On Tue, 2020-09-22 at 11:54 -0700, Randy Dunlap wrote:
> > > On 9/22/20 8:53 AM, James Bottomley wrote:
> > > > I recently ran into this as an error from 0day. On x86 it's
> > > > pretty
> > > > much impossible to build a configuration where CONFIG_ASN1
> > > > isn't
> > > > set, so you rarely notice a problem using the ASN.1 compiler
> > > > because something else has selected it. However, this compiler
> > > > is
> > > > never built if CONFIG_ASN1 isn't set and the error you get from
> > > > kbuild is particularly unhelpful:
> > > >
> > > > make[4]: *** No rule to make target 'security/keys/trusted-
> > > > keys/tpm2key.asn1.o', needed by 'security/keys/trusted-
> > > > keys/built-
> > > > in.a'.
> > > > make[4]: *** [scripts/Makefile.build:283:
> > > > security/keys/trusted-
> > > > keys/trusted_tpm2.o] Error 1
> > > > make[4]: Target '__build' not remade because of errors.
> > > >
> > > > This patch changes the above error to the much easier to
> > > > diagnose:
> > > >
> > > > scripts/Makefile.build:387: *** CONFIG_ASN1 must be defined
> > > > for
> > > > the asn1_compiler. Stop.
> > > > make[3]: *** [scripts/Makefile.build:505:
> > > > security/keys/trusted-
> > > > keys] Error 2
> > > >
> > > > James
> > > >
> > > > ---
> > > >
> > > > James Bottomley (1):
> > > > Makefile.build: Add an explicit error for missing ASN.1
> > > > compiler
> > > >
> > > > scripts/Makefile.build | 5 +++++
> > > > 1 file changed, 5 insertions(+)
> > >
> > > Is there a missing
> > > select ASN1
> > > somewhere?
> >
> > You mean in the build used to produce the errors above? Yes, so
> > the
> > patch is to make the problem more explicit.
>
> I appreciate that the message can be improved, but it seems possible
> that some Kconfig could also be improved.
I don't really see how. To find the problem you have to identify a
conditional build in the Makefile that requires the asn1 compiler but
for which the config option doesn't have a select ASN1. We don't
currently preserve the "what selected this symbol" information in
kconfig, which is what we'd need.
James
next prev parent reply other threads:[~2020-09-22 19:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 15:53 James Bottomley
2020-09-22 15:53 ` [PATCH 1/1] Makefile.build: Add an explicit error for missing ASN.1 compiler James Bottomley
2020-09-24 17:18 ` Masahiro Yamada
2020-09-22 18:54 ` [PATCH 0/1] Add explicit error for missing CONFIG_ASN1 Randy Dunlap
2020-09-22 19:19 ` James Bottomley
2020-09-22 19:38 ` Randy Dunlap
2020-09-22 19:44 ` James Bottomley [this message]
2020-09-22 19:46 ` Randy Dunlap
2020-09-22 19:48 ` James Bottomley
2020-09-22 19:52 ` Randy Dunlap
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=15cc1edce12357799ae3caea3b89a3aad3a3bd07.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=rdunlap@infradead.org \
--subject='Re: [PATCH 0/1] Add explicit error for missing CONFIG_ASN1' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).