diff options
Diffstat (limited to 'kernel')
80 files changed, 143 insertions, 140 deletions
diff --git a/kernel/Kconfig.freezer b/kernel/Kconfig.freezer index a3bb4cb52539..68646feefb3d 100644 --- a/kernel/Kconfig.freezer +++ b/kernel/Kconfig.freezer | |||
@@ -1,2 +1,3 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | config FREEZER | 2 | config FREEZER |
2 | def_bool PM_SLEEP || CGROUP_FREEZER | 3 | def_bool PM_SLEEP || CGROUP_FREEZER |
diff --git a/kernel/Kconfig.hz b/kernel/Kconfig.hz index 2a202a846757..38ef6d06888e 100644 --- a/kernel/Kconfig.hz +++ b/kernel/Kconfig.hz | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | # | 2 | # |
2 | # Timer Interrupt Frequency Configuration | 3 | # Timer Interrupt Frequency Configuration |
3 | # | 4 | # |
diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks index bf770d7556f7..e0852dc333ac 100644 --- a/kernel/Kconfig.locks +++ b/kernel/Kconfig.locks | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | # | 2 | # |
2 | # The ARCH_INLINE foo is necessary because select ignores "depends on" | 3 | # The ARCH_INLINE foo is necessary because select ignores "depends on" |
3 | # | 4 | # |
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index 0fee5fe6c899..dc0b682ec2d9 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | 2 | ||
2 | choice | 3 | choice |
3 | prompt "Preemption Model" | 4 | prompt "Preemption Model" |
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c index 191b79948424..1e525d70f833 100644 --- a/kernel/bpf/devmap.c +++ b/kernel/bpf/devmap.c | |||
@@ -164,6 +164,9 @@ static void dev_map_free(struct bpf_map *map) | |||
164 | bpf_clear_redirect_map(map); | 164 | bpf_clear_redirect_map(map); |
165 | synchronize_rcu(); | 165 | synchronize_rcu(); |
166 | 166 | ||
167 | /* Make sure prior __dev_map_entry_free() have completed. */ | ||
168 | rcu_barrier(); | ||
169 | |||
167 | /* To ensure all pending flush operations have completed wait for flush | 170 | /* To ensure all pending flush operations have completed wait for flush |
168 | * bitmap to indicate all flush_needed bits to be zero on _all_ cpus. | 171 | * bitmap to indicate all flush_needed bits to be zero on _all_ cpus. |
169 | * Because the above synchronize_rcu() ensures the map is disconnected | 172 | * Because the above synchronize_rcu() ensures the map is disconnected |
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c index 192d32e77db3..0f2708fde5f7 100644 --- a/kernel/bpf/hashtab.c +++ b/kernel/bpf/hashtab.c | |||
@@ -527,18 +527,30 @@ static u32 htab_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) | |||
527 | return insn - insn_buf; | 527 | return insn - insn_buf; |
528 | } | 528 | } |
529 | 529 | ||
530 | static void *htab_lru_map_lookup_elem(struct bpf_map *map, void *key) | 530 | static __always_inline void *__htab_lru_map_lookup_elem(struct bpf_map *map, |
531 | void *key, const bool mark) | ||
531 | { | 532 | { |
532 | struct htab_elem *l = __htab_map_lookup_elem(map, key); | 533 | struct htab_elem *l = __htab_map_lookup_elem(map, key); |
533 | 534 | ||
534 | if (l) { | 535 | if (l) { |
535 | bpf_lru_node_set_ref(&l->lru_node); | 536 | if (mark) |
537 | bpf_lru_node_set_ref(&l->lru_node); | ||
536 | return l->key + round_up(map->key_size, 8); | 538 | return l->key + round_up(map->key_size, 8); |
537 | } | 539 | } |
538 | 540 | ||
539 | return NULL; | 541 | return NULL; |
540 | } | 542 | } |
541 | 543 | ||
544 | static void *htab_lru_map_lookup_elem(struct bpf_map *map, void *key) | ||
545 | { | ||
546 | return __htab_lru_map_lookup_elem(map, key, true); | ||
547 | } | ||
548 | |||
549 | static void *htab_lru_map_lookup_elem_sys(struct bpf_map *map, void *key) | ||
550 | { | ||
551 | return __htab_lru_map_lookup_elem(map, key, false); | ||
552 | } | ||
553 | |||
542 | static u32 htab_lru_map_gen_lookup(struct bpf_map *map, | 554 | static u32 htab_lru_map_gen_lookup(struct bpf_map *map, |
543 | struct bpf_insn *insn_buf) | 555 | struct bpf_insn *insn_buf) |
544 | { | 556 | { |
@@ -1250,6 +1262,7 @@ const struct bpf_map_ops htab_lru_map_ops = { | |||
1250 | .map_free = htab_map_free, | 1262 | .map_free = htab_map_free, |
1251 | .map_get_next_key = htab_map_get_next_key, | 1263 | .map_get_next_key = htab_map_get_next_key, |
1252 | .map_lookup_elem = htab_lru_map_lookup_elem, | 1264 | .map_lookup_elem = htab_lru_map_lookup_elem, |
1265 | .map_lookup_elem_sys_only = htab_lru_map_lookup_elem_sys, | ||
1253 | .map_update_elem = htab_lru_map_update_elem, | 1266 | .map_update_elem = htab_lru_map_update_elem, |
1254 | .map_delete_elem = htab_lru_map_delete_elem, | 1267 | .map_delete_elem = htab_lru_map_delete_elem, |
1255 | .map_gen_lookup = htab_lru_map_gen_lookup, | 1268 | .map_gen_lookup = htab_lru_map_gen_lookup, |
@@ -1281,7 +1294,6 @@ static void *htab_lru_percpu_map_lookup_elem(struct bpf_map *map, void *key) | |||
1281 | 1294 | ||
1282 | int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value) | 1295 | int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value) |
1283 | { | 1296 | { |
1284 | struct bpf_htab *htab = container_of(map, struct bpf_htab, map); | ||
1285 | struct htab_elem *l; | 1297 | struct htab_elem *l; |
1286 | void __percpu *pptr; | 1298 | void __percpu *pptr; |
1287 | int ret = -ENOENT; | 1299 | int ret = -ENOENT; |
@@ -1297,8 +1309,9 @@ int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value) | |||
1297 | l = __htab_map_lookup_elem(map, key); | 1309 | l = __htab_map_lookup_elem(map, key); |
1298 | if (!l) | 1310 | if (!l) |
1299 | goto out; | 1311 | goto out; |
1300 | if (htab_is_lru(htab)) | 1312 | /* We do not mark LRU map element here in order to not mess up |
1301 | bpf_lru_node_set_ref(&l->lru_node); | 1313 | * eviction heuristics when user space does a map walk. |
1314 | */ | ||
1302 | pptr = htab_elem_get_ptr(l, map->key_size); | 1315 | pptr = htab_elem_get_ptr(l, map->key_size); |
1303 | for_each_possible_cpu(cpu) { | 1316 | for_each_possible_cpu(cpu) { |
1304 | bpf_long_memcpy(value + off, | 1317 | bpf_long_memcpy(value + off, |
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index bc53e5b20ddc..84a80b02db99 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c | |||
@@ -518,7 +518,7 @@ out: | |||
518 | static struct bpf_prog *__get_prog_inode(struct inode *inode, enum bpf_prog_type type) | 518 | static struct bpf_prog *__get_prog_inode(struct inode *inode, enum bpf_prog_type type) |
519 | { | 519 | { |
520 | struct bpf_prog *prog; | 520 | struct bpf_prog *prog; |
521 | int ret = inode_permission(inode, MAY_READ | MAY_WRITE); | 521 | int ret = inode_permission(inode, MAY_READ); |
522 | if (ret) | 522 | if (ret) |
523 | return ERR_PTR(ret); | 523 | return ERR_PTR(ret); |
524 | 524 | ||
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index ad3ccf82f31d..cb5440b02e82 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c | |||
@@ -808,7 +808,10 @@ static int map_lookup_elem(union bpf_attr *attr) | |||
808 | err = map->ops->map_peek_elem(map, value); | 808 | err = map->ops->map_peek_elem(map, value); |
809 | } else { | 809 | } else { |
810 | rcu_read_lock(); | 810 | rcu_read_lock(); |
811 | ptr = map->ops->map_lookup_elem(map, key); | 811 | if (map->ops->map_lookup_elem_sys_only) |
812 | ptr = map->ops->map_lookup_elem_sys_only(map, key); | ||
813 | else | ||
814 | ptr = map->ops->map_lookup_elem(map, key); | ||
812 | if (IS_ERR(ptr)) { | 815 | if (IS_ERR(ptr)) { |
813 | err = PTR_ERR(ptr); | 816 | err = PTR_ERR(ptr); |
814 | } else if (!ptr) { | 817 | } else if (!ptr) { |
diff --git a/kernel/bpf/tnum.c b/kernel/bpf/tnum.c index 938d41211be7..ca52b9642943 100644 --- a/kernel/bpf/tnum.c +++ b/kernel/bpf/tnum.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* tnum: tracked (or tristate) numbers | 2 | /* tnum: tracked (or tristate) numbers |
2 | * | 3 | * |
3 | * A tnum tracks knowledge about the bits of a value. Each bit can be either | 4 | * A tnum tracks knowledge about the bits of a value. Each bit can be either |
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c index 68ca5de7ec27..88006be40ea3 100644 --- a/kernel/cgroup/cgroup-v1.c +++ b/kernel/cgroup/cgroup-v1.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | #include "cgroup-internal.h" | 2 | #include "cgroup-internal.h" |
2 | 3 | ||
3 | #include <linux/ctype.h> | 4 | #include <linux/ctype.h> |
diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index bb95a35e8c2d..ca19b4c8acf5 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | #include "cgroup-internal.h" | 2 | #include "cgroup-internal.h" |
2 | 3 | ||
3 | #include <linux/sched/cputime.h> | 4 | #include <linux/sched/cputime.h> |
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 9ad37b9e44a7..be01a4d627c9 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Context tracking: Probe on high level context boundaries such as kernel | 3 | * Context tracking: Probe on high level context boundaries such as kernel |
3 | * and userspace. This includes syscalls and exceptions entry/exit. | 4 | * and userspace. This includes syscalls and exceptions entry/exit. |
diff --git a/kernel/crash_dump.c b/kernel/crash_dump.c index b64e238b553b..9c23ae074b40 100644 --- a/kernel/crash_dump.c +++ b/kernel/crash_dump.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
2 | #include <linux/crash_dump.h> | 3 | #include <linux/crash_dump.h> |
3 | #include <linux/init.h> | 4 | #include <linux/init.h> |
diff --git a/kernel/cred.c b/kernel/cred.c index 45d77284aed0..e74ffdc98a92 100644 --- a/kernel/cred.c +++ b/kernel/cred.c | |||
@@ -1,12 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* Task credentials management - see Documentation/security/credentials.rst | 2 | /* Task credentials management - see Documentation/security/credentials.rst |
2 | * | 3 | * |
3 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. | 4 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Howells (dhowells@redhat.com) | 5 | * Written by David Howells (dhowells@redhat.com) |
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | 6 | */ |
11 | #include <linux/export.h> | 7 | #include <linux/export.h> |
12 | #include <linux/cred.h> | 8 | #include <linux/cred.h> |
diff --git a/kernel/debug/Makefile b/kernel/debug/Makefile index a85edc339985..332ee6c6ec2c 100644 --- a/kernel/debug/Makefile +++ b/kernel/debug/Makefile | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | # | 2 | # |
2 | # Makefile for the linux kernel debugger | 3 | # Makefile for the linux kernel debugger |
3 | # | 4 | # |
diff --git a/kernel/delayacct.c b/kernel/delayacct.c index 2a12b988c717..27725754ac99 100644 --- a/kernel/delayacct.c +++ b/kernel/delayacct.c | |||
@@ -1,16 +1,7 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* delayacct.c - per-task delay accounting | 2 | /* delayacct.c - per-task delay accounting |
2 | * | 3 | * |
3 | * Copyright (C) Shailabh Nagar, IBM Corp. 2006 | 4 | * Copyright (C) Shailabh Nagar, IBM Corp. 2006 |
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it would be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
13 | * the GNU General Public License for more details. | ||
14 | */ | 5 | */ |
15 | 6 | ||
16 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig index 83d711f8d665..70f8f8d9200e 100644 --- a/kernel/dma/Kconfig +++ b/kernel/dma/Kconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | 2 | ||
2 | config HAS_DMA | 3 | config HAS_DMA |
3 | bool | 4 | bool |
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 6f7619c1f877..13f0cb080a4d 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Dynamic DMA mapping support. | 3 | * Dynamic DMA mapping support. |
3 | * | 4 | * |
diff --git a/kernel/exit.c b/kernel/exit.c index 8361a560cd1d..1803efb2922f 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * linux/kernel/exit.c | 3 | * linux/kernel/exit.c |
3 | * | 4 | * |
diff --git a/kernel/fork.c b/kernel/fork.c index b4cba953040a..b2b87d450b80 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * linux/kernel/fork.c | 3 | * linux/kernel/fork.c |
3 | * | 4 | * |
diff --git a/kernel/freezer.c b/kernel/freezer.c index b162b74611e4..c0738424bb43 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * kernel/freezer.c - Function to freeze a process | 3 | * kernel/freezer.c - Function to freeze a process |
3 | * | 4 | * |
diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index f71c1adcff31..3941a9c48f83 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | menu "GCOV-based kernel profiling" | 2 | menu "GCOV-based kernel profiling" |
2 | 3 | ||
3 | config GCOV_KERNEL | 4 | config GCOV_KERNEL |
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index f108a95882c6..14a625c16cb3 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Detect Hung Task | 3 | * Detect Hung Task |
3 | * | 4 | * |
diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig index 8fee06625c37..f92d9a687372 100644 --- a/kernel/irq/Kconfig +++ b/kernel/irq/Kconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | menu "IRQ subsystem" | 2 | menu "IRQ subsystem" |
2 | # Options selectable by the architecture code | 3 | # Options selectable by the architecture code |
3 | 4 | ||
diff --git a/kernel/irq_work.c b/kernel/irq_work.c index 73288914ed5e..d42acaf81886 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra | 3 | * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra |
3 | * | 4 | * |
diff --git a/kernel/jump_label.c b/kernel/jump_label.c index de6efdecc70d..0bfa10f4410c 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * jump label support | 3 | * jump label support |
3 | * | 4 | * |
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 14934afa9e68..95a260f9214b 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * kallsyms.c: in-kernel printing of symbolic oopses and stack traces. | 3 | * kallsyms.c: in-kernel printing of symbolic oopses and stack traces. |
3 | * | 4 | * |
diff --git a/kernel/kthread.c b/kernel/kthread.c index be4e8795561a..621467c33fef 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* Kernel thread helper functions. | 2 | /* Kernel thread helper functions. |
2 | * Copyright (C) 2004 IBM Corporation, Rusty Russell. | 3 | * Copyright (C) 2004 IBM Corporation, Rusty Russell. |
3 | * | 4 | * |
diff --git a/kernel/livepatch/Kconfig b/kernel/livepatch/Kconfig index ec4565122e65..54102deb50ba 100644 --- a/kernel/livepatch/Kconfig +++ b/kernel/livepatch/Kconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | config HAVE_LIVEPATCH | 2 | config HAVE_LIVEPATCH |
2 | bool | 3 | bool |
3 | help | 4 | help |
diff --git a/kernel/livepatch/Makefile b/kernel/livepatch/Makefile index b36ceda6488e..cf9b5bcdb952 100644 --- a/kernel/livepatch/Makefile +++ b/kernel/livepatch/Makefile | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | obj-$(CONFIG_LIVEPATCH) += livepatch.o | 2 | obj-$(CONFIG_LIVEPATCH) += livepatch.o |
2 | 3 | ||
3 | livepatch-objs := core.o patch.o shadow.o transition.o | 4 | livepatch-objs := core.o patch.o shadow.o transition.o |
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 91cd519756d3..2398832947c6 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c | |||
@@ -1,21 +1,9 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* | 2 | /* |
2 | * core.c - Kernel Live Patching Core | 3 | * core.c - Kernel Live Patching Core |
3 | * | 4 | * |
4 | * Copyright (C) 2014 Seth Jennings <sjenning@redhat.com> | 5 | * Copyright (C) 2014 Seth Jennings <sjenning@redhat.com> |
5 | * Copyright (C) 2014 SUSE | 6 | * Copyright (C) 2014 SUSE |
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 7 | */ |
20 | 8 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 9 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
diff --git a/kernel/livepatch/patch.c b/kernel/livepatch/patch.c index 99cb3ad05eb4..bd43537702bd 100644 --- a/kernel/livepatch/patch.c +++ b/kernel/livepatch/patch.c | |||
@@ -1,22 +1,10 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* | 2 | /* |
2 | * patch.c - livepatch patching functions | 3 | * patch.c - livepatch patching functions |
3 | * | 4 | * |
4 | * Copyright (C) 2014 Seth Jennings <sjenning@redhat.com> | 5 | * Copyright (C) 2014 Seth Jennings <sjenning@redhat.com> |
5 | * Copyright (C) 2014 SUSE | 6 | * Copyright (C) 2014 SUSE |
6 | * Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com> | 7 | * Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com> |
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version 2 | ||
11 | * of the License, or (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | 8 | */ |
21 | 9 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
diff --git a/kernel/livepatch/shadow.c b/kernel/livepatch/shadow.c index 83958c814439..e5c9fb295ba9 100644 --- a/kernel/livepatch/shadow.c +++ b/kernel/livepatch/shadow.c | |||
@@ -1,22 +1,10 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* | 2 | /* |
2 | * shadow.c - Shadow Variables | 3 | * shadow.c - Shadow Variables |
3 | * | 4 | * |
4 | * Copyright (C) 2014 Josh Poimboeuf <jpoimboe@redhat.com> | 5 | * Copyright (C) 2014 Josh Poimboeuf <jpoimboe@redhat.com> |
5 | * Copyright (C) 2014 Seth Jennings <sjenning@redhat.com> | 6 | * Copyright (C) 2014 Seth Jennings <sjenning@redhat.com> |
6 | * Copyright (C) 2017 Joe Lawrence <joe.lawrence@redhat.com> | 7 | * Copyright (C) 2017 Joe Lawrence <joe.lawrence@redhat.com> |
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version 2 | ||
11 | * of the License, or (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | 8 | */ |
21 | 9 | ||
22 | /** | 10 | /** |
diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c index c53370d596be..abb2a4a2cbb2 100644 --- a/kernel/livepatch/transition.c +++ b/kernel/livepatch/transition.c | |||
@@ -1,20 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* | 2 | /* |
2 | * transition.c - Kernel Live Patching transition functions | 3 | * transition.c - Kernel Live Patching transition functions |
3 | * | 4 | * |
4 | * Copyright (C) 2015-2016 Josh Poimboeuf <jpoimboe@redhat.com> | 5 | * Copyright (C) 2015-2016 Josh Poimboeuf <jpoimboe@redhat.com> |
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | 6 | */ |
19 | 7 | ||
20 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 8 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
diff --git a/kernel/locking/lock_events.h b/kernel/locking/lock_events.h index feb1acc54611..46b71af8eef2 100644 --- a/kernel/locking/lock_events.h +++ b/kernel/locking/lock_events.h | |||
@@ -31,12 +31,50 @@ enum lock_events { | |||
31 | DECLARE_PER_CPU(unsigned long, lockevents[lockevent_num]); | 31 | DECLARE_PER_CPU(unsigned long, lockevents[lockevent_num]); |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * The purpose of the lock event counting subsystem is to provide a low | ||
35 | * overhead way to record the number of specific locking events by using | ||
36 | * percpu counters. It is the percpu sum that matters, not specifically | ||
37 | * how many of them happens in each cpu. | ||
38 | * | ||
39 | * It is possible that the same percpu counter may be modified in both | ||
40 | * the process and interrupt contexts. For architectures that perform | ||
41 | * percpu operation with multiple instructions, it is possible to lose | ||
42 | * count if a process context percpu update is interrupted in the middle | ||
43 | * and the same counter is updated in the interrupt context. Therefore, | ||
44 | * the generated percpu sum may not be precise. The error, if any, should | ||
45 | * be small and insignificant. | ||
46 | * | ||
47 | * For those architectures that do multi-instruction percpu operation, | ||
48 | * preemption in the middle and moving the task to another cpu may cause | ||
49 | * a larger error in the count. Again, this will be few and far between. | ||
50 | * Given the imprecise nature of the count and the possibility of resetting | ||
51 | * the count and doing the measurement again, this is not really a big | ||
52 | * problem. | ||
53 | * | ||
54 | * To get a better picture of what is happening under the hood, it is | ||
55 | * suggested that a few measurements should be taken with the counts | ||
56 | * reset in between to stamp out outliner because of these possible | ||
57 | * error conditions. | ||
58 | * | ||
59 | * To minimize overhead, we use __this_cpu_*() in all cases except when | ||
60 | * CONFIG_DEBUG_PREEMPT is defined. In this particular case, this_cpu_*() | ||
61 | * will be used to avoid the appearance of unwanted BUG messages. | ||
62 | */ | ||
63 | #ifdef CONFIG_DEBUG_PREEMPT | ||
64 | #define lockevent_percpu_inc(x) this_cpu_inc(x) | ||
65 | #define lockevent_percpu_add(x, v) this_cpu_add(x, v) | ||
66 | #else | ||
67 | #define lockevent_percpu_inc(x) __this_cpu_inc(x) | ||
68 | #define lockevent_percpu_add(x, v) __this_cpu_add(x, v) | ||
69 | #endif | ||
70 | |||
71 | /* | ||
34 | * Increment the PV qspinlock statistical counters | 72 | * Increment the PV qspinlock statistical counters |
35 | */ | 73 | */ |
36 | static inline void __lockevent_inc(enum lock_events event, bool cond) | 74 | static inline void __lockevent_inc(enum lock_events event, bool cond) |
37 | { | 75 | { |
38 | if (cond) | 76 | if (cond) |
39 | __this_cpu_inc(lockevents[event]); | 77 | lockevent_percpu_inc(lockevents[event]); |
40 | } | 78 | } |
41 | 79 | ||
42 | #define lockevent_inc(ev) __lockevent_inc(LOCKEVENT_ ##ev, true) | 80 | #define lockevent_inc(ev) __lockevent_inc(LOCKEVENT_ ##ev, true) |
@@ -44,7 +82,7 @@ static inline void __lockevent_inc(enum lock_events event, bool cond) | |||
44 | 82 | ||
45 | static inline void __lockevent_add(enum lock_events event, int inc) | 83 | static inline void __lockevent_add(enum lock_events event, int inc) |
46 | { | 84 | { |
47 | __this_cpu_add(lockevents[event], inc); | 85 | lockevent_percpu_add(lockevents[event], inc); |
48 | } | 86 | } |
49 | 87 | ||
50 | #define lockevent_add(ev, c) __lockevent_add(LOCKEVENT_ ##ev, c) | 88 | #define lockevent_add(ev, c) __lockevent_add(LOCKEVENT_ ##ev, c) |
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index d06190fa5082..c47788fa85f9 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * kernel/lockdep.c | 3 | * kernel/lockdep.c |
3 | * | 4 | * |
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index db578783dd36..0c601ae072b3 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * kernel/locking/mutex.c | 3 | * kernel/locking/mutex.c |
3 | * | 4 | * |
diff --git a/kernel/locking/percpu-rwsem.c b/kernel/locking/percpu-rwsem.c index f17dad99eec8..b6a9cc62099a 100644 --- a/kernel/locking/percpu-rwsem.c +++ b/kernel/locking/percpu-rwsem.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | #include <linux/atomic.h> | 2 | #include <linux/atomic.h> |
2 | #include <linux/rwsem.h> | 3 | #include <linux/rwsem.h> |
3 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 978d63a8261c..38fbf9fa7f1b 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * RT-Mutexes: simple blocking mutual exclusion locks with PI support | 3 | * RT-Mutexes: simple blocking mutual exclusion locks with PI support |
3 | * | 4 | * |
diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c index 65a3b7e55b9f..3e82f449b4ff 100644 --- a/kernel/locking/test-ww_mutex.c +++ b/kernel/locking/test-ww_mutex.c | |||
@@ -1,19 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* | 2 | /* |
2 | * Module-based API test facility for ww_mutexes | 3 | * Module-based API test facility for ww_mutexes |
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, you can access it online at | ||
16 | * http://www.gnu.org/licenses/gpl-2.0.html. | ||
17 | */ | 4 | */ |
18 | 5 | ||
19 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
diff --git a/kernel/module-internal.h b/kernel/module-internal.h index d354341f8cc0..33783abc377b 100644 --- a/kernel/module-internal.h +++ b/kernel/module-internal.h | |||
@@ -1,12 +1,8 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
1 | /* Module internals | 2 | /* Module internals |
2 | * | 3 | * |
3 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. | 4 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Howells (dhowells@redhat.com) | 5 | * Written by David Howells (dhowells@redhat.com) |
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | 6 | */ |
11 | 7 | ||
12 | #include <linux/elf.h> | 8 | #include <linux/elf.h> |
diff --git a/kernel/module_signing.c b/kernel/module_signing.c index 6b9a926fd86b..b10fb1986ca9 100644 --- a/kernel/module_signing.c +++ b/kernel/module_signing.c | |||
@@ -1,12 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* Module signature checker | 2 | /* Module signature checker |
2 | * | 3 | * |
3 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. | 4 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Howells (dhowells@redhat.com) | 5 | * Written by David Howells (dhowells@redhat.com) |
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | 6 | */ |
11 | 7 | ||
12 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
diff --git a/kernel/notifier.c b/kernel/notifier.c index bfc95b3e4235..d9f5081d578d 100644 --- a/kernel/notifier.c +++ b/kernel/notifier.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | #include <linux/kdebug.h> | 2 | #include <linux/kdebug.h> |
2 | #include <linux/kprobes.h> | 3 | #include <linux/kprobes.h> |
3 | #include <linux/export.h> | 4 | #include <linux/export.h> |
diff --git a/kernel/panic.c b/kernel/panic.c index b4543a31a495..4d9f55bf7d38 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * linux/kernel/panic.c | 3 | * linux/kernel/panic.c |
3 | * | 4 | * |
diff --git a/kernel/pid.c b/kernel/pid.c index 89548d35eefb..e5cad0c7d5dd 100644 --- a/kernel/pid.c +++ b/kernel/pid.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Generic pidhash and scalable, time-bounded PID allocator | 3 | * Generic pidhash and scalable, time-bounded PID allocator |
3 | * | 4 | * |
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index aa6e72fb7c08..f54bc7cb6c2d 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Pid namespaces | 3 | * Pid namespaces |
3 | * | 4 | * |
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 9bbaaab14b36..ff8592ddedee 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | config SUSPEND | 2 | config SUSPEND |
2 | bool "Suspend to RAM and standby" | 3 | bool "Suspend to RAM and standby" |
3 | depends on ARCH_SUSPEND_POSSIBLE | 4 | depends on ARCH_SUSPEND_POSSIBLE |
diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 9d22131afc1e..33e3febaba53 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * This module exposes the interface to kernel space for specifying | 3 | * This module exposes the interface to kernel space for specifying |
3 | * QoS dependencies. It provides infrastructure for registration of: | 4 | * QoS dependencies. It provides infrastructure for registration of: |
diff --git a/kernel/printk/Makefile b/kernel/printk/Makefile index 4a2ffc39eb95..4d052fc6bcde 100644 --- a/kernel/printk/Makefile +++ b/kernel/printk/Makefile | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | obj-y = printk.o | 2 | obj-y = printk.o |
2 | obj-$(CONFIG_PRINTK) += printk_safe.o | 3 | obj-$(CONFIG_PRINTK) += printk_safe.o |
3 | obj-$(CONFIG_A11Y_BRAILLE_CONSOLE) += braille.o | 4 | obj-$(CONFIG_A11Y_BRAILLE_CONSOLE) += braille.o |
diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h index 0f1898820cba..c8e6ab689d42 100644 --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h | |||
@@ -1,18 +1,6 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
1 | /* | 2 | /* |
2 | * internal.h - printk internal definitions | 3 | * internal.h - printk internal definitions |
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 4 | */ |
17 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
18 | 6 | ||
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index a6e06fe38e41..1888f6a3b694 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * linux/kernel/printk.c | 3 | * linux/kernel/printk.c |
3 | * | 4 | * |
diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c index 0913b4d385de..b4045e782743 100644 --- a/kernel/printk/printk_safe.c +++ b/kernel/printk/printk_safe.c | |||
@@ -1,18 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* | 2 | /* |
2 | * printk_safe.c - Safe printk for printk-deadlock-prone contexts | 3 | * printk_safe.c - Safe printk for printk-deadlock-prone contexts |
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 4 | */ |
17 | 5 | ||
18 | #include <linux/preempt.h> | 6 | #include <linux/preempt.h> |
diff --git a/kernel/profile.c b/kernel/profile.c index 9c08a2c7cb1d..af7c94bf5fa1 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * linux/kernel/profile.c | 3 | * linux/kernel/profile.c |
3 | * Simple profiling. Manages a direct-mapped profile hit count buffer, | 4 | * Simple profiling. Manages a direct-mapped profile hit count buffer, |
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 6f357f4fc859..5710d07e67cf 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * linux/kernel/ptrace.c | 3 | * linux/kernel/ptrace.c |
3 | * | 4 | * |
diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig index 37301430970e..480edf328b51 100644 --- a/kernel/rcu/Kconfig +++ b/kernel/rcu/Kconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | # | 2 | # |
2 | # RCU-related configuration options | 3 | # RCU-related configuration options |
3 | # | 4 | # |
diff --git a/kernel/rcu/Kconfig.debug b/kernel/rcu/Kconfig.debug index 0ec7d1d33a14..5ec3ea4028e2 100644 --- a/kernel/rcu/Kconfig.debug +++ b/kernel/rcu/Kconfig.debug | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | # | 2 | # |
2 | # RCU-related debugging configuration options | 3 | # RCU-related debugging configuration options |
3 | # | 4 | # |
diff --git a/kernel/reboot.c b/kernel/reboot.c index b9e79e8c7226..c4d472b7f1b4 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * linux/kernel/reboot.c | 3 | * linux/kernel/reboot.c |
3 | * | 4 | * |
diff --git a/kernel/resource.c b/kernel/resource.c index 8c15f846e8ef..158f04ec1d4f 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * linux/kernel/resource.c | 3 | * linux/kernel/resource.c |
3 | * | 4 | * |
diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c index e3e3b979f9bd..1152259a4ca0 100644 --- a/kernel/sched/clock.c +++ b/kernel/sched/clock.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * sched_clock() for unstable CPU clocks | 3 | * sched_clock() for unstable CPU clocks |
3 | * | 4 | * |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 102dfcf0a29a..874c427742a9 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * kernel/sched/core.c | 3 | * kernel/sched/core.c |
3 | * | 4 | * |
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index ba4a143bdcf3..2305ce89a26c 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Simple CPU accounting cgroup controller | 3 | * Simple CPU accounting cgroup controller |
3 | */ | 4 | */ |
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index f5516bae0c1b..80940939b733 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Generic entry points for the idle threads and | 3 | * Generic entry points for the idle threads and |
3 | * implementation of the idle task scheduling class. | 4 | * implementation of the idle task scheduling class. |
diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index 687302051a27..123ea07a3f3b 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Housekeeping management. Manage the targets for routine code that can run on | 3 | * Housekeeping management. Manage the targets for routine code that can run on |
3 | * any CPU: unbound workqueues, timers, kthreads and any offloadable work. | 4 | * any CPU: unbound workqueues, timers, kthreads and any offloadable work. |
diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c index 6eb1f8efd221..fa0f9adfb752 100644 --- a/kernel/sched/wait.c +++ b/kernel/sched/wait.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Generic waiting primitives. | 3 | * Generic waiting primitives. |
3 | * | 4 | * |
diff --git a/kernel/sched/wait_bit.c b/kernel/sched/wait_bit.c index c67c6d24adc2..45eba18a2898 100644 --- a/kernel/sched/wait_bit.c +++ b/kernel/sched/wait_bit.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * The implementation of the wait_bit*() and related waiting APIs: | 3 | * The implementation of the wait_bit*() and related waiting APIs: |
3 | */ | 4 | */ |
diff --git a/kernel/signal.c b/kernel/signal.c index a1eb44dc9ff5..d7b9d14ac80d 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * linux/kernel/signal.c | 3 | * linux/kernel/signal.c |
3 | * | 4 | * |
diff --git a/kernel/smp.c b/kernel/smp.c index f4cf1b0bb3b8..d155374632eb 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Generic helpers for smp ipi calls | 3 | * Generic helpers for smp ipi calls |
3 | * | 4 | * |
diff --git a/kernel/smpboot.c b/kernel/smpboot.c index c230c2dd48e1..2efe1e206167 100644 --- a/kernel/smpboot.c +++ b/kernel/smpboot.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Common SMP CPU bringup/teardown functions | 3 | * Common SMP CPU bringup/teardown functions |
3 | */ | 4 | */ |
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c index 27bafc1e271e..5667f1da3ede 100644 --- a/kernel/stacktrace.c +++ b/kernel/stacktrace.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * kernel/stacktrace.c | 3 | * kernel/stacktrace.c |
3 | * | 4 | * |
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 7231fb5953fc..2b5a6754646f 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* | 2 | /* |
2 | * kernel/stop_machine.c | 3 | * kernel/stop_machine.c |
3 | * | 4 | * |
@@ -5,8 +6,6 @@ | |||
5 | * Copyright (C) 2008, 2005 Rusty Russell rusty@rustcorp.com.au | 6 | * Copyright (C) 2008, 2005 Rusty Russell rusty@rustcorp.com.au |
6 | * Copyright (C) 2010 SUSE Linux Products GmbH | 7 | * Copyright (C) 2010 SUSE Linux Products GmbH |
7 | * Copyright (C) 2010 Tejun Heo <tj@kernel.org> | 8 | * Copyright (C) 2010 Tejun Heo <tj@kernel.org> |
8 | * | ||
9 | * This file is released under the GPLv2 and any later version. | ||
10 | */ | 9 | */ |
11 | #include <linux/completion.h> | 10 | #include <linux/completion.h> |
12 | #include <linux/cpu.h> | 11 | #include <linux/cpu.h> |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 943c89178e3d..7d1008be6173 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * sysctl.c: General linux system control interface | 3 | * sysctl.c: General linux system control interface |
3 | * | 4 | * |
diff --git a/kernel/test_kprobes.c b/kernel/test_kprobes.c index 7bca480151b0..76c997fdbc9d 100644 --- a/kernel/test_kprobes.c +++ b/kernel/test_kprobes.c | |||
@@ -1,17 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
1 | /* | 2 | /* |
2 | * test_kprobes.c - simple sanity test for *probes | 3 | * test_kprobes.c - simple sanity test for *probes |
3 | * | 4 | * |
4 | * Copyright IBM Corp. 2008 | 5 | * Copyright IBM Corp. 2008 |
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it would be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
14 | * the GNU General Public License for more details. | ||
15 | */ | 6 | */ |
16 | 7 | ||
17 | #define pr_fmt(fmt) "Kprobe smoke test: " fmt | 8 | #define pr_fmt(fmt) "Kprobe smoke test: " fmt |
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index e2c038d6c13c..fcc42353f125 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | # | 2 | # |
2 | # Timer subsystem related configuration options | 3 | # Timer subsystem related configuration options |
3 | # | 4 | # |
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 5d965cef6c77..564e5fdb025f 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
1 | # | 2 | # |
2 | # Architectures that offer an FUNCTION_TRACER implementation should | 3 | # Architectures that offer an FUNCTION_TRACER implementation should |
3 | # select HAVE_FUNCTION_TRACER: | 4 | # select HAVE_FUNCTION_TRACER: |
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index b496ffdf5f36..f92d6ad5e080 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c | |||
@@ -1297,7 +1297,8 @@ int bpf_get_perf_event_info(const struct perf_event *event, u32 *prog_id, | |||
1297 | } | 1297 | } |
1298 | 1298 | ||
1299 | #ifdef CONFIG_MODULES | 1299 | #ifdef CONFIG_MODULES |
1300 | int bpf_event_notify(struct notifier_block *nb, unsigned long op, void *module) | 1300 | static int bpf_event_notify(struct notifier_block *nb, unsigned long op, |
1301 | void *module) | ||
1301 | { | 1302 | { |
1302 | struct bpf_trace_module *btm, *tmp; | 1303 | struct bpf_trace_module *btm, *tmp; |
1303 | struct module *mod = module; | 1304 | struct module *mod = module; |
@@ -1336,7 +1337,7 @@ static struct notifier_block bpf_module_nb = { | |||
1336 | .notifier_call = bpf_event_notify, | 1337 | .notifier_call = bpf_event_notify, |
1337 | }; | 1338 | }; |
1338 | 1339 | ||
1339 | int __init bpf_event_init(void) | 1340 | static int __init bpf_event_init(void) |
1340 | { | 1341 | { |
1341 | register_module_notifier(&bpf_module_nb); | 1342 | register_module_notifier(&bpf_module_nb); |
1342 | return 0; | 1343 | return 0; |
diff --git a/kernel/umh.c b/kernel/umh.c index d937cbad903a..7f255b5a8845 100644 --- a/kernel/umh.c +++ b/kernel/umh.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * umh - the kernel usermode helper | 3 | * umh - the kernel usermode helper |
3 | */ | 4 | */ |
diff --git a/kernel/up.c b/kernel/up.c index ff536f9cc8a2..483c9962c999 100644 --- a/kernel/up.c +++ b/kernel/up.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * Uniprocessor-only support functions. The counterpart to kernel/smp.c | 3 | * Uniprocessor-only support functions. The counterpart to kernel/smp.c |
3 | */ | 4 | */ |
diff --git a/kernel/user-return-notifier.c b/kernel/user-return-notifier.c index 9586b670a5b2..870ecd7c63ed 100644 --- a/kernel/user-return-notifier.c +++ b/kernel/user-return-notifier.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | 2 | ||
2 | #include <linux/user-return-notifier.h> | 3 | #include <linux/user-return-notifier.h> |
3 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
diff --git a/kernel/user.c b/kernel/user.c index 88b834f0eebc..78b17e36e705 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * The "user cache". | 3 | * The "user cache". |
3 | * | 4 | * |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 9657315405de..95aea04ff722 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
1 | /* | 2 | /* |
2 | * kernel/workqueue.c - generic async execution with shared worker pool | 3 | * kernel/workqueue.c - generic async execution with shared worker pool |
3 | * | 4 | * |