mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
Merge tag 'kbuild-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada: - Remove the support for -O3 (CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3) - Fix error of rpm-pkg cross-builds - Support riscv for checkstack tool - Re-enable -Wformwat warnings for Clang - Clean up modpost, Makefiles, and misc scripts * tag 'kbuild-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits) modpost: remove .symbol_white_list field entirely modpost: remove unneeded .symbol_white_list initializers modpost: add PATTERNS() helper macro modpost: shorten warning messages in report_sec_mismatch() Revert "Kbuild, lto, workaround: Don't warn for initcall_reference in modpost" modpost: use more reliable way to get fromsec in section_rel(a)() modpost: add array range check to sec_name() modpost: refactor get_secindex() kbuild: set EXIT trap before creating temporary directory modpost: remove unused Elf_Sword macro Makefile.extrawarn: re-enable -Wformat for clang kbuild: add dtbs_prepare target kconfig: Qt5: tell the user which packages are required modpost: use sym_get_data() to get module device_table data modpost: drop executable ELF support checkstack: add riscv support for scripts/checkstack.pl kconfig: shorten the temporary directory name for cc-option scripts: headers_install.sh: Update config leak ignore entries kbuild: error out if $(INSTALL_MOD_PATH) contains % or : kbuild: error out if $(KBUILD_EXTMOD) contains % or : ...
This commit is contained in:
@@ -4,24 +4,22 @@
|
||||
#
|
||||
|
||||
obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o
|
||||
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o
|
||||
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.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 = \
|
||||
$(AWK) -f $(srctree)/scripts/check-blacklist-hashes.awk $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) >&2; \
|
||||
cat $(CONFIG_SYSTEM_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); 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 $@
|
||||
|
@@ -3,5 +3,4 @@
|
||||
|
||||
const char __initconst *const blacklist_hashes[] = {
|
||||
#include "blacklist_hash_list"
|
||||
, NULL
|
||||
};
|
||||
|
@@ -1,6 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "blacklist.h"
|
||||
|
||||
const char __initconst *const blacklist_hashes[] = {
|
||||
NULL
|
||||
};
|
37
certs/check-blacklist-hashes.awk
Executable file
37
certs/check-blacklist-hashes.awk
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/awk -f
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Copyright © 2020, Microsoft Corporation. All rights reserved.
|
||||
#
|
||||
# Author: Mickaël Salaün <mic@linux.microsoft.com>
|
||||
#
|
||||
# Check that a CONFIG_SYSTEM_BLACKLIST_HASH_LIST file contains a valid array of
|
||||
# hash strings. Such string must start with a prefix ("tbs" or "bin"), then a
|
||||
# colon (":"), and finally an even number of hexadecimal lowercase characters
|
||||
# (up to 128).
|
||||
|
||||
BEGIN {
|
||||
RS = ","
|
||||
}
|
||||
{
|
||||
if (!match($0, "^[ \t\n\r]*\"([^\"]*)\"[ \t\n\r]*$", part1)) {
|
||||
print "Not a string (item " NR "):", $0;
|
||||
exit 1;
|
||||
}
|
||||
if (!match(part1[1], "^(tbs|bin):(.*)$", part2)) {
|
||||
print "Unknown prefix (item " NR "):", part1[1];
|
||||
exit 1;
|
||||
}
|
||||
if (!match(part2[2], "^([0-9a-f]+)$", part3)) {
|
||||
print "Not a lowercase hexadecimal string (item " NR "):", part2[2];
|
||||
exit 1;
|
||||
}
|
||||
if (length(part3[1]) > 128) {
|
||||
print "Hash string too long (item " NR "):", part3[1];
|
||||
exit 1;
|
||||
}
|
||||
if (length(part3[1]) % 2 == 1) {
|
||||
print "Not an even number of hexadecimal characters (item " NR "):", part3[1];
|
||||
exit 1;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user