History

Merge tag 'v6.11-rc6' into docs-mw

This is done primarily to get a docs build fix merged via another tree so that "make htmldocs" stops failing.

Jonathan Corbet committed 2 years ago

Commit d2243382 parents eb5ed2f 431c1641361 files · +16839 −8618Browse files

Showing the changes to scripts (13 of 1361 files). Show all

Unified · Split

13 files
  1. scripts/Makefile.build +1 −1
  2. scripts/Makefile.lib +10 −18
  3. scripts/Makefile.modfinal +1 −1
  4. scripts/Makefile.vmlinux +1 −1
  5. scripts/Makefile.vmlinux_o +1 −1
  6. scripts/checkpatch.pl +0 −10
  7. scripts/gcc-plugins/randomize_layout_plugin.c +0 −4
  8. scripts/generate_rust_analyzer.py +5 −1
  9. scripts/generate_rust_target.rs +2 −2
  10. scripts/kallsyms.c +2 −29
  11. scripts/kconfig/merge_config.sh +2 −0
  12. scripts/link-vmlinux.sh +2 −5
  13. scripts/syscall.tbl +3 −3
scripts/Makefile.build+1−1
@@ -487,7 +487,7 @@ $(subdir-ym): · 486 unmodified lines
487 need-modorder=$(if $(filter $@/modules.order, $(subdir-modorder)),1) \487 need-modorder=$(if $(filter $@/modules.order, $(subdir-modorder)),1) \
488 $(filter $@/%, $(single-subdir-goals))488 $(filter $@/%, $(single-subdir-goals))
489 489
490# Add FORCE to the prequisites of a target to force it to be always rebuilt.490# Add FORCE to the prerequisites of a target to force it to be always rebuilt.
491# ---------------------------------------------------------------------------491# ---------------------------------------------------------------------------
492 492
493PHONY += FORCE493PHONY += FORCE
scripts/Makefile.lib+10−18
@@ -400,26 +400,23 @@ $(obj)/%.dtb.S: $(obj)/%.dtb FORCE · 399 unmodified lines
400$(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE400$(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE
401 $(call if_changed,wrap_S_dtb)401 $(call if_changed,wrap_S_dtb)
402 402
403quiet_cmd_dtc = DTC $@403quiet_dtb_check_tag = $(if $(dtb-check-enabled),[C], )
404cmd_dtb_check = $(if $(dtb-check-enabled),; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true)
405
406quiet_cmd_dtc = DTC $(quiet_dtb_check_tag) $@
404cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \407cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
405 $(DTC) -o $@ -b 0 \408 $(DTC) -o $@ -b 0 \
406 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \409 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
407 -d $(depfile).dtc.tmp $(dtc-tmp) ; \410 -d $(depfile).dtc.tmp $(dtc-tmp) ; \
408 cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)411 cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) \
409 412 $(cmd_dtb_check)
410DT_CHECK_CMD = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA)
411 413
412# NOTE:414# NOTE:
413# Do not replace $(filter %.dtb %.dtbo, $^) with $(real-prereqs). When a single415# Do not replace $(filter %.dtb %.dtbo, $^) with $(real-prereqs). When a single
414# DTB is turned into a multi-blob DTB, $^ will contain header file dependencies416# DTB is turned into a multi-blob DTB, $^ will contain header file dependencies
415# recorded in the .*.cmd file.417# recorded in the .*.cmd file.
416ifneq ($(CHECK_DTBS),)418quiet_cmd_fdtoverlay = OVL $(quiet_dtb_check_tag) $@
417quiet_cmd_fdtoverlay = DTOVLCH $@419 cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filter %.dtb %.dtbo, $^) $(cmd_dtb_check)
418 cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filter %.dtb %.dtbo, $^) ; $(DT_CHECK_CMD) $@ || true
419else
420quiet_cmd_fdtoverlay = DTOVL $@
421 cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filter %.dtb %.dtbo, $^)
422endif
423 420
424$(multi-dtb-y): FORCE421$(multi-dtb-y): FORCE
425 $(call if_changed,fdtoverlay)422 $(call if_changed,fdtoverlay)
@@ -430,16 +427,11 @@ DT_CHECKER ?= dt-validate · 4 unmodified lines
430DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m)427DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m)
431DT_BINDING_DIR := Documentation/devicetree/bindings428DT_BINDING_DIR := Documentation/devicetree/bindings
432DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json429DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json
433 430dtb-check-enabled = $(if $(filter %.dtb, $@),y)
434quiet_cmd_dtb = DTC_CHK $@
435 cmd_dtb = $(cmd_dtc) ; $(DT_CHECK_CMD) $@ || true
436else
437quiet_cmd_dtb = $(quiet_cmd_dtc)
438 cmd_dtb = $(cmd_dtc)
439endif431endif
440 432
441$(obj)/%.dtb: $(obj)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE433$(obj)/%.dtb: $(obj)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
442 $(call if_changed_dep,dtb)434 $(call if_changed_dep,dtc)
443 435
444$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE436$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
445 $(call if_changed_dep,dtc)437 $(call if_changed_dep,dtc)
scripts/Makefile.modfinal+1−1
@@ -62,7 +62,7 @@ endif · 61 unmodified lines
62 62
63targets += $(modules:%.o=%.ko) $(modules:%.o=%.mod.o)63targets += $(modules:%.o=%.ko) $(modules:%.o=%.mod.o)
64 64
65# Add FORCE to the prequisites of a target to force it to be always rebuilt.65# Add FORCE to the prerequisites of a target to force it to be always rebuilt.
66# ---------------------------------------------------------------------------66# ---------------------------------------------------------------------------
67 67
68PHONY += FORCE68PHONY += FORCE
scripts/Makefile.vmlinux+1−1
@@ -33,7 +33,7 @@ targets += vmlinux · 32 unmodified lines
33vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE33vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE
34 +$(call if_changed_dep,link_vmlinux)34 +$(call if_changed_dep,link_vmlinux)
35 35
36# Add FORCE to the prequisites of a target to force it to be always rebuilt.36# Add FORCE to the prerequisites of a target to force it to be always rebuilt.
37# ---------------------------------------------------------------------------37# ---------------------------------------------------------------------------
38 38
39PHONY += FORCE39PHONY += FORCE
scripts/Makefile.vmlinux_o+1−1
@@ -87,7 +87,7 @@ targets += modules.builtin · 86 unmodified lines
87modules.builtin: modules.builtin.modinfo FORCE87modules.builtin: modules.builtin.modinfo FORCE
88 $(call if_changed,modules_builtin)88 $(call if_changed,modules_builtin)
89 89
90# Add FORCE to the prequisites of a target to force it to be always rebuilt.90# Add FORCE to the prerequisites of a target to force it to be always rebuilt.
91# ---------------------------------------------------------------------------91# ---------------------------------------------------------------------------
92 92
93PHONY += FORCE93PHONY += FORCE
scripts/checkpatch.pl+0−10
@@ -4015,16 +4015,6 @@ sub process { · 4014 unmodified lines
4015 }4015 }
4016 }4016 }
4017 4017
4018# Block comment styles
4019# Networking with an initial /*
4020 if ($realfile =~ m@^(drivers/net/|net/)@ &&
4021 $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
4022 $rawline =~ /^\+[ \t]*\*/ &&
4023 $realline > 3) { # Do not warn about the initial copyright comment block after SPDX-License-Identifier
4024 WARN("NETWORKING_BLOCK_COMMENT_STYLE",
4025 "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
4026 }
4027
4028# Block comments use * on subsequent lines4018# Block comments use * on subsequent lines
4029 if ($prevline =~ /$;[ \t]*$/ && #ends in comment4019 if ($prevline =~ /$;[ \t]*$/ && #ends in comment
4030 $prevrawline =~ /^\+.*?\/\*/ && #starting /*4020 $prevrawline =~ /^\+.*?\/\*/ && #starting /*
scripts/gcc-plugins/randomize_layout_plugin.c+0−4
@@ -19,10 +19,6 @@ · 18 unmodified lines
19#include "gcc-common.h"19#include "gcc-common.h"
20#include "randomize_layout_seed.h"20#include "randomize_layout_seed.h"
21 21
22#if BUILDING_GCC_MAJOR < 4 || (BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR < 7)
23#error "The RANDSTRUCT plugin requires GCC 4.7 or newer."
24#endif
25
26#define ORIG_TYPE_NAME(node) \22#define ORIG_TYPE_NAME(node) \
27 (TYPE_NAME(TYPE_MAIN_VARIANT(node)) != NULL_TREE ? ((const unsigned char *)IDENTIFIER_POINTER(TYPE_NAME(TYPE_MAIN_VARIANT(node)))) : (const unsigned char *)"anonymous")23 (TYPE_NAME(TYPE_MAIN_VARIANT(node)) != NULL_TREE ? ((const unsigned char *)IDENTIFIER_POINTER(TYPE_NAME(TYPE_MAIN_VARIANT(node)))) : (const unsigned char *)"anonymous")
28 24
scripts/generate_rust_analyzer.py+5−1
@@ -145,6 +145,7 @@ def main(): · 144 unmodified lines
145 parser.add_argument('--cfgs', action='append', default=[])145 parser.add_argument('--cfgs', action='append', default=[])
146 parser.add_argument("srctree", type=pathlib.Path)146 parser.add_argument("srctree", type=pathlib.Path)
147 parser.add_argument("objtree", type=pathlib.Path)147 parser.add_argument("objtree", type=pathlib.Path)
148 parser.add_argument("sysroot", type=pathlib.Path)
148 parser.add_argument("sysroot_src", type=pathlib.Path)149 parser.add_argument("sysroot_src", type=pathlib.Path)
149 parser.add_argument("exttree", type=pathlib.Path, nargs="?")150 parser.add_argument("exttree", type=pathlib.Path, nargs="?")
150 args = parser.parse_args()151 args = parser.parse_args()
@@ -154,9 +155,12 @@ def main(): · 3 unmodified lines
154 level=logging.INFO if args.verbose else logging.WARNING155 level=logging.INFO if args.verbose else logging.WARNING
155 )156 )
156 157
158 # Making sure that the `sysroot` and `sysroot_src` belong to the same toolchain.
159 assert args.sysroot in args.sysroot_src.parents
160
157 rust_project = {161 rust_project = {
158 "crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs),162 "crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs),
159 "sysroot_src": str(args.sysroot_src),163 "sysroot": str(args.sysroot),
160 }164 }
161 165
162 json.dump(rust_project, sys.stdout, sort_keys=True, indent=4)166 json.dump(rust_project, sys.stdout, sort_keys=True, indent=4)
scripts/generate_rust_target.rs+2−2
@@ -162,7 +162,7 @@ fn main() { · 161 unmodified lines
162 "data-layout",162 "data-layout",
163 "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",163 "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
164 );164 );
165 let mut features = "-3dnow,-3dnowa,-mmx,+soft-float".to_string();165 let mut features = "-mmx,+soft-float".to_string();
166 if cfg.has("MITIGATION_RETPOLINE") {166 if cfg.has("MITIGATION_RETPOLINE") {
167 features += ",+retpoline-external-thunk";167 features += ",+retpoline-external-thunk";
168 }168 }
@@ -179,7 +179,7 @@ fn main() { · 10 unmodified lines
179 "data-layout",179 "data-layout",
180 "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",180 "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
181 );181 );
182 let mut features = "-3dnow,-3dnowa,-mmx,+soft-float".to_string();182 let mut features = "-mmx,+soft-float".to_string();
183 if cfg.has("MITIGATION_RETPOLINE") {183 if cfg.has("MITIGATION_RETPOLINE") {
184 features += ",+retpoline-external-thunk";184 features += ",+retpoline-external-thunk";
185 }185 }
scripts/kallsyms.c+2−29
@@ -5,8 +5,7 @@ · 4 unmodified lines
5 * This software may be used and distributed according to the terms5 * This software may be used and distributed according to the terms
6 * of the GNU General Public License, incorporated herein by reference.6 * of the GNU General Public License, incorporated herein by reference.
7 *7 *
8 * Usage: kallsyms [--all-symbols] [--absolute-percpu]8 * Usage: kallsyms [--all-symbols] [--absolute-percpu] in.map > out.S
9 * [--lto-clang] in.map > out.S
10 *9 *
11 * Table compression uses all the unused char codes on the symbols and10 * Table compression uses all the unused char codes on the symbols and
12 * maps these to the most used substrings (tokens). For instance, it might11 * maps these to the most used substrings (tokens). For instance, it might
@@ -62,7 +61,6 @@ static struct sym_entry **table; · 49 unmodified lines
62static unsigned int table_size, table_cnt;61static unsigned int table_size, table_cnt;
63static int all_symbols;62static int all_symbols;
64static int absolute_percpu;63static int absolute_percpu;
65static int lto_clang;
66 64
67static int token_profit[0x10000];65static int token_profit[0x10000];
68 66
@@ -73,8 +71,7 @@ static unsigned char best_table_len[256]; · 4 unmodified lines
73 71
74static void usage(void)72static void usage(void)
75{73{
76 fprintf(stderr, "Usage: kallsyms [--all-symbols] [--absolute-percpu] "74 fprintf(stderr, "Usage: kallsyms [--all-symbols] [--absolute-percpu] in.map > out.S\n");
77 "[--lto-clang] in.map > out.S\n");
78 exit(1);75 exit(1);
79}76}
80 77
@@ -344,25 +341,6 @@ static bool symbol_absolute(const struct sym_entry *s) · 263 unmodified lines
344 return s->percpu_absolute;341 return s->percpu_absolute;
345}342}
346 343
347static void cleanup_symbol_name(char *s)
348{
349 char *p;
350
351 /*
352 * ASCII[.] = 2e
353 * ASCII[0-9] = 30,39
354 * ASCII[A-Z] = 41,5a
355 * ASCII[_] = 5f
356 * ASCII[a-z] = 61,7a
357 *
358 * As above, replacing the first '.' in ".llvm." with '\0' does not
359 * affect the main sorting, but it helps us with subsorting.
360 */
361 p = strstr(s, ".llvm.");
362 if (p)
363 *p = '\0';
364}
365
366static int compare_names(const void *a, const void *b)344static int compare_names(const void *a, const void *b)
367{345{
368 int ret;346 int ret;
@@ -526,10 +504,6 @@ static void write_src(void) · 157 unmodified lines
526 output_address(relative_base);504 output_address(relative_base);
527 printf("\n");505 printf("\n");
528 506
529 if (lto_clang)
530 for (i = 0; i < table_cnt; i++)
531 cleanup_symbol_name((char *)table[i]->sym);
532
533 sort_symbols_by_name();507 sort_symbols_by_name();
534 output_label("kallsyms_seqs_of_names");508 output_label("kallsyms_seqs_of_names");
535 for (i = 0; i < table_cnt; i++)509 for (i = 0; i < table_cnt; i++)
@@ -807,7 +781,6 @@ int main(int argc, char **argv) · 271 unmodified lines
807 static const struct option long_options[] = {781 static const struct option long_options[] = {
808 {"all-symbols", no_argument, &all_symbols, 1},782 {"all-symbols", no_argument, &all_symbols, 1},
809 {"absolute-percpu", no_argument, &absolute_percpu, 1},783 {"absolute-percpu", no_argument, &absolute_percpu, 1},
810 {"lto-clang", no_argument, &lto_clang, 1},
811 {},784 {},
812 };785 };
813 786
scripts/kconfig/merge_config.sh+2−0
@@ -167,6 +167,8 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do · 166 unmodified lines
167 sed -i "/$CFG[ =]/d" $MERGE_FILE167 sed -i "/$CFG[ =]/d" $MERGE_FILE
168 fi168 fi
169 done169 done
170 # In case the previous file lacks a new line at the end
171 echo >> $TMP_FILE
170 cat $MERGE_FILE >> $TMP_FILE172 cat $MERGE_FILE >> $TMP_FILE
171done173done
172 174
scripts/link-vmlinux.sh+2−5
@@ -156,10 +156,6 @@ kallsyms() · 155 unmodified lines
156 kallsymopt="${kallsymopt} --absolute-percpu"156 kallsymopt="${kallsymopt} --absolute-percpu"
157 fi157 fi
158 158
159 if is_enabled CONFIG_LTO_CLANG; then
160 kallsymopt="${kallsymopt} --lto-clang"
161 fi
162
163 info KSYMS "${2}.S"159 info KSYMS "${2}.S"
164 scripts/kallsyms ${kallsymopt} "${1}" > "${2}.S"160 scripts/kallsyms ${kallsymopt} "${1}" > "${2}.S"
165 161
@@ -219,7 +215,8 @@ kallsymso= · 53 unmodified lines
219strip_debug=215strip_debug=
220 216
221if is_enabled CONFIG_KALLSYMS; then217if is_enabled CONFIG_KALLSYMS; then
222 kallsyms /dev/null .tmp_vmlinux0.kallsyms218 truncate -s0 .tmp_vmlinux.kallsyms0.syms
219 kallsyms .tmp_vmlinux.kallsyms0.syms .tmp_vmlinux0.kallsyms
223fi220fi
224 221
225if is_enabled CONFIG_KALLSYMS || is_enabled CONFIG_DEBUG_INFO_BTF; then222if is_enabled CONFIG_KALLSYMS || is_enabled CONFIG_DEBUG_INFO_BTF; then
scripts/syscall.tbl+3−3
@@ -53,6 +53,7 @@ · 52 unmodified lines
5339 common umount2 sys_umount5339 common umount2 sys_umount
5440 common mount sys_mount5440 common mount sys_mount
5541 common pivot_root sys_pivot_root5541 common pivot_root sys_pivot_root
5642 common nfsservctl sys_ni_syscall
5643 32 statfs64 sys_statfs64 compat_sys_statfs645743 32 statfs64 sys_statfs64 compat_sys_statfs64
5743 64 statfs sys_statfs5843 64 statfs sys_statfs
5844 32 fstatfs64 sys_fstatfs64 compat_sys_fstatfs645944 32 fstatfs64 sys_fstatfs64 compat_sys_fstatfs64
@@ -98,9 +99,9 @@ · 39 unmodified lines
9877 common tee sys_tee9977 common tee sys_tee
9978 common readlinkat sys_readlinkat10078 common readlinkat sys_readlinkat
10079 stat64 fstatat64 sys_fstatat6410179 stat64 fstatat64 sys_fstatat64
10179 newstat fstatat sys_newfstatat10279 64 newfstatat sys_newfstatat
10280 stat64 fstat64 sys_fstat6410380 stat64 fstat64 sys_fstat64
10380 newstat fstat sys_newfstat10480 64 fstat sys_newfstat
10481 common sync sys_sync10581 common sync sys_sync
10582 common fsync sys_fsync10682 common fsync sys_fsync
10683 common fdatasync sys_fdatasync10783 common fdatasync sys_fdatasync
@@ -402,4 +403,3 @@ · 295 unmodified lines
402460 common lsm_set_self_attr sys_lsm_set_self_attr403460 common lsm_set_self_attr sys_lsm_set_self_attr
403461 common lsm_list_modules sys_lsm_list_modules404461 common lsm_list_modules sys_lsm_list_modules
404462 common mseal sys_mseal405462 common mseal sys_mseal
405467 common uretprobe sys_uretprobe