aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/842/842.h1
-rw-r--r--lib/842/842_debugfs.h1
-rw-r--r--lib/Kconfig.debug150
-rw-r--r--lib/Makefile1
-rw-r--r--lib/argv_split.c1
-rw-r--r--lib/asn1_decoder.c3
-rw-r--r--lib/assoc_array.c51
-rw-r--r--lib/audit.c1
-rw-r--r--lib/bcd.c1
-rw-r--r--lib/bug.c1
-rw-r--r--lib/bust_spinlocks.c1
-rw-r--r--lib/check_signature.c1
-rw-r--r--lib/clz_tab.c1
-rw-r--r--lib/compat_audit.c1
-rw-r--r--lib/cpumask.c1
-rw-r--r--lib/crc32defs.h1
-rw-r--r--lib/ctype.c1
-rw-r--r--lib/debug_info.c1
-rw-r--r--lib/dec_and_lock.c1
-rw-r--r--lib/decompress.c1
-rw-r--r--lib/decompress_inflate.c1
-rw-r--r--lib/devres.c1
-rw-r--r--lib/digsig.c6
-rw-r--r--lib/div64.c1
-rw-r--r--lib/dma-noop.c1
-rw-r--r--lib/dma-virt.c1
-rw-r--r--lib/dump_stack.c1
-rw-r--r--lib/dynamic_queue_limits.c1
-rw-r--r--lib/errseq.c1
-rw-r--r--lib/flex_proportions.c1
-rw-r--r--lib/fonts/Makefile1
-rw-r--r--lib/fonts/font_10x18.c1
-rw-r--r--lib/fonts/font_6x10.c1
-rw-r--r--lib/fonts/font_6x11.c1
-rw-r--r--lib/fonts/font_7x14.c1
-rw-r--r--lib/fonts/font_8x16.c1
-rw-r--r--lib/fonts/font_8x8.c1
-rw-r--r--lib/fonts/font_acorn_8x8.c1
-rw-r--r--lib/fonts/font_pearl_8x8.c1
-rw-r--r--lib/fonts/font_sun12x22.c1
-rw-r--r--lib/fonts/font_sun8x16.c1
-rw-r--r--lib/gen_crc32table.c1
-rw-r--r--lib/hweight.c1
-rw-r--r--lib/idr.c4
-rw-r--r--lib/inflate.c1
-rw-r--r--lib/int_sqrt.c1
-rw-r--r--lib/iomap.c1
-rw-r--r--lib/iommu-common.c1
-rw-r--r--lib/iommu-helper.c1
-rw-r--r--lib/ioremap.c2
-rw-r--r--lib/iov_iter.c6
-rw-r--r--lib/irq_poll.c1
-rw-r--r--lib/kasprintf.c1
-rw-r--r--lib/kobject_uevent.c49
-rw-r--r--lib/kstrtox.c1
-rw-r--r--lib/kstrtox.h1
-rw-r--r--lib/list_sort.c1
-rw-r--r--lib/locking-selftest-hardirq.h1
-rw-r--r--lib/locking-selftest-mutex.h1
-rw-r--r--lib/locking-selftest-rlock.h1
-rw-r--r--lib/locking-selftest-rsem.h1
-rw-r--r--lib/locking-selftest-rtmutex.h1
-rw-r--r--lib/locking-selftest-softirq.h1
-rw-r--r--lib/locking-selftest-spin.h1
-rw-r--r--lib/locking-selftest-wlock.h1
-rw-r--r--lib/locking-selftest-wsem.h1
-rw-r--r--lib/locking-selftest.c3
-rw-r--r--lib/lockref.c1
-rw-r--r--lib/lz4/lz4_decompress.c4
-rw-r--r--lib/lzo/lzodefs.h1
-rw-r--r--lib/memweight.c1
-rw-r--r--lib/mpi/Makefile1
-rw-r--r--lib/net_utils.c1
-rw-r--r--lib/nlattr.c1
-rw-r--r--lib/nmi_backtrace.c1
-rw-r--r--lib/nodemask.c1
-rw-r--r--lib/notifier-error-inject.h1
-rw-r--r--lib/once.c1
-rw-r--r--lib/percpu_counter.c1
-rw-r--r--lib/raid6/Makefile1
-rw-r--r--lib/raid6/recov_s390xc.c1
-rw-r--r--lib/raid6/s390vx.uc1
-rw-r--r--lib/raid6/test/Makefile1
-rw-r--r--lib/random32.c1
-rw-r--r--lib/ratelimit.c4
-rw-r--r--lib/rational.c1
-rw-r--r--lib/reciprocal_div.c1
-rw-r--r--lib/refcount.c1
-rw-r--r--lib/rhashtable.c9
-rw-r--r--lib/seq_buf.c1
-rw-r--r--lib/sha1.c1
-rw-r--r--lib/smp_processor_id.c1
-rw-r--r--lib/sort.c1
-rw-r--r--lib/string.c1
-rw-r--r--lib/strncpy_from_user.c1
-rw-r--r--lib/strnlen_user.c1
-rw-r--r--lib/syscall.c1
-rw-r--r--lib/ts_fsm.c2
-rw-r--r--lib/ts_kmp.c2
-rw-r--r--lib/ubsan.h1
-rw-r--r--lib/ucs2_string.c1
-rw-r--r--lib/usercopy.c1
-rw-r--r--lib/win_minmax.c1
103 files changed, 254 insertions, 130 deletions
diff --git a/lib/842/842.h b/lib/842/842.h
index e0a122bc1cdb..7b1f581a2907 100644
--- a/lib/842/842.h
+++ b/lib/842/842.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2#ifndef __842_H__ 3#ifndef __842_H__
3#define __842_H__ 4#define __842_H__
diff --git a/lib/842/842_debugfs.h b/lib/842/842_debugfs.h
index e7f3bffaf255..277e403e8701 100644
--- a/lib/842/842_debugfs.h
+++ b/lib/842/842_debugfs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2#ifndef __842_DEBUGFS_H__ 3#ifndef __842_DEBUGFS_H__
3#define __842_DEBUGFS_H__ 4#define __842_DEBUGFS_H__
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index b19c491cbc4e..dfdad67d8f6c 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -219,7 +219,8 @@ config FRAME_WARN
219 range 0 8192 219 range 0 8192
220 default 0 if KASAN 220 default 0 if KASAN
221 default 2048 if GCC_PLUGIN_LATENT_ENTROPY 221 default 2048 if GCC_PLUGIN_LATENT_ENTROPY
222 default 1024 if !64BIT 222 default 1280 if (!64BIT && PARISC)
223 default 1024 if (!64BIT && !PARISC)
223 default 2048 if 64BIT 224 default 2048 if 64BIT
224 help 225 help
225 Tell gcc to warn at build time for stack frames larger than this. 226 Tell gcc to warn at build time for stack frames larger than this.
@@ -1091,8 +1092,8 @@ config PROVE_LOCKING
1091 select DEBUG_MUTEXES 1092 select DEBUG_MUTEXES
1092 select DEBUG_RT_MUTEXES if RT_MUTEXES 1093 select DEBUG_RT_MUTEXES if RT_MUTEXES
1093 select DEBUG_LOCK_ALLOC 1094 select DEBUG_LOCK_ALLOC
1094 select LOCKDEP_CROSSRELEASE 1095 select LOCKDEP_CROSSRELEASE if BROKEN
1095 select LOCKDEP_COMPLETIONS 1096 select LOCKDEP_COMPLETIONS if BROKEN
1096 select TRACE_IRQFLAGS 1097 select TRACE_IRQFLAGS
1097 default n 1098 default n
1098 help 1099 help
@@ -1589,6 +1590,54 @@ config LATENCYTOP
1589 1590
1590source kernel/trace/Kconfig 1591source kernel/trace/Kconfig
1591 1592
1593config PROVIDE_OHCI1394_DMA_INIT
1594 bool "Remote debugging over FireWire early on boot"
1595 depends on PCI && X86
1596 help
1597 If you want to debug problems which hang or crash the kernel early
1598 on boot and the crashing machine has a FireWire port, you can use
1599 this feature to remotely access the memory of the crashed machine
1600 over FireWire. This employs remote DMA as part of the OHCI1394
1601 specification which is now the standard for FireWire controllers.
1602
1603 With remote DMA, you can monitor the printk buffer remotely using
1604 firescope and access all memory below 4GB using fireproxy from gdb.
1605 Even controlling a kernel debugger is possible using remote DMA.
1606
1607 Usage:
1608
1609 If ohci1394_dma=early is used as boot parameter, it will initialize
1610 all OHCI1394 controllers which are found in the PCI config space.
1611
1612 As all changes to the FireWire bus such as enabling and disabling
1613 devices cause a bus reset and thereby disable remote DMA for all
1614 devices, be sure to have the cable plugged and FireWire enabled on
1615 the debugging host before booting the debug target for debugging.
1616
1617 This code (~1k) is freed after boot. By then, the firewire stack
1618 in charge of the OHCI-1394 controllers should be used instead.
1619
1620 See Documentation/debugging-via-ohci1394.txt for more information.
1621
1622config DMA_API_DEBUG
1623 bool "Enable debugging of DMA-API usage"
1624 depends on HAVE_DMA_API_DEBUG
1625 help
1626 Enable this option to debug the use of the DMA API by device drivers.
1627 With this option you will be able to detect common bugs in device
1628 drivers like double-freeing of DMA mappings or freeing mappings that
1629 were never allocated.
1630
1631 This also attempts to catch cases where a page owned by DMA is
1632 accessed by the cpu in a way that could cause data corruption. For
1633 example, this enables cow_user_page() to check that the source page is
1634 not undergoing DMA.
1635
1636 This option causes a performance degradation. Use only if you want to
1637 debug device drivers and dma interactions.
1638
1639 If unsure, say N.
1640
1592menu "Runtime Testing" 1641menu "Runtime Testing"
1593 1642
1594config LKDTM 1643config LKDTM
@@ -1748,56 +1797,6 @@ config TEST_PARMAN
1748 1797
1749 If unsure, say N. 1798 If unsure, say N.
1750 1799
1751endmenu # runtime tests
1752
1753config PROVIDE_OHCI1394_DMA_INIT
1754 bool "Remote debugging over FireWire early on boot"
1755 depends on PCI && X86
1756 help
1757 If you want to debug problems which hang or crash the kernel early
1758 on boot and the crashing machine has a FireWire port, you can use
1759 this feature to remotely access the memory of the crashed machine
1760 over FireWire. This employs remote DMA as part of the OHCI1394
1761 specification which is now the standard for FireWire controllers.
1762
1763 With remote DMA, you can monitor the printk buffer remotely using
1764 firescope and access all memory below 4GB using fireproxy from gdb.
1765 Even controlling a kernel debugger is possible using remote DMA.
1766
1767 Usage:
1768
1769 If ohci1394_dma=early is used as boot parameter, it will initialize
1770 all OHCI1394 controllers which are found in the PCI config space.
1771
1772 As all changes to the FireWire bus such as enabling and disabling
1773 devices cause a bus reset and thereby disable remote DMA for all
1774 devices, be sure to have the cable plugged and FireWire enabled on
1775 the debugging host before booting the debug target for debugging.
1776
1777 This code (~1k) is freed after boot. By then, the firewire stack
1778 in charge of the OHCI-1394 controllers should be used instead.
1779
1780 See Documentation/debugging-via-ohci1394.txt for more information.
1781
1782config DMA_API_DEBUG
1783 bool "Enable debugging of DMA-API usage"
1784 depends on HAVE_DMA_API_DEBUG
1785 help
1786 Enable this option to debug the use of the DMA API by device drivers.
1787 With this option you will be able to detect common bugs in device
1788 drivers like double-freeing of DMA mappings or freeing mappings that
1789 were never allocated.
1790
1791 This also attempts to catch cases where a page owned by DMA is
1792 accessed by the cpu in a way that could cause data corruption. For
1793 example, this enables cow_user_page() to check that the source page is
1794 not undergoing DMA.
1795
1796 This option causes a performance degradation. Use only if you want to
1797 debug device drivers and dma interactions.
1798
1799 If unsure, say N.
1800
1801config TEST_LKM 1800config TEST_LKM
1802 tristate "Test module loading with 'hello world' module" 1801 tristate "Test module loading with 'hello world' module"
1803 default n 1802 default n
@@ -1872,18 +1871,6 @@ config TEST_UDELAY
1872 1871
1873 If unsure, say N. 1872 If unsure, say N.
1874 1873
1875config MEMTEST
1876 bool "Memtest"
1877 depends on HAVE_MEMBLOCK
1878 ---help---
1879 This option adds a kernel parameter 'memtest', which allows memtest
1880 to be set.
1881 memtest=0, mean disabled; -- default
1882 memtest=1, mean do 1 test pattern;
1883 ...
1884 memtest=17, mean do 17 test patterns.
1885 If you are unsure how to answer this question, answer N.
1886
1887config TEST_STATIC_KEYS 1874config TEST_STATIC_KEYS
1888 tristate "Test static keys" 1875 tristate "Test static keys"
1889 default n 1876 default n
@@ -1893,16 +1880,6 @@ config TEST_STATIC_KEYS
1893 1880
1894 If unsure, say N. 1881 If unsure, say N.
1895 1882
1896config BUG_ON_DATA_CORRUPTION
1897 bool "Trigger a BUG when data corruption is detected"
1898 select DEBUG_LIST
1899 help
1900 Select this option if the kernel should BUG when it encounters
1901 data corruption in kernel memory structures when they get checked
1902 for validity.
1903
1904 If unsure, say N.
1905
1906config TEST_KMOD 1883config TEST_KMOD
1907 tristate "kmod stress tester" 1884 tristate "kmod stress tester"
1908 default n 1885 default n
@@ -1940,6 +1917,29 @@ config TEST_DEBUG_VIRTUAL
1940 1917
1941 If unsure, say N. 1918 If unsure, say N.
1942 1919
1920endmenu # runtime tests
1921
1922config MEMTEST
1923 bool "Memtest"
1924 depends on HAVE_MEMBLOCK
1925 ---help---
1926 This option adds a kernel parameter 'memtest', which allows memtest
1927 to be set.
1928 memtest=0, mean disabled; -- default
1929 memtest=1, mean do 1 test pattern;
1930 ...
1931 memtest=17, mean do 17 test patterns.
1932 If you are unsure how to answer this question, answer N.
1933
1934config BUG_ON_DATA_CORRUPTION
1935 bool "Trigger a BUG when data corruption is detected"
1936 select DEBUG_LIST
1937 help
1938 Select this option if the kernel should BUG when it encounters
1939 data corruption in kernel memory structures when they get checked
1940 for validity.
1941
1942 If unsure, say N.
1943 1943
1944source "samples/Kconfig" 1944source "samples/Kconfig"
1945 1945
diff --git a/lib/Makefile b/lib/Makefile
index dafa79613fb4..b8f2c16fccaa 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# Makefile for some libs needed in the kernel. 3# Makefile for some libs needed in the kernel.
3# 4#
diff --git a/lib/argv_split.c b/lib/argv_split.c
index e927ed0e18a8..5c35752a9414 100644
--- a/lib/argv_split.c
+++ b/lib/argv_split.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Helper function for splitting a string into an argv-like array. 3 * Helper function for splitting a string into an argv-like array.
3 */ 4 */
diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c
index 0bd8a611eb83..fef5d2e114be 100644
--- a/lib/asn1_decoder.c
+++ b/lib/asn1_decoder.c
@@ -284,6 +284,9 @@ next_op:
284 if (unlikely(len > datalen - dp)) 284 if (unlikely(len > datalen - dp))
285 goto data_overrun_error; 285 goto data_overrun_error;
286 } 286 }
287 } else {
288 if (unlikely(len > datalen - dp))
289 goto data_overrun_error;
287 } 290 }
288 291
289 if (flags & FLAG_CONS) { 292 if (flags & FLAG_CONS) {
diff --git a/lib/assoc_array.c b/lib/assoc_array.c
index 155c55d8db5f..4e53be8bc590 100644
--- a/lib/assoc_array.c
+++ b/lib/assoc_array.c
@@ -598,21 +598,31 @@ static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit,
598 if ((edit->segment_cache[ASSOC_ARRAY_FAN_OUT] ^ base_seg) == 0) 598 if ((edit->segment_cache[ASSOC_ARRAY_FAN_OUT] ^ base_seg) == 0)
599 goto all_leaves_cluster_together; 599 goto all_leaves_cluster_together;
600 600
601 /* Otherwise we can just insert a new node ahead of the old 601 /* Otherwise all the old leaves cluster in the same slot, but
602 * one. 602 * the new leaf wants to go into a different slot - so we
603 * create a new node (n0) to hold the new leaf and a pointer to
604 * a new node (n1) holding all the old leaves.
605 *
606 * This can be done by falling through to the node splitting
607 * path.
603 */ 608 */
604 goto present_leaves_cluster_but_not_new_leaf; 609 pr_devel("present leaves cluster but not new leaf\n");
605 } 610 }
606 611
607split_node: 612split_node:
608 pr_devel("split node\n"); 613 pr_devel("split node\n");
609 614
610 /* We need to split the current node; we know that the node doesn't 615 /* We need to split the current node. The node must contain anything
611 * simply contain a full set of leaves that cluster together (it 616 * from a single leaf (in the one leaf case, this leaf will cluster
612 * contains meta pointers and/or non-clustering leaves). 617 * with the new leaf) and the rest meta-pointers, to all leaves, some
618 * of which may cluster.
619 *
620 * It won't contain the case in which all the current leaves plus the
621 * new leaves want to cluster in the same slot.
613 * 622 *
614 * We need to expel at least two leaves out of a set consisting of the 623 * We need to expel at least two leaves out of a set consisting of the
615 * leaves in the node and the new leaf. 624 * leaves in the node and the new leaf. The current meta pointers can
625 * just be copied as they shouldn't cluster with any of the leaves.
616 * 626 *
617 * We need a new node (n0) to replace the current one and a new node to 627 * We need a new node (n0) to replace the current one and a new node to
618 * take the expelled nodes (n1). 628 * take the expelled nodes (n1).
@@ -717,33 +727,6 @@ found_slot_for_multiple_occupancy:
717 pr_devel("<--%s() = ok [split node]\n", __func__); 727 pr_devel("<--%s() = ok [split node]\n", __func__);
718 return true; 728 return true;
719 729
720present_leaves_cluster_but_not_new_leaf:
721 /* All the old leaves cluster in the same slot, but the new leaf wants
722 * to go into a different slot, so we create a new node to hold the new
723 * leaf and a pointer to a new node holding all the old leaves.
724 */
725 pr_devel("present leaves cluster but not new leaf\n");
726
727 new_n0->back_pointer = node->back_pointer;
728 new_n0->parent_slot = node->parent_slot;
729 new_n0->nr_leaves_on_branch = node->nr_leaves_on_branch;
730 new_n1->back_pointer = assoc_array_node_to_ptr(new_n0);
731 new_n1->parent_slot = edit->segment_cache[0];
732 new_n1->nr_leaves_on_branch = node->nr_leaves_on_branch;
733 edit->adjust_count_on = new_n0;
734
735 for (i = 0; i < ASSOC_ARRAY_FAN_OUT; i++)
736 new_n1->slots[i] = node->slots[i];
737
738 new_n0->slots[edit->segment_cache[0]] = assoc_array_node_to_ptr(new_n0);
739 edit->leaf_p = &new_n0->slots[edit->segment_cache[ASSOC_ARRAY_FAN_OUT]];
740
741 edit->set[0].ptr = &assoc_array_ptr_to_node(node->back_pointer)->slots[node->parent_slot];
742 edit->set[0].to = assoc_array_node_to_ptr(new_n0);
743 edit->excised_meta[0] = assoc_array_node_to_ptr(node);
744 pr_devel("<--%s() = ok [insert node before]\n", __func__);
745 return true;
746
747all_leaves_cluster_together: 730all_leaves_cluster_together:
748 /* All the leaves, new and old, want to cluster together in this node 731 /* All the leaves, new and old, want to cluster together in this node
749 * in the same slot, so we have to replace this node with a shortcut to 732 * in the same slot, so we have to replace this node with a shortcut to
diff --git a/lib/audit.c b/lib/audit.c
index b8fb5ee81e26..5004bff928a7 100644
--- a/lib/audit.c
+++ b/lib/audit.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/init.h> 2#include <linux/init.h>
2#include <linux/types.h> 3#include <linux/types.h>
3#include <linux/audit.h> 4#include <linux/audit.h>
diff --git a/lib/bcd.c b/lib/bcd.c
index 40d304efe272..7e4750b6e801 100644
--- a/lib/bcd.c
+++ b/lib/bcd.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/bcd.h> 2#include <linux/bcd.h>
2#include <linux/export.h> 3#include <linux/export.h>
3 4
diff --git a/lib/bug.c b/lib/bug.c
index a6a1137d06db..1e094408c893 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 Generic support for BUG() 3 Generic support for BUG()
3 4
diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c
index f8e0e5367398..ab719495e2cb 100644
--- a/lib/bust_spinlocks.c
+++ b/lib/bust_spinlocks.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * lib/bust_spinlocks.c 3 * lib/bust_spinlocks.c
3 * 4 *
diff --git a/lib/check_signature.c b/lib/check_signature.c
index 6b49797980c4..43a7301da7ab 100644
--- a/lib/check_signature.c
+++ b/lib/check_signature.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/io.h> 2#include <linux/io.h>
2#include <linux/export.h> 3#include <linux/export.h>
3 4
diff --git a/lib/clz_tab.c b/lib/clz_tab.c
index 7287b4a991a7..b6118d09f244 100644
--- a/lib/clz_tab.c
+++ b/lib/clz_tab.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1const unsigned char __clz_tab[] = { 2const unsigned char __clz_tab[] = {
2 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 3 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5,
3 5, 5, 5, 5, 5, 5, 5, 5, 4 5, 5, 5, 5, 5, 5, 5, 5,
diff --git a/lib/compat_audit.c b/lib/compat_audit.c
index 873f75b640ab..77eabad69b4a 100644
--- a/lib/compat_audit.c
+++ b/lib/compat_audit.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/init.h> 2#include <linux/init.h>
2#include <linux/types.h> 3#include <linux/types.h>
3#include <asm/unistd32.h> 4#include <asm/unistd32.h>
diff --git a/lib/cpumask.c b/lib/cpumask.c
index 8b1a1bd77539..35fe142ebb5e 100644
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/slab.h> 2#include <linux/slab.h>
2#include <linux/kernel.h> 3#include <linux/kernel.h>
3#include <linux/bitops.h> 4#include <linux/bitops.h>
diff --git a/lib/crc32defs.h b/lib/crc32defs.h
index 64cba2c3c700..cb275a28a750 100644
--- a/lib/crc32defs.h
+++ b/lib/crc32defs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * There are multiple 16-bit CRC polynomials in common use, but this is 3 * There are multiple 16-bit CRC polynomials in common use, but this is
3 * *the* standard CRC-32 polynomial, first popularized by Ethernet. 4 * *the* standard CRC-32 polynomial, first popularized by Ethernet.
diff --git a/lib/ctype.c b/lib/ctype.c
index c646df91a2f7..c819fe269eb2 100644
--- a/lib/ctype.c
+++ b/lib/ctype.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * linux/lib/ctype.c 3 * linux/lib/ctype.c
3 * 4 *
diff --git a/lib/debug_info.c b/lib/debug_info.c
index 2edbe27517ed..36daf753293c 100644
--- a/lib/debug_info.c
+++ b/lib/debug_info.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * This file exists solely to ensure debug information for some core 3 * This file exists solely to ensure debug information for some core
3 * data structures is included in the final image even for 4 * data structures is included in the final image even for
diff --git a/lib/dec_and_lock.c b/lib/dec_and_lock.c
index e26278576b31..347fa7ac2e8a 100644
--- a/lib/dec_and_lock.c
+++ b/lib/dec_and_lock.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/export.h> 2#include <linux/export.h>
2#include <linux/spinlock.h> 3#include <linux/spinlock.h>
3#include <linux/atomic.h> 4#include <linux/atomic.h>
diff --git a/lib/decompress.c b/lib/decompress.c
index 62696dff5730..857ab1af1ef3 100644
--- a/lib/decompress.c
+++ b/lib/decompress.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * decompress.c 3 * decompress.c
3 * 4 *
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
index 555c06bf20da..63b4b7eee138 100644
--- a/lib/decompress_inflate.c
+++ b/lib/decompress_inflate.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#ifdef STATIC 2#ifdef STATIC
2#define PREBOOT 3#define PREBOOT
3/* Pre-boot environment: included */ 4/* Pre-boot environment: included */
diff --git a/lib/devres.c b/lib/devres.c
index 78eca713b1d9..5f2aedd58bc5 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/err.h> 2#include <linux/err.h>
2#include <linux/pci.h> 3#include <linux/pci.h>
3#include <linux/io.h> 4#include <linux/io.h>
diff --git a/lib/digsig.c b/lib/digsig.c
index 03d7c63837ae..6ba6fcd92dd1 100644
--- a/lib/digsig.c
+++ b/lib/digsig.c
@@ -87,6 +87,12 @@ static int digsig_verify_rsa(struct key *key,
87 down_read(&key->sem); 87 down_read(&key->sem);
88 ukp = user_key_payload_locked(key); 88 ukp = user_key_payload_locked(key);
89 89
90 if (!ukp) {
91 /* key was revoked before we acquired its semaphore */
92 err = -EKEYREVOKED;
93 goto err1;
94 }
95
90 if (ukp->datalen < sizeof(*pkh)) 96 if (ukp->datalen < sizeof(*pkh))
91 goto err1; 97 goto err1;
92 98
diff --git a/lib/div64.c b/lib/div64.c
index 7f345259c32f..58e2a404097e 100644
--- a/lib/div64.c
+++ b/lib/div64.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2003 Bernardo Innocenti <bernie@develer.com> 3 * Copyright (C) 2003 Bernardo Innocenti <bernie@develer.com>
3 * 4 *
diff --git a/lib/dma-noop.c b/lib/dma-noop.c
index acc4190e2731..a10185b0c2d4 100644
--- a/lib/dma-noop.c
+++ b/lib/dma-noop.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * lib/dma-noop.c 3 * lib/dma-noop.c
3 * 4 *
diff --git a/lib/dma-virt.c b/lib/dma-virt.c
index 5c4f11329721..8e61a02ef9ca 100644
--- a/lib/dma-virt.c
+++ b/lib/dma-virt.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * lib/dma-virt.c 3 * lib/dma-virt.c
3 * 4 *
diff --git a/lib/dump_stack.c b/lib/dump_stack.c
index 625375e7f11f..c5edbedd364d 100644
--- a/lib/dump_stack.c
+++ b/lib/dump_stack.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Provide a default dump_stack() function for architectures 3 * Provide a default dump_stack() function for architectures
3 * which don't implement their own. 4 * which don't implement their own.
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index f346715e2255..6a406fafb5d6 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Dynamic byte queue limits. See include/linux/dynamic_queue_limits.h 3 * Dynamic byte queue limits. See include/linux/dynamic_queue_limits.h
3 * 4 *
diff --git a/lib/errseq.c b/lib/errseq.c
index 7b900c2a277a..79cc66897db4 100644
--- a/lib/errseq.c
+++ b/lib/errseq.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/err.h> 2#include <linux/err.h>
2#include <linux/bug.h> 3#include <linux/bug.h>
3#include <linux/atomic.h> 4#include <linux/atomic.h>
diff --git a/lib/flex_proportions.c b/lib/flex_proportions.c
index 2cc1f94e03a1..7852bfff50b1 100644
--- a/lib/flex_proportions.c
+++ b/lib/flex_proportions.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Floating proportions with flexible aging period 3 * Floating proportions with flexible aging period
3 * 4 *
diff --git a/lib/fonts/Makefile b/lib/fonts/Makefile
index e04d010cfbf5..d56f02dea83a 100644
--- a/lib/fonts/Makefile
+++ b/lib/fonts/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Font handling 2# Font handling
2 3
3font-objs := fonts.o 4font-objs := fonts.o
diff --git a/lib/fonts/font_10x18.c b/lib/fonts/font_10x18.c
index 6be72bb218ee..532f0ff89a96 100644
--- a/lib/fonts/font_10x18.c
+++ b/lib/fonts/font_10x18.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/******************************** 2/********************************
2 * adapted from font_sun12x22.c * 3 * adapted from font_sun12x22.c *
3 * by Jurriaan Kalkman 06-2005 * 4 * by Jurriaan Kalkman 06-2005 *
diff --git a/lib/fonts/font_6x10.c b/lib/fonts/font_6x10.c
index b20620904d31..09b2cc03435b 100644
--- a/lib/fonts/font_6x10.c
+++ b/lib/fonts/font_6x10.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/font.h> 2#include <linux/font.h>
2 3
3static const unsigned char fontdata_6x10[] = { 4static const unsigned char fontdata_6x10[] = {
diff --git a/lib/fonts/font_6x11.c b/lib/fonts/font_6x11.c
index 46e86e67aa6a..d7136c33f1f0 100644
--- a/lib/fonts/font_6x11.c
+++ b/lib/fonts/font_6x11.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/**********************************************/ 2/**********************************************/
2/* */ 3/* */
3/* Font file generated by rthelen */ 4/* Font file generated by rthelen */
diff --git a/lib/fonts/font_7x14.c b/lib/fonts/font_7x14.c
index 3b7dbf9c060b..9ae5b62c8a0d 100644
--- a/lib/fonts/font_7x14.c
+++ b/lib/fonts/font_7x14.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/**************************************/ 2/**************************************/
2/* this file adapted from font_8x16.c */ 3/* this file adapted from font_8x16.c */
3/* by Jurriaan Kalkman 05-2005 */ 4/* by Jurriaan Kalkman 05-2005 */
diff --git a/lib/fonts/font_8x16.c b/lib/fonts/font_8x16.c
index 00a0c67a5c7d..34292cdfaa23 100644
--- a/lib/fonts/font_8x16.c
+++ b/lib/fonts/font_8x16.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/**********************************************/ 2/**********************************************/
2/* */ 3/* */
3/* Font file generated by cpi2fnt */ 4/* Font file generated by cpi2fnt */
diff --git a/lib/fonts/font_8x8.c b/lib/fonts/font_8x8.c
index 9f56efe2cee7..751becf3c521 100644
--- a/lib/fonts/font_8x8.c
+++ b/lib/fonts/font_8x8.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/**********************************************/ 2/**********************************************/
2/* */ 3/* */
3/* Font file generated by cpi2fnt */ 4/* Font file generated by cpi2fnt */
diff --git a/lib/fonts/font_acorn_8x8.c b/lib/fonts/font_acorn_8x8.c
index 639e31ae1100..0ff0e85d4481 100644
--- a/lib/fonts/font_acorn_8x8.c
+++ b/lib/fonts/font_acorn_8x8.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* Acorn-like font definition, with PC graphics characters */ 2/* Acorn-like font definition, with PC graphics characters */
2 3
3#include <linux/font.h> 4#include <linux/font.h>
diff --git a/lib/fonts/font_pearl_8x8.c b/lib/fonts/font_pearl_8x8.c
index dc6ad539ca4e..b0514c0a7445 100644
--- a/lib/fonts/font_pearl_8x8.c
+++ b/lib/fonts/font_pearl_8x8.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/**********************************************/ 2/**********************************************/
2/* */ 3/* */
3/* Font file generated by cpi2fnt */ 4/* Font file generated by cpi2fnt */
diff --git a/lib/fonts/font_sun12x22.c b/lib/fonts/font_sun12x22.c
index d3643853c33a..955d6eee3959 100644
--- a/lib/fonts/font_sun12x22.c
+++ b/lib/fonts/font_sun12x22.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/font.h> 2#include <linux/font.h>
2 3
3#define FONTDATAMAX 11264 4#define FONTDATAMAX 11264
diff --git a/lib/fonts/font_sun8x16.c b/lib/fonts/font_sun8x16.c
index 268151325b83..03d71e53954a 100644
--- a/lib/fonts/font_sun8x16.c
+++ b/lib/fonts/font_sun8x16.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/font.h> 2#include <linux/font.h>
2 3
3#define FONTDATAMAX 4096 4#define FONTDATAMAX 4096
diff --git a/lib/gen_crc32table.c b/lib/gen_crc32table.c
index d83a372fa76f..8f26660ea10a 100644
--- a/lib/gen_crc32table.c
+++ b/lib/gen_crc32table.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include "../include/generated/autoconf.h" 3#include "../include/generated/autoconf.h"
3#include "crc32defs.h" 4#include "crc32defs.h"
diff --git a/lib/hweight.c b/lib/hweight.c
index 43273a7d83cf..7660d88fd496 100644
--- a/lib/hweight.c
+++ b/lib/hweight.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/export.h> 2#include <linux/export.h>
2#include <linux/bitops.h> 3#include <linux/bitops.h>
3#include <asm/types.h> 4#include <asm/types.h>
diff --git a/lib/idr.c b/lib/idr.c
index f9adf4805fd7..edd9b2be1651 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -146,8 +146,8 @@ EXPORT_SYMBOL(idr_get_next_ext);
146 * idr_alloc() and idr_remove() (as long as the ID being removed is not 146 * idr_alloc() and idr_remove() (as long as the ID being removed is not
147 * the one being replaced!). 147 * the one being replaced!).
148 * 148 *
149 * Returns: 0 on success. %-ENOENT indicates that @id was not found. 149 * Returns: the old value on success. %-ENOENT indicates that @id was not
150 * %-EINVAL indicates that @id or @ptr were not valid. 150 * found. %-EINVAL indicates that @id or @ptr were not valid.
151 */ 151 */
152void *idr_replace(struct idr *idr, void *ptr, int id) 152void *idr_replace(struct idr *idr, void *ptr, int id)
153{ 153{
diff --git a/lib/inflate.c b/lib/inflate.c
index 013a76193481..fbaf03c1748d 100644
--- a/lib/inflate.c
+++ b/lib/inflate.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define DEBG(x) 2#define DEBG(x)
2#define DEBG1(x) 3#define DEBG1(x)
3/* inflate.c -- Not copyrighted 1992 by Mark Adler 4/* inflate.c -- Not copyrighted 1992 by Mark Adler
diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c
index 1ef4cc344977..db0b5aa071fc 100644
--- a/lib/int_sqrt.c
+++ b/lib/int_sqrt.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2013 Davidlohr Bueso <davidlohr.bueso@hp.com> 3 * Copyright (C) 2013 Davidlohr Bueso <davidlohr.bueso@hp.com>
3 * 4 *
diff --git a/lib/iomap.c b/lib/iomap.c
index fc3dcb4b238e..541d926da95e 100644
--- a/lib/iomap.c
+++ b/lib/iomap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Implement the default iomap interfaces 3 * Implement the default iomap interfaces
3 * 4 *
diff --git a/lib/iommu-common.c b/lib/iommu-common.c
index 858dc1aae478..55b00de106b5 100644
--- a/lib/iommu-common.c
+++ b/lib/iommu-common.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * IOMMU mmap management and range allocation functions. 3 * IOMMU mmap management and range allocation functions.
3 * Based almost entirely upon the powerpc iommu allocator. 4 * Based almost entirely upon the powerpc iommu allocator.
diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c
index a816f3a80625..23633c0fda4a 100644
--- a/lib/iommu-helper.c
+++ b/lib/iommu-helper.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * IOMMU helper functions for the free area management 3 * IOMMU helper functions for the free area management
3 */ 4 */
diff --git a/lib/ioremap.c b/lib/ioremap.c
index 4bb30206b942..b808a390e4c3 100644
--- a/lib/ioremap.c
+++ b/lib/ioremap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Re-map IO memory to kernel address space so that we can access it. 3 * Re-map IO memory to kernel address space so that we can access it.
3 * This is needed for high PCI addresses that aren't mapped in the 4 * This is needed for high PCI addresses that aren't mapped in the
@@ -161,6 +162,7 @@ int ioremap_page_range(unsigned long addr,
161 unsigned long next; 162 unsigned long next;
162 int err; 163 int err;
163 164
165 might_sleep();
164 BUG_ON(addr >= end); 166 BUG_ON(addr >= end);
165 167
166 start = addr; 168 start = addr;
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 52c8dd6d8e82..1c1c06ddc20a 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -687,8 +687,10 @@ EXPORT_SYMBOL(_copy_from_iter_full_nocache);
687 687
688static inline bool page_copy_sane(struct page *page, size_t offset, size_t n) 688static inline bool page_copy_sane(struct page *page, size_t offset, size_t n)
689{ 689{
690 size_t v = n + offset; 690 struct page *head = compound_head(page);
691 if (likely(n <= v && v <= (PAGE_SIZE << compound_order(page)))) 691 size_t v = n + offset + page_address(page) - page_address(head);
692
693 if (likely(n <= v && v <= (PAGE_SIZE << compound_order(head))))
692 return true; 694 return true;
693 WARN_ON(1); 695 WARN_ON(1);
694 return false; 696 return false;
diff --git a/lib/irq_poll.c b/lib/irq_poll.c
index 1d6565e81030..86a709954f5a 100644
--- a/lib/irq_poll.c
+++ b/lib/irq_poll.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Functions related to interrupt-poll handling in the block layer. This 3 * Functions related to interrupt-poll handling in the block layer. This
3 * is similar to NAPI for network devices. 4 * is similar to NAPI for network devices.
diff --git a/lib/kasprintf.c b/lib/kasprintf.c
index 7f6c506a4942..bacf7b83ccf0 100644
--- a/lib/kasprintf.c
+++ b/lib/kasprintf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * linux/lib/kasprintf.c 3 * linux/lib/kasprintf.c
3 * 4 *
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index e590523ea476..f237a09a5862 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -294,6 +294,26 @@ static void cleanup_uevent_env(struct subprocess_info *info)
294} 294}
295#endif 295#endif
296 296
297static void zap_modalias_env(struct kobj_uevent_env *env)
298{
299 static const char modalias_prefix[] = "MODALIAS=";
300 int i;
301
302 for (i = 0; i < env->envp_idx;) {
303 if (strncmp(env->envp[i], modalias_prefix,
304 sizeof(modalias_prefix) - 1)) {
305 i++;
306 continue;
307 }
308
309 if (i != env->envp_idx - 1)
310 memmove(&env->envp[i], &env->envp[i + 1],
311 sizeof(env->envp[i]) * env->envp_idx - 1);
312
313 env->envp_idx--;
314 }
315}
316
297/** 317/**
298 * kobject_uevent_env - send an uevent with environmental data 318 * kobject_uevent_env - send an uevent with environmental data
299 * 319 *
@@ -409,16 +429,29 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
409 } 429 }
410 } 430 }
411 431
412 /* 432 switch (action) {
413 * Mark "add" and "remove" events in the object to ensure proper 433 case KOBJ_ADD:
414 * events to userspace during automatic cleanup. If the object did 434 /*
415 * send an "add" event, "remove" will automatically generated by 435 * Mark "add" event so we can make sure we deliver "remove"
416 * the core, if not already done by the caller. 436 * event to userspace during automatic cleanup. If
417 */ 437 * the object did send an "add" event, "remove" will
418 if (action == KOBJ_ADD) 438 * automatically generated by the core, if not already done
439 * by the caller.
440 */
419 kobj->state_add_uevent_sent = 1; 441 kobj->state_add_uevent_sent = 1;
420 else if (action == KOBJ_REMOVE) 442 break;
443
444 case KOBJ_REMOVE:
421 kobj->state_remove_uevent_sent = 1; 445 kobj->state_remove_uevent_sent = 1;
446 break;
447
448 case KOBJ_UNBIND:
449 zap_modalias_env(env);
450 break;
451
452 default:
453 break;
454 }
422 455
423 mutex_lock(&uevent_sock_mutex); 456 mutex_lock(&uevent_sock_mutex);
424 /* we will send an event, so request a new sequence number */ 457 /* we will send an event, so request a new sequence number */
diff --git a/lib/kstrtox.c b/lib/kstrtox.c
index 720144075c1e..661a1e807bd1 100644
--- a/lib/kstrtox.c
+++ b/lib/kstrtox.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Convert integer string representation to an integer. 3 * Convert integer string representation to an integer.
3 * If an integer doesn't fit into specified type, -E is returned. 4 * If an integer doesn't fit into specified type, -E is returned.
diff --git a/lib/kstrtox.h b/lib/kstrtox.h
index f13eeeaf441d..3b4637bcd254 100644
--- a/lib/kstrtox.h
+++ b/lib/kstrtox.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIB_KSTRTOX_H 2#ifndef _LIB_KSTRTOX_H
2#define _LIB_KSTRTOX_H 3#define _LIB_KSTRTOX_H
3 4
diff --git a/lib/list_sort.c b/lib/list_sort.c
index 9e9acc37652f..85759928215b 100644
--- a/lib/list_sort.c
+++ b/lib/list_sort.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include <linux/bug.h> 3#include <linux/bug.h>
3#include <linux/compiler.h> 4#include <linux/compiler.h>
diff --git a/lib/locking-selftest-hardirq.h b/lib/locking-selftest-hardirq.h
index 10d4a150b259..0d144a6d6a96 100644
--- a/lib/locking-selftest-hardirq.h
+++ b/lib/locking-selftest-hardirq.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#undef IRQ_DISABLE 2#undef IRQ_DISABLE
2#undef IRQ_ENABLE 3#undef IRQ_ENABLE
3#undef IRQ_ENTER 4#undef IRQ_ENTER
diff --git a/lib/locking-selftest-mutex.h b/lib/locking-selftest-mutex.h
index 68601b6f584b..7526c7746fb2 100644
--- a/lib/locking-selftest-mutex.h
+++ b/lib/locking-selftest-mutex.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#undef LOCK 2#undef LOCK
2#define LOCK ML 3#define LOCK ML
3 4
diff --git a/lib/locking-selftest-rlock.h b/lib/locking-selftest-rlock.h
index 6789044f4d0e..eccab18f5584 100644
--- a/lib/locking-selftest-rlock.h
+++ b/lib/locking-selftest-rlock.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#undef LOCK 2#undef LOCK
2#define LOCK RL 3#define LOCK RL
3 4
diff --git a/lib/locking-selftest-rsem.h b/lib/locking-selftest-rsem.h
index 62da886680c7..4544858f922e 100644
--- a/lib/locking-selftest-rsem.h
+++ b/lib/locking-selftest-rsem.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#undef LOCK 2#undef LOCK
2#define LOCK RSL 3#define LOCK RSL
3 4
diff --git a/lib/locking-selftest-rtmutex.h b/lib/locking-selftest-rtmutex.h
index e3cb83989d16..fce8714c4170 100644
--- a/lib/locking-selftest-rtmutex.h
+++ b/lib/locking-selftest-rtmutex.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#undef LOCK 2#undef LOCK
2#define LOCK RTL 3#define LOCK RTL
3 4
diff --git a/lib/locking-selftest-softirq.h b/lib/locking-selftest-softirq.h
index a83de2a04ace..6adde4867cb8 100644
--- a/lib/locking-selftest-softirq.h
+++ b/lib/locking-selftest-softirq.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#undef IRQ_DISABLE 2#undef IRQ_DISABLE
2#undef IRQ_ENABLE 3#undef IRQ_ENABLE
3#undef IRQ_ENTER 4#undef IRQ_ENTER
diff --git a/lib/locking-selftest-spin.h b/lib/locking-selftest-spin.h
index ccd1b4b09757..6b24d699e502 100644
--- a/lib/locking-selftest-spin.h
+++ b/lib/locking-selftest-spin.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#undef LOCK 2#undef LOCK
2#define LOCK L 3#define LOCK L
3 4
diff --git a/lib/locking-selftest-wlock.h b/lib/locking-selftest-wlock.h
index 0815322d99ed..0bc51c8cf3c5 100644
--- a/lib/locking-selftest-wlock.h
+++ b/lib/locking-selftest-wlock.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#undef LOCK 2#undef LOCK
2#define LOCK WL 3#define LOCK WL
3 4
diff --git a/lib/locking-selftest-wsem.h b/lib/locking-selftest-wsem.h
index b88c5f2dc5f0..5ef18f931c9b 100644
--- a/lib/locking-selftest-wsem.h
+++ b/lib/locking-selftest-wsem.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#undef LOCK 2#undef LOCK
2#define LOCK WSL 3#define LOCK WSL
3 4
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
index cd0b5c964bd0..b5c1293ce147 100644
--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * lib/locking-selftest.c 3 * lib/locking-selftest.c
3 * 4 *
@@ -2031,11 +2032,13 @@ void locking_selftest(void)
2031 print_testname("mixed read-lock/lock-write ABBA"); 2032 print_testname("mixed read-lock/lock-write ABBA");
2032 pr_cont(" |"); 2033 pr_cont(" |");
2033 dotest(rlock_ABBA1, FAILURE, LOCKTYPE_RWLOCK); 2034 dotest(rlock_ABBA1, FAILURE, LOCKTYPE_RWLOCK);
2035#ifdef CONFIG_PROVE_LOCKING
2034 /* 2036 /*
2035 * Lockdep does indeed fail here, but there's nothing we can do about 2037 * Lockdep does indeed fail here, but there's nothing we can do about
2036 * that now. Don't kill lockdep for it. 2038 * that now. Don't kill lockdep for it.
2037 */ 2039 */
2038 unexpected_testcase_failures--; 2040 unexpected_testcase_failures--;
2041#endif
2039 2042
2040 pr_cont(" |"); 2043 pr_cont(" |");
2041 dotest(rwsem_ABBA1, FAILURE, LOCKTYPE_RWSEM); 2044 dotest(rwsem_ABBA1, FAILURE, LOCKTYPE_RWSEM);
diff --git a/lib/lockref.c b/lib/lockref.c
index c4bfcb8836cd..47169ed7e964 100644
--- a/lib/lockref.c
+++ b/lib/lockref.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/export.h> 2#include <linux/export.h>
2#include <linux/lockref.h> 3#include <linux/lockref.h>
3 4
diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c
index bd3574312b82..141734d255e4 100644
--- a/lib/lz4/lz4_decompress.c
+++ b/lib/lz4/lz4_decompress.c
@@ -85,8 +85,8 @@ static FORCE_INLINE int LZ4_decompress_generic(
85 const BYTE * const lowLimit = lowPrefix - dictSize; 85 const BYTE * const lowLimit = lowPrefix - dictSize;
86 86
87 const BYTE * const dictEnd = (const BYTE *)dictStart + dictSize; 87 const BYTE * const dictEnd = (const BYTE *)dictStart + dictSize;
88 const unsigned int dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 }; 88 static const unsigned int dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 };
89 const int dec64table[] = { 0, 0, 0, -1, 0, 1, 2, 3 }; 89 static const int dec64table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
90 90
91 const int safeDecode = (endOnInput == endOnInputSize); 91 const int safeDecode = (endOnInput == endOnInputSize);
92 const int checkOffset = ((safeDecode) && (dictSize < (int)(64 * KB))); 92 const int checkOffset = ((safeDecode) && (dictSize < (int)(64 * KB)));
diff --git a/lib/lzo/lzodefs.h b/lib/lzo/lzodefs.h
index 6710b83ce72e..4edefd2f540c 100644
--- a/lib/lzo/lzodefs.h
+++ b/lib/lzo/lzodefs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * lzodefs.h -- architecture, OS and compiler specific defines 3 * lzodefs.h -- architecture, OS and compiler specific defines
3 * 4 *
diff --git a/lib/memweight.c b/lib/memweight.c
index e35fc8771893..94dd72ccaa7f 100644
--- a/lib/memweight.c
+++ b/lib/memweight.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/export.h> 2#include <linux/export.h>
2#include <linux/bug.h> 3#include <linux/bug.h>
3#include <linux/bitmap.h> 4#include <linux/bitmap.h>
diff --git a/lib/mpi/Makefile b/lib/mpi/Makefile
index 019a68c90144..d5874a7f5ff9 100644
--- a/lib/mpi/Makefile
+++ b/lib/mpi/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# MPI multiprecision maths library (from gpg) 3# MPI multiprecision maths library (from gpg)
3# 4#
diff --git a/lib/net_utils.c b/lib/net_utils.c
index 148fc6e99ef6..af525353395d 100644
--- a/lib/net_utils.c
+++ b/lib/net_utils.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/string.h> 2#include <linux/string.h>
2#include <linux/if_ether.h> 3#include <linux/if_ether.h>
3#include <linux/ctype.h> 4#include <linux/ctype.h>
diff --git a/lib/nlattr.c b/lib/nlattr.c
index 927c2f19f119..3d8295c85505 100644
--- a/lib/nlattr.c
+++ b/lib/nlattr.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * NETLINK Netlink attributes 3 * NETLINK Netlink attributes
3 * 4 *
diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c
index 0bc0a3535a8a..46e4c749e4eb 100644
--- a/lib/nmi_backtrace.c
+++ b/lib/nmi_backtrace.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * NMI backtrace support 3 * NMI backtrace support
3 * 4 *
diff --git a/lib/nodemask.c b/lib/nodemask.c
index e42a5bf44d33..3aa454c54c0d 100644
--- a/lib/nodemask.c
+++ b/lib/nodemask.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/nodemask.h> 2#include <linux/nodemask.h>
2#include <linux/module.h> 3#include <linux/module.h>
3#include <linux/random.h> 4#include <linux/random.h>
diff --git a/lib/notifier-error-inject.h b/lib/notifier-error-inject.h
index 99b3b6fc470b..fafff5f2ac45 100644
--- a/lib/notifier-error-inject.h
+++ b/lib/notifier-error-inject.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <linux/atomic.h> 2#include <linux/atomic.h>
2#include <linux/debugfs.h> 3#include <linux/debugfs.h>
3#include <linux/notifier.h> 4#include <linux/notifier.h>
diff --git a/lib/once.c b/lib/once.c
index 05c8604627eb..bfb7420d0de3 100644
--- a/lib/once.c
+++ b/lib/once.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/slab.h> 2#include <linux/slab.h>
2#include <linux/spinlock.h> 3#include <linux/spinlock.h>
3#include <linux/once.h> 4#include <linux/once.h>
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c
index 3bf4a9984f4c..c72577e472f2 100644
--- a/lib/percpu_counter.c
+++ b/lib/percpu_counter.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Fast batching percpu counters. 3 * Fast batching percpu counters.
3 */ 4 */
diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile
index a93adf6dcfb2..4add700ddfe3 100644
--- a/lib/raid6/Makefile
+++ b/lib/raid6/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1obj-$(CONFIG_RAID6_PQ) += raid6_pq.o 2obj-$(CONFIG_RAID6_PQ) += raid6_pq.o
2 3
3raid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \ 4raid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \
diff --git a/lib/raid6/recov_s390xc.c b/lib/raid6/recov_s390xc.c
index b042dac826cc..179eec900cea 100644
--- a/lib/raid6/recov_s390xc.c
+++ b/lib/raid6/recov_s390xc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * RAID-6 data recovery in dual failure mode based on the XC instruction. 3 * RAID-6 data recovery in dual failure mode based on the XC instruction.
3 * 4 *
diff --git a/lib/raid6/s390vx.uc b/lib/raid6/s390vx.uc
index 7b45191a655f..140fa8bb5c23 100644
--- a/lib/raid6/s390vx.uc
+++ b/lib/raid6/s390vx.uc
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * raid6_vx$#.c 3 * raid6_vx$#.c
3 * 4 *
diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile
index 2c7b60edea04..be1010bdc435 100644
--- a/lib/raid6/test/Makefile
+++ b/lib/raid6/test/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# This is a simple Makefile to test some of the RAID-6 code 3# This is a simple Makefile to test some of the RAID-6 code
3# from userspace. 4# from userspace.
diff --git a/lib/random32.c b/lib/random32.c
index fa594b1140e6..0a90cb0e0fb6 100644
--- a/lib/random32.c
+++ b/lib/random32.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * This is a maximally equidistributed combined Tausworthe generator 3 * This is a maximally equidistributed combined Tausworthe generator
3 * based on code from GNU Scientific Library 1.5 (30 Jun 2004) 4 * based on code from GNU Scientific Library 1.5 (30 Jun 2004)
diff --git a/lib/ratelimit.c b/lib/ratelimit.c
index 08f8043cac61..d01f47135239 100644
--- a/lib/ratelimit.c
+++ b/lib/ratelimit.c
@@ -48,7 +48,9 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
48 if (time_is_before_jiffies(rs->begin + rs->interval)) { 48 if (time_is_before_jiffies(rs->begin + rs->interval)) {
49 if (rs->missed) { 49 if (rs->missed) {
50 if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) { 50 if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) {
51 pr_warn("%s: %d callbacks suppressed\n", func, rs->missed); 51 printk_deferred(KERN_WARNING
52 "%s: %d callbacks suppressed\n",
53 func, rs->missed);
52 rs->missed = 0; 54 rs->missed = 0;
53 } 55 }
54 } 56 }
diff --git a/lib/rational.c b/lib/rational.c
index f0aa21c2a762..ba7443677c90 100644
--- a/lib/rational.c
+++ b/lib/rational.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * rational fractions 3 * rational fractions
3 * 4 *
diff --git a/lib/reciprocal_div.c b/lib/reciprocal_div.c
index 464152410c51..fcb4ce682c6f 100644
--- a/lib/reciprocal_div.c
+++ b/lib/reciprocal_div.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include <asm/div64.h> 3#include <asm/div64.h>
3#include <linux/reciprocal_div.h> 4#include <linux/reciprocal_div.h>
diff --git a/lib/refcount.c b/lib/refcount.c
index 5d0582a9480c..0eb48353abe3 100644
--- a/lib/refcount.c
+++ b/lib/refcount.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Variant of atomic_t specialized for reference counts. 3 * Variant of atomic_t specialized for reference counts.
3 * 4 *
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 707ca5d677c6..ddd7dde87c3c 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -735,9 +735,9 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit);
735 * rhashtable_walk_start - Start a hash table walk 735 * rhashtable_walk_start - Start a hash table walk
736 * @iter: Hash table iterator 736 * @iter: Hash table iterator
737 * 737 *
738 * Start a hash table walk. Note that we take the RCU lock in all 738 * Start a hash table walk at the current iterator position. Note that we take
739 * cases including when we return an error. So you must always call 739 * the RCU lock in all cases including when we return an error. So you must
740 * rhashtable_walk_stop to clean up. 740 * always call rhashtable_walk_stop to clean up.
741 * 741 *
742 * Returns zero if successful. 742 * Returns zero if successful.
743 * 743 *
@@ -846,7 +846,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
846 * rhashtable_walk_stop - Finish a hash table walk 846 * rhashtable_walk_stop - Finish a hash table walk
847 * @iter: Hash table iterator 847 * @iter: Hash table iterator
848 * 848 *
849 * Finish a hash table walk. 849 * Finish a hash table walk. Does not reset the iterator to the start of the
850 * hash table.
850 */ 851 */
851void rhashtable_walk_stop(struct rhashtable_iter *iter) 852void rhashtable_walk_stop(struct rhashtable_iter *iter)
852 __releases(RCU) 853 __releases(RCU)
diff --git a/lib/seq_buf.c b/lib/seq_buf.c
index cb18469e1f49..11f2ae0f9099 100644
--- a/lib/seq_buf.c
+++ b/lib/seq_buf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * seq_buf.c 3 * seq_buf.c
3 * 4 *
diff --git a/lib/sha1.c b/lib/sha1.c
index 5a56dfd7b99d..1d96d2c02b82 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * SHA1 routine optimized to do word accesses rather than byte accesses, 3 * SHA1 routine optimized to do word accesses rather than byte accesses,
3 * and to avoid unnecessary copies into the context array. 4 * and to avoid unnecessary copies into the context array.
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index 2fb007be0212..835cc6df2776 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * lib/smp_processor_id.c 3 * lib/smp_processor_id.c
3 * 4 *
diff --git a/lib/sort.c b/lib/sort.c
index 975c6ef6fec7..d6b7a202b0b6 100644
--- a/lib/sort.c
+++ b/lib/sort.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * A fast, small, non-recursive O(nlog n) sort for the Linux kernel 3 * A fast, small, non-recursive O(nlog n) sort for the Linux kernel
3 * 4 *
diff --git a/lib/string.c b/lib/string.c
index 9921dc202db4..5e8d410a93df 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * linux/lib/string.c 3 * linux/lib/string.c
3 * 4 *
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
index 7e35fc450c5b..b53e1b5d80f4 100644
--- a/lib/strncpy_from_user.c
+++ b/lib/strncpy_from_user.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <linux/export.h> 3#include <linux/export.h>
3#include <linux/kasan-checks.h> 4#include <linux/kasan-checks.h>
diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
index a5f567747ced..60d0bbda8f5e 100644
--- a/lib/strnlen_user.c
+++ b/lib/strnlen_user.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include <linux/export.h> 3#include <linux/export.h>
3#include <linux/uaccess.h> 4#include <linux/uaccess.h>
diff --git a/lib/syscall.c b/lib/syscall.c
index 2c6cd1b5c3ea..1a7077f20eae 100644
--- a/lib/syscall.c
+++ b/lib/syscall.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/ptrace.h> 2#include <linux/ptrace.h>
2#include <linux/sched.h> 3#include <linux/sched.h>
3#include <linux/sched/task_stack.h> 4#include <linux/sched/task_stack.h>
diff --git a/lib/ts_fsm.c b/lib/ts_fsm.c
index 5696a35184e4..69557c74ef9f 100644
--- a/lib/ts_fsm.c
+++ b/lib/ts_fsm.c
@@ -11,7 +11,7 @@
11 * ========================================================================== 11 * ==========================================================================
12 * 12 *
13 * A finite state machine consists of n states (struct ts_fsm_token) 13 * A finite state machine consists of n states (struct ts_fsm_token)
14 * representing the pattern as a finite automation. The data is read 14 * representing the pattern as a finite automaton. The data is read
15 * sequentially on an octet basis. Every state token specifies the number 15 * sequentially on an octet basis. Every state token specifies the number
16 * of recurrences and the type of value accepted which can be either a 16 * of recurrences and the type of value accepted which can be either a
17 * specific character or ctype based set of characters. The available 17 * specific character or ctype based set of characters. The available
diff --git a/lib/ts_kmp.c b/lib/ts_kmp.c
index 632f783e65f1..ffbe66cbb0ed 100644
--- a/lib/ts_kmp.c
+++ b/lib/ts_kmp.c
@@ -27,7 +27,7 @@
27 * 27 *
28 * [1] Cormen, Leiserson, Rivest, Stein 28 * [1] Cormen, Leiserson, Rivest, Stein
29 * Introdcution to Algorithms, 2nd Edition, MIT Press 29 * Introdcution to Algorithms, 2nd Edition, MIT Press
30 * [2] See finite automation theory 30 * [2] See finite automaton theory
31 */ 31 */
32 32
33#include <linux/module.h> 33#include <linux/module.h>
diff --git a/lib/ubsan.h b/lib/ubsan.h
index b2d18d4a53f5..88f23557edbe 100644
--- a/lib/ubsan.h
+++ b/lib/ubsan.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIB_UBSAN_H 2#ifndef _LIB_UBSAN_H
2#define _LIB_UBSAN_H 3#define _LIB_UBSAN_H
3 4
diff --git a/lib/ucs2_string.c b/lib/ucs2_string.c
index ae8d2491133c..d7e06b28de38 100644
--- a/lib/ucs2_string.c
+++ b/lib/ucs2_string.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/ucs2_string.h> 2#include <linux/ucs2_string.h>
2#include <linux/module.h> 3#include <linux/module.h>
3 4
diff --git a/lib/usercopy.c b/lib/usercopy.c
index f5d9f08ee032..15e2e6fb060e 100644
--- a/lib/usercopy.c
+++ b/lib/usercopy.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/uaccess.h> 2#include <linux/uaccess.h>
2 3
3/* out-of-line parts */ 4/* out-of-line parts */
diff --git a/lib/win_minmax.c b/lib/win_minmax.c
index c8420d404926..6bdc1cd15f76 100644
--- a/lib/win_minmax.c
+++ b/lib/win_minmax.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/** 2/**
2 * lib/minmax.c: windowed min/max tracker 3 * lib/minmax.c: windowed min/max tracker
3 * 4 *