From: Brian Norris <briannorris@chromium.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linux-kernel@vger.kernel.org>,
linux-wireless@vger.kernel.org,
Paul Menzel <pmenzel+linux-wireless@molgen.mpg.de>,
Damian Tometzki <damian.tometzki@icloud.com>,
Brian Norris <briannorris@chromium.org>
Subject: [PATCH for-4.15] wireless: create, don't append, to shipped-certs.c
Date: Tue, 19 Dec 2017 11:23:03 -0800 [thread overview]
Message-ID: <20171219192303.31395-1-briannorris@chromium.org> (raw)
The current rule for generating the {shipped,extra}-certs.c source files
might create an invalid C source file, containing redefinitions of the
same variables:
CC [M] net/wireless/shipped-certs.o
net/wireless/shipped-certs.c:686:10: error: redefinition of 'shipped_regdb_certs'
const u8 shipped_regdb_certs[] = {
^
net/wireless/shipped-certs.c:2:10: note: previous definition of 'shipped_regdb_certs' was here
const u8 shipped_regdb_certs[] = {
^
net/wireless/shipped-certs.c:1368:14: error: redefinition of 'shipped_regdb_certs_len'
unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);
^
net/wireless/shipped-certs.c:684:14: note: previous definition of 'shipped_regdb_certs_len' was here
unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);
^
This can be easily triggered by forcing a rebuild of these files:
$ touch net/wireless/certs/sforshee.x509
$ make
In practice, this is seen often by having a separate source and build
directory, where the build artifacts remain but the source tree changes
(even if Seth's cert doesn't change, it might get created/removed when
checking out different source revisions).
I don't see why this rule should be an append; we're writing the file
all in one go.
Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking")
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
This is an error introduced in 4.15-rc1.
I've seen other errors reported by Paul and Damian (CC'd); I think Paul's
failure was fixed already, but Damian might have still been having problems
with not having a "clean" environment. Perhaps he was hitting this bug?
net/wireless/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/wireless/Makefile b/net/wireless/Makefile
index d7d6cb00c47b..b662be3422e1 100644
--- a/net/wireless/Makefile
+++ b/net/wireless/Makefile
@@ -43,7 +43,7 @@ $(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.x509)
echo "$$allf"; \
echo '};'; \
echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \
- ) >> $@)
+ ) > $@)
$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \
$(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509)
@@ -66,4 +66,4 @@ $(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \
echo "$$allf"; \
echo '};'; \
echo 'unsigned int extra_regdb_certs_len = sizeof(extra_regdb_certs);'; \
- ) >> $@)
+ ) > $@)
--
2.15.1.504.g5279b80103-goog
next reply other threads:[~2017-12-19 19:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 19:23 Brian Norris [this message]
2017-12-19 20:11 ` Johannes Berg
2017-12-19 20:38 ` Brian Norris
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=20171219192303.31395-1-briannorris@chromium.org \
--to=briannorris@chromium.org \
--cc=damian.tometzki@icloud.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pmenzel+linux-wireless@molgen.mpg.de \
/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®