aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/basic/fixdep.c21
-rwxr-xr-xscripts/checkpatch.pl5
-rwxr-xr-xscripts/extract-ikconfig9
-rw-r--r--scripts/kconfig/streamline_config.pl2
-rw-r--r--scripts/mod/sumversion.c19
-rw-r--r--scripts/package/Makefile5
-rw-r--r--scripts/package/builddeb6
-rw-r--r--scripts/package/buildtar4
-rw-r--r--scripts/recordmcount.c3
-rwxr-xr-xscripts/recordmcount.pl1
-rw-r--r--scripts/rt-tester/rt-tester.py2
-rw-r--r--scripts/rt-tester/t2-l1-2rt-sameprio.tst5
-rw-r--r--scripts/rt-tester/t2-l1-pi.tst5
-rw-r--r--scripts/rt-tester/t2-l1-signal.tst5
-rw-r--r--scripts/rt-tester/t2-l2-2rt-deadlock.tst5
-rw-r--r--scripts/rt-tester/t3-l1-pi-1rt.tst5
-rw-r--r--scripts/rt-tester/t3-l1-pi-2rt.tst5
-rw-r--r--scripts/rt-tester/t3-l1-pi-3rt.tst5
-rw-r--r--scripts/rt-tester/t3-l1-pi-signal.tst5
-rw-r--r--scripts/rt-tester/t3-l1-pi-steal.tst5
-rw-r--r--scripts/rt-tester/t3-l2-pi.tst5
-rw-r--r--scripts/rt-tester/t4-l2-pi-deboost.tst5
-rw-r--r--scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst5
-rw-r--r--scripts/rt-tester/t5-l4-pi-boost-deboost.tst5
-rw-r--r--scripts/selinux/genheaders/genheaders.c20
-rwxr-xr-xscripts/setlocalversion14
-rwxr-xr-xscripts/tags.sh9
27 files changed, 94 insertions, 91 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index c9a16abacab4..291228e25984 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -309,12 +309,18 @@ static void do_config_file(const char *filename)
309 close(fd); 309 close(fd);
310} 310}
311 311
312/*
313 * Important: The below generated source_foo.o and deps_foo.o variable
314 * assignments are parsed not only by make, but also by the rather simple
315 * parser in scripts/mod/sumversion.c.
316 */
312static void parse_dep_file(void *map, size_t len) 317static void parse_dep_file(void *map, size_t len)
313{ 318{
314 char *m = map; 319 char *m = map;
315 char *end = m + len; 320 char *end = m + len;
316 char *p; 321 char *p;
317 char s[PATH_MAX]; 322 char s[PATH_MAX];
323 int first;
318 324
319 p = strchr(m, ':'); 325 p = strchr(m, ':');
320 if (!p) { 326 if (!p) {
@@ -322,11 +328,11 @@ static void parse_dep_file(void *map, size_t len)
322 exit(1); 328 exit(1);
323 } 329 }
324 memcpy(s, m, p-m); s[p-m] = 0; 330 memcpy(s, m, p-m); s[p-m] = 0;
325 printf("deps_%s := \\\n", target);
326 m = p+1; 331 m = p+1;
327 332
328 clear_config(); 333 clear_config();
329 334
335 first = 1;
330 while (m < end) { 336 while (m < end) {
331 while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) 337 while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
332 m++; 338 m++;
@@ -340,9 +346,20 @@ static void parse_dep_file(void *map, size_t len)
340 if (strrcmp(s, "include/generated/autoconf.h") && 346 if (strrcmp(s, "include/generated/autoconf.h") &&
341 strrcmp(s, "arch/um/include/uml-config.h") && 347 strrcmp(s, "arch/um/include/uml-config.h") &&
342 strrcmp(s, ".ver")) { 348 strrcmp(s, ".ver")) {
343 printf(" %s \\\n", s); 349 /*
350 * Do not list the source file as dependency, so that
351 * kbuild is not confused if a .c file is rewritten
352 * into .S or vice versa. Storing it in source_* is
353 * needed for modpost to compute srcversions.
354 */
355 if (first) {
356 printf("source_%s := %s\n\n", target, s);
357 printf("deps_%s := \\\n", target);
358 } else
359 printf(" %s \\\n", s);
344 do_config_file(s); 360 do_config_file(s);
345 } 361 }
362 first = 0;
346 m = p + 1; 363 m = p + 1;
347 } 364 }
348 printf("\n%s: $(deps_%s)\n\n", target, target); 365 printf("\n%s: $(deps_%s)\n\n", target, target);
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4c0383da1c9a..58848e3e392c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2654,11 +2654,6 @@ sub process {
2654 WARN("Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt\n" . $herecurr); 2654 WARN("Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt\n" . $herecurr);
2655 } 2655 }
2656 2656
2657# SPIN_LOCK_UNLOCKED & RW_LOCK_UNLOCKED are deprecated
2658 if ($line =~ /\b(SPIN_LOCK_UNLOCKED|RW_LOCK_UNLOCKED)/) {
2659 ERROR("Use of $1 is deprecated: see Documentation/spinlocks.txt\n" . $herecurr);
2660 }
2661
2662# warn about #if 0 2657# warn about #if 0
2663 if ($line =~ /^.\s*\#\s*if\s+0\b/) { 2658 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
2664 CHK("if this code is redundant consider removing it\n" . 2659 CHK("if this code is redundant consider removing it\n" .
diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig
index 1512c0a755ac..e1862429ccda 100755
--- a/scripts/extract-ikconfig
+++ b/scripts/extract-ikconfig
@@ -56,10 +56,11 @@ trap "rm -f $tmp1 $tmp2" 0
56dump_config "$img" 56dump_config "$img"
57 57
58# That didn't work, so retry after decompression. 58# That didn't work, so retry after decompression.
59try_decompress '\037\213\010' xy gunzip 59try_decompress '\037\213\010' xy gunzip
60try_decompress 'BZh' xy bunzip2 60try_decompress '\3757zXZ\000' abcde unxz
61try_decompress '\135\0\0\0' xxx unlzma 61try_decompress 'BZh' xy bunzip2
62try_decompress '\211\114\132' xy 'lzop -d' 62try_decompress '\135\0\0\0' xxx unlzma
63try_decompress '\211\114\132' xy 'lzop -d'
63 64
64# Bail out: 65# Bail out:
65echo "$me: Cannot find kernel config." >&2 66echo "$me: Cannot find kernel config." >&2
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index fd81fc33d633..a4fe923c0131 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -1,6 +1,6 @@
1#!/usr/bin/perl -w 1#!/usr/bin/perl -w
2# 2#
3# Copywrite 2005-2009 - Steven Rostedt 3# Copyright 2005-2009 - Steven Rostedt
4# Licensed under the terms of the GNU GPL License version 2 4# Licensed under the terms of the GNU GPL License version 2
5# 5#
6# It's simple enough to figure out how this works. 6# It's simple enough to figure out how this works.
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c
index ecf9c7dc1825..9dfcd6d988da 100644
--- a/scripts/mod/sumversion.c
+++ b/scripts/mod/sumversion.c
@@ -300,8 +300,8 @@ static int is_static_library(const char *objfile)
300 return 0; 300 return 0;
301} 301}
302 302
303/* We have dir/file.o. Open dir/.file.o.cmd, look for deps_ line to 303/* We have dir/file.o. Open dir/.file.o.cmd, look for source_ and deps_ line
304 * figure out source file. */ 304 * to figure out source files. */
305static int parse_source_files(const char *objfile, struct md4_ctx *md) 305static int parse_source_files(const char *objfile, struct md4_ctx *md)
306{ 306{
307 char *cmd, *file, *line, *dir; 307 char *cmd, *file, *line, *dir;
@@ -340,6 +340,21 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md)
340 */ 340 */
341 while ((line = get_next_line(&pos, file, flen)) != NULL) { 341 while ((line = get_next_line(&pos, file, flen)) != NULL) {
342 char* p = line; 342 char* p = line;
343
344 if (strncmp(line, "source_", sizeof("source_")-1) == 0) {
345 p = strrchr(line, ' ');
346 if (!p) {
347 warn("malformed line: %s\n", line);
348 goto out_file;
349 }
350 p++;
351 if (!parse_file(p, md)) {
352 warn("could not open %s: %s\n",
353 p, strerror(errno));
354 goto out_file;
355 }
356 continue;
357 }
343 if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) { 358 if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) {
344 check_files = 1; 359 check_files = 1;
345 continue; 360 continue;
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index d0b931b994fc..a834b935f536 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -127,7 +127,8 @@ rm -r $(perf-tar); \
127$(if $(findstring tar-src,$@),, \ 127$(if $(findstring tar-src,$@),, \
128$(if $(findstring bz2,$@),bzip2, \ 128$(if $(findstring bz2,$@),bzip2, \
129$(if $(findstring gz,$@),gzip, \ 129$(if $(findstring gz,$@),gzip, \
130$(error unknown target $@))) \ 130$(if $(findstring xz,$@),xz, \
131$(error unknown target $@)))) \
131 -f -9 $(perf-tar).tar) 132 -f -9 $(perf-tar).tar)
132 133
133perf-%pkg: FORCE 134perf-%pkg: FORCE
@@ -142,7 +143,9 @@ help: FORCE
142 @echo ' tar-pkg - Build the kernel as an uncompressed tarball' 143 @echo ' tar-pkg - Build the kernel as an uncompressed tarball'
143 @echo ' targz-pkg - Build the kernel as a gzip compressed tarball' 144 @echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
144 @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball' 145 @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
146 @echo ' tarxz-pkg - Build the kernel as a xz compressed tarball'
145 @echo ' perf-tar-src-pkg - Build $(perf-tar).tar source tarball' 147 @echo ' perf-tar-src-pkg - Build $(perf-tar).tar source tarball'
146 @echo ' perf-targz-src-pkg - Build $(perf-tar).tar.gz source tarball' 148 @echo ' perf-targz-src-pkg - Build $(perf-tar).tar.gz source tarball'
147 @echo ' perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball' 149 @echo ' perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball'
150 @echo ' perf-tarxz-src-pkg - Build $(perf-tar).tar.xz source tarball'
148 151
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index b0b2357aef42..f6cbc3ddb68b 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -238,12 +238,12 @@ EOF
238fi 238fi
239 239
240# Build header package 240# Build header package
241find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$ 241(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$)
242find arch/x86/include include scripts -type f >> /tmp/files$$ 242(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> /tmp/files$$)
243(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$) 243(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$)
244destdir=$kernel_headers_dir/usr/src/linux-headers-$version 244destdir=$kernel_headers_dir/usr/src/linux-headers-$version
245mkdir -p "$destdir" 245mkdir -p "$destdir"
246tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -) 246(cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -)
247(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -) 247(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
248rm -f /tmp/files$$ /tmp/objfiles$$ 248rm -f /tmp/files$$ /tmp/objfiles$$
249arch=$(dpkg --print-architecture) 249arch=$(dpkg --print-architecture)
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index 51b2aa0acb82..83c9c04102f2 100644
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -35,6 +35,10 @@ case "${1}" in
35 compress="bzip2 -c9" 35 compress="bzip2 -c9"
36 file_ext=".bz2" 36 file_ext=".bz2"
37 ;; 37 ;;
38 tarxz-pkg)
39 compress="xz -c9"
40 file_ext=".xz"
41 ;;
38 *) 42 *)
39 echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2 43 echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2
40 exit 1 44 exit 1
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index 038b3d1e2981..f9f6f52db772 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -206,7 +206,8 @@ static uint32_t (*w2)(uint16_t);
206static int 206static int
207is_mcounted_section_name(char const *const txtname) 207is_mcounted_section_name(char const *const txtname)
208{ 208{
209 return 0 == strcmp(".text", txtname) || 209 return 0 == strcmp(".text", txtname) ||
210 0 == strcmp(".ref.text", txtname) ||
210 0 == strcmp(".sched.text", txtname) || 211 0 == strcmp(".sched.text", txtname) ||
211 0 == strcmp(".spinlock.text", txtname) || 212 0 == strcmp(".spinlock.text", txtname) ||
212 0 == strcmp(".irqentry.text", txtname) || 213 0 == strcmp(".irqentry.text", txtname) ||
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 1d7963f4ee79..4be0deea71ca 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -130,6 +130,7 @@ if ($inputfile =~ m,kernel/trace/ftrace\.o$,) {
130# Acceptable sections to record. 130# Acceptable sections to record.
131my %text_sections = ( 131my %text_sections = (
132 ".text" => 1, 132 ".text" => 1,
133 ".ref.text" => 1,
133 ".sched.text" => 1, 134 ".sched.text" => 1,
134 ".spinlock.text" => 1, 135 ".spinlock.text" => 1,
135 ".irqentry.text" => 1, 136 ".irqentry.text" => 1,
diff --git a/scripts/rt-tester/rt-tester.py b/scripts/rt-tester/rt-tester.py
index 44423b4dcb82..8c81d76959ee 100644
--- a/scripts/rt-tester/rt-tester.py
+++ b/scripts/rt-tester/rt-tester.py
@@ -33,8 +33,6 @@ cmd_opcodes = {
33 "lockintnowait" : "6", 33 "lockintnowait" : "6",
34 "lockcont" : "7", 34 "lockcont" : "7",
35 "unlock" : "8", 35 "unlock" : "8",
36 "lockbkl" : "9",
37 "unlockbkl" : "10",
38 "signal" : "11", 36 "signal" : "11",
39 "resetevent" : "98", 37 "resetevent" : "98",
40 "reset" : "99", 38 "reset" : "99",
diff --git a/scripts/rt-tester/t2-l1-2rt-sameprio.tst b/scripts/rt-tester/t2-l1-2rt-sameprio.tst
index 8821f27cc8be..3710c8b2090d 100644
--- a/scripts/rt-tester/t2-l1-2rt-sameprio.tst
+++ b/scripts/rt-tester/t2-l1-2rt-sameprio.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal 0 22# signal 0
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t2-l1-pi.tst b/scripts/rt-tester/t2-l1-pi.tst
index cde1f189a02b..b4cc95975adb 100644
--- a/scripts/rt-tester/t2-l1-pi.tst
+++ b/scripts/rt-tester/t2-l1-pi.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal 0 22# signal 0
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t2-l1-signal.tst b/scripts/rt-tester/t2-l1-signal.tst
index 3ab0bfc49950..1b57376cc1f7 100644
--- a/scripts/rt-tester/t2-l1-signal.tst
+++ b/scripts/rt-tester/t2-l1-signal.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal 0 22# signal 0
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t2-l2-2rt-deadlock.tst b/scripts/rt-tester/t2-l2-2rt-deadlock.tst
index f4b5d5d6215f..68b10629b6f4 100644
--- a/scripts/rt-tester/t2-l2-2rt-deadlock.tst
+++ b/scripts/rt-tester/t2-l2-2rt-deadlock.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal 0 22# signal 0
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t3-l1-pi-1rt.tst b/scripts/rt-tester/t3-l1-pi-1rt.tst
index 63440ca2cce9..8e6c8b11ae56 100644
--- a/scripts/rt-tester/t3-l1-pi-1rt.tst
+++ b/scripts/rt-tester/t3-l1-pi-1rt.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal thread to signal (0-7) 22# signal thread to signal (0-7)
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t3-l1-pi-2rt.tst b/scripts/rt-tester/t3-l1-pi-2rt.tst
index e5816fe67df3..69c2212fc520 100644
--- a/scripts/rt-tester/t3-l1-pi-2rt.tst
+++ b/scripts/rt-tester/t3-l1-pi-2rt.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal thread to signal (0-7) 22# signal thread to signal (0-7)
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t3-l1-pi-3rt.tst b/scripts/rt-tester/t3-l1-pi-3rt.tst
index 718b82b5d3bb..9b0f1eb26a88 100644
--- a/scripts/rt-tester/t3-l1-pi-3rt.tst
+++ b/scripts/rt-tester/t3-l1-pi-3rt.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal thread to signal (0-7) 22# signal thread to signal (0-7)
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t3-l1-pi-signal.tst b/scripts/rt-tester/t3-l1-pi-signal.tst
index c6e213563498..39ec74ab06ee 100644
--- a/scripts/rt-tester/t3-l1-pi-signal.tst
+++ b/scripts/rt-tester/t3-l1-pi-signal.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal thread to signal (0-7) 22# signal thread to signal (0-7)
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t3-l1-pi-steal.tst b/scripts/rt-tester/t3-l1-pi-steal.tst
index f53749d59d79..e03db7e010fa 100644
--- a/scripts/rt-tester/t3-l1-pi-steal.tst
+++ b/scripts/rt-tester/t3-l1-pi-steal.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal thread to signal (0-7) 22# signal thread to signal (0-7)
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t3-l2-pi.tst b/scripts/rt-tester/t3-l2-pi.tst
index cdc3e4fd7bac..7b59100d3e48 100644
--- a/scripts/rt-tester/t3-l2-pi.tst
+++ b/scripts/rt-tester/t3-l2-pi.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal thread to signal (0-7) 22# signal thread to signal (0-7)
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t4-l2-pi-deboost.tst b/scripts/rt-tester/t4-l2-pi-deboost.tst
index baa14137f473..2f0e049d6443 100644
--- a/scripts/rt-tester/t4-l2-pi-deboost.tst
+++ b/scripts/rt-tester/t4-l2-pi-deboost.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal thread to signal (0-7) 22# signal thread to signal (0-7)
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst b/scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst
index e6ec0c81b54d..04f4034ff895 100644
--- a/scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst
+++ b/scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal thread to signal (0-7) 22# signal thread to signal (0-7)
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/rt-tester/t5-l4-pi-boost-deboost.tst b/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
index ca64f8bbf4bc..a48a6ee29ddc 100644
--- a/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
+++ b/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
@@ -19,8 +19,6 @@
19# lockintnowait lock nr (0-7) 19# lockintnowait lock nr (0-7)
20# lockcont lock nr (0-7) 20# lockcont lock nr (0-7)
21# unlock lock nr (0-7) 21# unlock lock nr (0-7)
22# lockbkl lock nr (0-7)
23# unlockbkl lock nr (0-7)
24# signal thread to signal (0-7) 22# signal thread to signal (0-7)
25# reset 0 23# reset 0
26# resetevent 0 24# resetevent 0
@@ -39,9 +37,6 @@
39# blocked lock nr (0-7) 37# blocked lock nr (0-7)
40# blockedwake lock nr (0-7) 38# blockedwake lock nr (0-7)
41# unlocked lock nr (0-7) 39# unlocked lock nr (0-7)
42# lockedbkl dont care
43# blockedbkl dont care
44# unlockedbkl dont care
45# opcodeeq command opcode or number 40# opcodeeq command opcode or number
46# opcodelt number 41# opcodelt number
47# opcodegt number 42# opcodegt number
diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c
index 58a12c278706..539855ff31f9 100644
--- a/scripts/selinux/genheaders/genheaders.c
+++ b/scripts/selinux/genheaders/genheaders.c
@@ -43,6 +43,8 @@ int main(int argc, char *argv[])
43 int i, j, k; 43 int i, j, k;
44 int isids_len; 44 int isids_len;
45 FILE *fout; 45 FILE *fout;
46 const char *needle = "SOCKET";
47 char *substr;
46 48
47 progname = argv[0]; 49 progname = argv[0];
48 50
@@ -88,6 +90,24 @@ int main(int argc, char *argv[])
88 fprintf(fout, "%2d\n", i); 90 fprintf(fout, "%2d\n", i);
89 } 91 }
90 fprintf(fout, "\n#define SECINITSID_NUM %d\n", i-1); 92 fprintf(fout, "\n#define SECINITSID_NUM %d\n", i-1);
93 fprintf(fout, "\nstatic inline bool security_is_socket_class(u16 kern_tclass)\n");
94 fprintf(fout, "{\n");
95 fprintf(fout, "\tbool sock = false;\n\n");
96 fprintf(fout, "\tswitch (kern_tclass) {\n");
97 for (i = 0; secclass_map[i].name; i++) {
98 struct security_class_mapping *map = &secclass_map[i];
99 substr = strstr(map->name, needle);
100 if (substr && strcmp(substr, needle) == 0)
101 fprintf(fout, "\tcase SECCLASS_%s:\n", map->name);
102 }
103 fprintf(fout, "\t\tsock = true;\n");
104 fprintf(fout, "\t\tbreak;\n");
105 fprintf(fout, "\tdefault:\n");
106 fprintf(fout, "\t\tbreak;\n");
107 fprintf(fout, "\t}\n\n");
108 fprintf(fout, "\treturn sock;\n");
109 fprintf(fout, "}\n");
110
91 fprintf(fout, "\n#endif\n"); 111 fprintf(fout, "\n#endif\n");
92 fclose(fout); 112 fclose(fout);
93 113
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index ef8729f48586..4d403844e137 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -86,12 +86,16 @@ scm_version()
86 86
87 # Check for mercurial and a mercurial repo. 87 # Check for mercurial and a mercurial repo.
88 if test -d .hg && hgid=`hg id 2>/dev/null`; then 88 if test -d .hg && hgid=`hg id 2>/dev/null`; then
89 tag=`printf '%s' "$hgid" | cut -s -d' ' -f2` 89 # Do we have an tagged version? If so, latesttagdistance == 1
90 90 if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
91 # Do we have an untagged version? 91 id=`hg log -r . --template '{latesttag}'`
92 if [ -z "$tag" -o "$tag" = tip ]; then
93 id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
94 printf '%s%s' -hg "$id" 92 printf '%s%s' -hg "$id"
93 else
94 tag=`printf '%s' "$hgid" | cut -d' ' -f2`
95 if [ -z "$tag" -o "$tag" = tip ]; then
96 id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
97 printf '%s%s' -hg "$id"
98 fi
95 fi 99 fi
96 100
97 # Are there uncommitted changes? 101 # Are there uncommitted changes?
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 92fdc4546141..bd6185d529cf 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -114,6 +114,11 @@ docscope()
114 cscope -b -f cscope.out 114 cscope -b -f cscope.out
115} 115}
116 116
117dogtags()
118{
119 all_sources | gtags -f -
120}
121
117exuberant() 122exuberant()
118{ 123{
119 all_sources | xargs $1 -a \ 124 all_sources | xargs $1 -a \
@@ -187,6 +192,10 @@ case "$1" in
187 docscope 192 docscope
188 ;; 193 ;;
189 194
195 "gtags")
196 dogtags
197 ;;
198
190 "tags") 199 "tags")
191 rm -f tags 200 rm -f tags
192 xtags ctags 201 xtags ctags