From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: "David Howells" <dhowells@redhat.com>,
"Jarkko Sakkinen" <jarkko@kernel.org>,
"Micka���l Sala���n" <mic@linux.microsoft.com>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"David Woodhouse" <dwmw2@infradead.org>,
keyrings@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] certs: unify blacklist_hashes.c and blacklist_nohashes.c
Date: Sun, 12 Jun 2022 02:22:33 +0900 [thread overview]
Message-ID: <20220611172233.1494073-4-masahiroy@kernel.org> (raw)
In-Reply-To: <20220611172233.1494073-1-masahiroy@kernel.org>
These two files are very similar. Unify them.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
certs/Makefile | 12 +++++-------
certs/blacklist_hashes.c | 1 -
certs/blacklist_nohashes.c | 6 ------
3 files changed, 5 insertions(+), 14 deletions(-)
delete mode 100644 certs/blacklist_nohashes.c
diff --git a/certs/Makefile b/certs/Makefile
index df7aaeafd19c..7068d45db807 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -4,24 +4,22 @@
#
obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o common.o
-obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o common.o
+obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o common.o blacklist_hashes.o
obj-$(CONFIG_SYSTEM_REVOCATION_LIST) += revocation_certificates.o
-ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),)
$(obj)/blacklist_hashes.o: $(obj)/blacklist_hash_list
CFLAGS_blacklist_hashes.o := -I $(obj)
quiet_cmd_check_and_copy_blacklist_hash_list = GEN $@
cmd_check_and_copy_blacklist_hash_list = \
+ $(if $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST), \
$(AWK) -f $(srctree)/$(src)/check-blacklist-hashes.awk $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) >&2; \
- cat $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) > $@
+ { cat $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST); echo $(comma) NULL; } > $@, \
+ echo NULL > $@)
$(obj)/blacklist_hash_list: $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) FORCE
$(call if_changed,check_and_copy_blacklist_hash_list)
-obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o
-else
-obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o
-endif
+
targets += blacklist_hash_list
quiet_cmd_extract_certs = CERT $@
diff --git a/certs/blacklist_hashes.c b/certs/blacklist_hashes.c
index 86d66fe11348..0c5476abebd9 100644
--- a/certs/blacklist_hashes.c
+++ b/certs/blacklist_hashes.c
@@ -3,5 +3,4 @@
const char __initconst *const blacklist_hashes[] = {
#include "blacklist_hash_list"
- , NULL
};
diff --git a/certs/blacklist_nohashes.c b/certs/blacklist_nohashes.c
deleted file mode 100644
index 753b703ef0ef..000000000000
--- a/certs/blacklist_nohashes.c
+++ /dev/null
@@ -1,6 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include "blacklist.h"
-
-const char __initconst *const blacklist_hashes[] = {
- NULL
-};
--
2.32.0
next prev parent reply other threads:[~2022-06-11 17:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-11 17:22 [PATCH 1/4] certs/blacklist_hashes.c: fix const confusion in certs blacklist Masahiro Yamada
2022-06-11 17:22 ` [PATCH 2/4] certs: fix and refactor CONFIG_SYSTEM_BLACKLIST_HASH_LIST build Masahiro Yamada
2022-06-13 12:34 ` Mickaël Salaün
2022-06-13 14:55 ` Masahiro Yamada
2022-06-13 18:06 ` Mickaël Salaün
2022-06-13 18:56 ` Masahiro Yamada
2022-06-13 19:14 ` Mickaël Salaün
2022-06-15 18:48 ` Jarkko Sakkinen
2022-06-18 22:12 ` Masahiro Yamada
2022-06-26 6:16 ` Jarkko Sakkinen
2022-06-27 1:26 ` Masahiro Yamada
2022-06-15 18:46 ` Jarkko Sakkinen
2022-06-11 17:22 ` [PATCH 3/4] certs: move scripts/check-blacklist-hashes.awk to certs/ Masahiro Yamada
2022-06-13 12:36 ` Mickaël Salaün
2022-06-13 15:28 ` Masahiro Yamada
2022-06-13 18:51 ` Mickaël Salaün
2022-06-15 18:46 ` Jarkko Sakkinen
2022-06-11 17:22 ` Masahiro Yamada [this message]
2022-06-13 12:37 ` [PATCH 4/4] certs: unify blacklist_hashes.c and blacklist_nohashes.c Mickaël Salaün
2022-06-15 18:47 ` Jarkko Sakkinen
2022-06-13 12:20 ` [PATCH 1/4] certs/blacklist_hashes.c: fix const confusion in certs blacklist Mickaël Salaün
2022-06-15 18:46 ` 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=20220611172233.1494073-4-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=dhowells@redhat.com \
--cc=dwmw2@infradead.org \
--cc=jarkko@kernel.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-kbuild@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