diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-07 22:25:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-07 22:25:37 -0500 |
commit | b5dd0c658c31b469ccff1b637e5124851e7a4a1c (patch) | |
tree | dc0b31a5aa62bb4e1fa653a4f176c2faae51f9e0 | |
parent | 610cd4eadec4f97acd25d3108b0e50d1362b3319 (diff) | |
parent | fe0436e10c8845aed24cad3a1c719efcd6e583eb (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton:
- some of the rest of MM
- various misc things
- dynamic-debug updates
- checkpatch
- some epoll speedups
- autofs
- rapidio
- lib/, lib/lzo/ updates
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (83 commits)
samples/mic/mpssd/mpssd.h: remove duplicate header
kernel/fork.c: remove duplicated include
include/linux/relay.h: fix percpu annotation in struct rchan
arch/nios2/mm/fault.c: remove duplicate include
unicore32: stop printing the virtual memory layout
MAINTAINERS: fix GTA02 entry and mark as orphan
mm: create the new vm_fault_t type
arm, s390, unicore32: remove oneliner wrappers for memblock_alloc()
arch: simplify several early memory allocations
openrisc: simplify pte_alloc_one_kernel()
sh: prefer memblock APIs returning virtual address
microblaze: prefer memblock API returning virtual address
powerpc: prefer memblock APIs returning virtual address
lib/lzo: separate lzo-rle from lzo
lib/lzo: implement run-length encoding
lib/lzo: fast 8-byte copy on arm64
lib/lzo: 64-bit CTZ on arm64
lib/lzo: tidy-up ifdefs
ipc/sem.c: replace kvmalloc/memset with kvzalloc and use struct_size
ipc: annotate implicit fall through
...
148 files changed, 1100 insertions, 658 deletions
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 2228fcc8e29f..ef25a066d952 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -106,7 +106,6 @@ compile.h* | |||
106 | conf | 106 | conf |
107 | config | 107 | config |
108 | config-* | 108 | config-* |
109 | config_data.h* | ||
110 | config.mak | 109 | config.mak |
111 | config.mak.autogen | 110 | config.mak.autogen |
112 | conmakehash | 111 | conmakehash |
diff --git a/Documentation/lzo.txt b/Documentation/lzo.txt index 6fa6a93d0949..f79934225d8d 100644 --- a/Documentation/lzo.txt +++ b/Documentation/lzo.txt | |||
@@ -78,16 +78,34 @@ Description | |||
78 | is an implementation design choice independent on the algorithm or | 78 | is an implementation design choice independent on the algorithm or |
79 | encoding. | 79 | encoding. |
80 | 80 | ||
81 | Versions | ||
82 | |||
83 | 0: Original version | ||
84 | 1: LZO-RLE | ||
85 | |||
86 | Version 1 of LZO implements an extension to encode runs of zeros using run | ||
87 | length encoding. This improves speed for data with many zeros, which is a | ||
88 | common case for zram. This modifies the bitstream in a backwards compatible way | ||
89 | (v1 can correctly decompress v0 compressed data, but v0 cannot read v1 data). | ||
90 | |||
91 | For maximum compatibility, both versions are available under different names | ||
92 | (lzo and lzo-rle). Differences in the encoding are noted in this document with | ||
93 | e.g.: version 1 only. | ||
94 | |||
81 | Byte sequences | 95 | Byte sequences |
82 | ============== | 96 | ============== |
83 | 97 | ||
84 | First byte encoding:: | 98 | First byte encoding:: |
85 | 99 | ||
86 | 0..17 : follow regular instruction encoding, see below. It is worth | 100 | 0..16 : follow regular instruction encoding, see below. It is worth |
87 | noting that codes 16 and 17 will represent a block copy from | 101 | noting that code 16 will represent a block copy from the |
88 | the dictionary which is empty, and that they will always be | 102 | dictionary which is empty, and that it will always be |
89 | invalid at this place. | 103 | invalid at this place. |
90 | 104 | ||
105 | 17 : bitstream version. If the first byte is 17, the next byte | ||
106 | gives the bitstream version (version 1 only). If the first byte | ||
107 | is not 17, the bitstream version is 0. | ||
108 | |||
91 | 18..21 : copy 0..3 literals | 109 | 18..21 : copy 0..3 literals |
92 | state = (byte - 17) = 0..3 [ copy <state> literals ] | 110 | state = (byte - 17) = 0..3 [ copy <state> literals ] |
93 | skip byte | 111 | skip byte |
@@ -140,6 +158,11 @@ Byte sequences | |||
140 | state = S (copy S literals after this block) | 158 | state = S (copy S literals after this block) |
141 | End of stream is reached if distance == 16384 | 159 | End of stream is reached if distance == 16384 |
142 | 160 | ||
161 | In version 1 only, this instruction is also used to encode a run of | ||
162 | zeros if distance = 0xbfff, i.e. H = 1 and the D bits are all 1. | ||
163 | In this case, it is followed by a fourth byte, X. | ||
164 | run length = ((X << 3) | (0 0 0 0 0 L L L)) + 4. | ||
165 | |||
143 | 0 0 1 L L L L L (32..63) | 166 | 0 0 1 L L L L L (32..63) |
144 | Copy of small block within 16kB distance (preferably less than 34B) | 167 | Copy of small block within 16kB distance (preferably less than 34B) |
145 | length = 2 + (L ?: 31 + (zero_bytes * 255) + non_zero_byte) | 168 | length = 2 + (L ?: 31 + (zero_bytes * 255) + non_zero_byte) |
@@ -165,7 +188,9 @@ Authors | |||
165 | ======= | 188 | ======= |
166 | 189 | ||
167 | This document was written by Willy Tarreau <w@1wt.eu> on 2014/07/19 during an | 190 | This document was written by Willy Tarreau <w@1wt.eu> on 2014/07/19 during an |
168 | analysis of the decompression code available in Linux 3.16-rc5. The code is | 191 | analysis of the decompression code available in Linux 3.16-rc5, and updated |
169 | tricky, it is possible that this document contains mistakes or that a few | 192 | by Dave Rodgman <dave.rodgman@arm.com> on 2018/10/30 to introduce run-length |
170 | corner cases were overlooked. In any case, please report any doubt, fix, or | 193 | encoding. The code is tricky, it is possible that this document contains |
171 | proposed updates to the author(s) so that the document can be updated. | 194 | mistakes or that a few corner cases were overlooked. In any case, please |
195 | report any doubt, fix, or proposed updates to the author(s) so that the | ||
196 | document can be updated. | ||
diff --git a/Documentation/process/4.Coding.rst b/Documentation/process/4.Coding.rst index cfe264889447..4b7a5ab3cec1 100644 --- a/Documentation/process/4.Coding.rst +++ b/Documentation/process/4.Coding.rst | |||
@@ -249,7 +249,7 @@ features; most of these are found in the "kernel hacking" submenu. Several | |||
249 | of these options should be turned on for any kernel used for development or | 249 | of these options should be turned on for any kernel used for development or |
250 | testing purposes. In particular, you should turn on: | 250 | testing purposes. In particular, you should turn on: |
251 | 251 | ||
252 | - ENABLE_WARN_DEPRECATED, ENABLE_MUST_CHECK, and FRAME_WARN to get an | 252 | - ENABLE_MUST_CHECK and FRAME_WARN to get an |
253 | extra set of warnings for problems like the use of deprecated interfaces | 253 | extra set of warnings for problems like the use of deprecated interfaces |
254 | or ignoring an important return value from a function. The output | 254 | or ignoring an important return value from a function. The output |
255 | generated by these warnings can be verbose, but one need not worry about | 255 | generated by these warnings can be verbose, but one need not worry about |
diff --git a/Documentation/translations/it_IT/process/4.Coding.rst b/Documentation/translations/it_IT/process/4.Coding.rst index c61059015e52..c05b89e616dd 100644 --- a/Documentation/translations/it_IT/process/4.Coding.rst +++ b/Documentation/translations/it_IT/process/4.Coding.rst | |||
@@ -264,7 +264,7 @@ La maggior parte di queste opzioni possono essere attivate per qualsiasi | |||
264 | kernel utilizzato per lo sviluppo o a scopo di test. In particolare dovreste | 264 | kernel utilizzato per lo sviluppo o a scopo di test. In particolare dovreste |
265 | attivare: | 265 | attivare: |
266 | 266 | ||
267 | - ENABLE_WARN_DEPRECATED, ENABLE_MUST_CHECK, e FRAME_WARN per ottenere degli | 267 | - ENABLE_MUST_CHECK e FRAME_WARN per ottenere degli |
268 | avvertimenti dedicati a problemi come l'uso di interfacce deprecate o | 268 | avvertimenti dedicati a problemi come l'uso di interfacce deprecate o |
269 | l'ignorare un importante valore di ritorno di una funzione. Il risultato | 269 | l'ignorare un importante valore di ritorno di una funzione. Il risultato |
270 | generato da questi avvertimenti può risultare verboso, ma non bisogna | 270 | generato da questi avvertimenti può risultare verboso, ma non bisogna |
diff --git a/MAINTAINERS b/MAINTAINERS index 09d47cd02a14..fce33cc179b0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1899,10 +1899,11 @@ F: drivers/usb/host/ehci-w90x900.c | |||
1899 | F: drivers/video/fbdev/nuc900fb.c | 1899 | F: drivers/video/fbdev/nuc900fb.c |
1900 | 1900 | ||
1901 | ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT | 1901 | ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT |
1902 | M: Nelson Castillo <arhuaco@freaks-unidos.net> | ||
1903 | L: openmoko-kernel@lists.openmoko.org (subscribers-only) | 1902 | L: openmoko-kernel@lists.openmoko.org (subscribers-only) |
1904 | W: http://wiki.openmoko.org/wiki/Neo_FreeRunner | 1903 | W: http://wiki.openmoko.org/wiki/Neo_FreeRunner |
1905 | S: Supported | 1904 | S: Orphan |
1905 | F: arch/arm/mach-s3c24xx/mach-gta02.c | ||
1906 | F: arch/arm/mach-s3c24xx/gta02.h | ||
1906 | 1907 | ||
1907 | ARM/Orion SoC/Technologic Systems TS-78xx platform support | 1908 | ARM/Orion SoC/Technologic Systems TS-78xx platform support |
1908 | M: Alexander Clouter <alex@digriz.org.uk> | 1909 | M: Alexander Clouter <alex@digriz.org.uk> |
diff --git a/arch/arc/configs/axs101_defconfig b/arch/arc/configs/axs101_defconfig index 020d4493edfd..e31a8ebc3ecc 100644 --- a/arch/arc/configs/axs101_defconfig +++ b/arch/arc/configs/axs101_defconfig | |||
@@ -99,7 +99,6 @@ CONFIG_NFS_FS=y | |||
99 | CONFIG_NFS_V3_ACL=y | 99 | CONFIG_NFS_V3_ACL=y |
100 | CONFIG_NLS_CODEPAGE_437=y | 100 | CONFIG_NLS_CODEPAGE_437=y |
101 | CONFIG_NLS_ISO8859_1=y | 101 | CONFIG_NLS_ISO8859_1=y |
102 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
103 | # CONFIG_ENABLE_MUST_CHECK is not set | 102 | # CONFIG_ENABLE_MUST_CHECK is not set |
104 | CONFIG_STRIP_ASM_SYMS=y | 103 | CONFIG_STRIP_ASM_SYMS=y |
105 | CONFIG_SOFTLOCKUP_DETECTOR=y | 104 | CONFIG_SOFTLOCKUP_DETECTOR=y |
diff --git a/arch/arc/configs/axs103_defconfig b/arch/arc/configs/axs103_defconfig index 666314fffc60..e0e8567f0d75 100644 --- a/arch/arc/configs/axs103_defconfig +++ b/arch/arc/configs/axs103_defconfig | |||
@@ -97,7 +97,6 @@ CONFIG_NFS_FS=y | |||
97 | CONFIG_NFS_V3_ACL=y | 97 | CONFIG_NFS_V3_ACL=y |
98 | CONFIG_NLS_CODEPAGE_437=y | 98 | CONFIG_NLS_CODEPAGE_437=y |
99 | CONFIG_NLS_ISO8859_1=y | 99 | CONFIG_NLS_ISO8859_1=y |
100 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
101 | # CONFIG_ENABLE_MUST_CHECK is not set | 100 | # CONFIG_ENABLE_MUST_CHECK is not set |
102 | CONFIG_STRIP_ASM_SYMS=y | 101 | CONFIG_STRIP_ASM_SYMS=y |
103 | CONFIG_SOFTLOCKUP_DETECTOR=y | 102 | CONFIG_SOFTLOCKUP_DETECTOR=y |
diff --git a/arch/arc/configs/axs103_smp_defconfig b/arch/arc/configs/axs103_smp_defconfig index 429832b8560b..fcbc952bc75b 100644 --- a/arch/arc/configs/axs103_smp_defconfig +++ b/arch/arc/configs/axs103_smp_defconfig | |||
@@ -100,7 +100,6 @@ CONFIG_NFS_FS=y | |||
100 | CONFIG_NFS_V3_ACL=y | 100 | CONFIG_NFS_V3_ACL=y |
101 | CONFIG_NLS_CODEPAGE_437=y | 101 | CONFIG_NLS_CODEPAGE_437=y |
102 | CONFIG_NLS_ISO8859_1=y | 102 | CONFIG_NLS_ISO8859_1=y |
103 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
104 | # CONFIG_ENABLE_MUST_CHECK is not set | 103 | # CONFIG_ENABLE_MUST_CHECK is not set |
105 | CONFIG_STRIP_ASM_SYMS=y | 104 | CONFIG_STRIP_ASM_SYMS=y |
106 | CONFIG_SOFTLOCKUP_DETECTOR=y | 105 | CONFIG_SOFTLOCKUP_DETECTOR=y |
diff --git a/arch/arc/configs/haps_hs_defconfig b/arch/arc/configs/haps_hs_defconfig index 240dd2cd5148..f56cc2070c11 100644 --- a/arch/arc/configs/haps_hs_defconfig +++ b/arch/arc/configs/haps_hs_defconfig | |||
@@ -75,7 +75,6 @@ CONFIG_EXT2_FS_XATTR=y | |||
75 | CONFIG_TMPFS=y | 75 | CONFIG_TMPFS=y |
76 | # CONFIG_MISC_FILESYSTEMS is not set | 76 | # CONFIG_MISC_FILESYSTEMS is not set |
77 | CONFIG_NFS_FS=y | 77 | CONFIG_NFS_FS=y |
78 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
79 | # CONFIG_ENABLE_MUST_CHECK is not set | 78 | # CONFIG_ENABLE_MUST_CHECK is not set |
80 | CONFIG_DEBUG_MEMORY_INIT=y | 79 | CONFIG_DEBUG_MEMORY_INIT=y |
81 | # CONFIG_DEBUG_PREEMPT is not set | 80 | # CONFIG_DEBUG_PREEMPT is not set |
diff --git a/arch/arc/configs/haps_hs_smp_defconfig b/arch/arc/configs/haps_hs_smp_defconfig index 14ae7e5acc7c..b6f2482c7e74 100644 --- a/arch/arc/configs/haps_hs_smp_defconfig +++ b/arch/arc/configs/haps_hs_smp_defconfig | |||
@@ -78,7 +78,6 @@ CONFIG_EXT2_FS_XATTR=y | |||
78 | CONFIG_TMPFS=y | 78 | CONFIG_TMPFS=y |
79 | # CONFIG_MISC_FILESYSTEMS is not set | 79 | # CONFIG_MISC_FILESYSTEMS is not set |
80 | CONFIG_NFS_FS=y | 80 | CONFIG_NFS_FS=y |
81 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
82 | # CONFIG_ENABLE_MUST_CHECK is not set | 81 | # CONFIG_ENABLE_MUST_CHECK is not set |
83 | CONFIG_SOFTLOCKUP_DETECTOR=y | 82 | CONFIG_SOFTLOCKUP_DETECTOR=y |
84 | # CONFIG_DEBUG_PREEMPT is not set | 83 | # CONFIG_DEBUG_PREEMPT is not set |
diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig index 87b23b7fb781..6fd3d29546af 100644 --- a/arch/arc/configs/hsdk_defconfig +++ b/arch/arc/configs/hsdk_defconfig | |||
@@ -71,7 +71,6 @@ CONFIG_NFS_FS=y | |||
71 | CONFIG_NFS_V3_ACL=y | 71 | CONFIG_NFS_V3_ACL=y |
72 | CONFIG_NLS_CODEPAGE_437=y | 72 | CONFIG_NLS_CODEPAGE_437=y |
73 | CONFIG_NLS_ISO8859_1=y | 73 | CONFIG_NLS_ISO8859_1=y |
74 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
75 | # CONFIG_ENABLE_MUST_CHECK is not set | 74 | # CONFIG_ENABLE_MUST_CHECK is not set |
76 | CONFIG_STRIP_ASM_SYMS=y | 75 | CONFIG_STRIP_ASM_SYMS=y |
77 | CONFIG_SOFTLOCKUP_DETECTOR=y | 76 | CONFIG_SOFTLOCKUP_DETECTOR=y |
diff --git a/arch/arc/configs/nps_defconfig b/arch/arc/configs/nps_defconfig index 621f59407d76..f0a077c00efa 100644 --- a/arch/arc/configs/nps_defconfig +++ b/arch/arc/configs/nps_defconfig | |||
@@ -76,7 +76,6 @@ CONFIG_NFS_FS=y | |||
76 | CONFIG_NFS_V3_ACL=y | 76 | CONFIG_NFS_V3_ACL=y |
77 | CONFIG_ROOT_NFS=y | 77 | CONFIG_ROOT_NFS=y |
78 | CONFIG_DEBUG_INFO=y | 78 | CONFIG_DEBUG_INFO=y |
79 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
80 | # CONFIG_ENABLE_MUST_CHECK is not set | 79 | # CONFIG_ENABLE_MUST_CHECK is not set |
81 | CONFIG_MAGIC_SYSRQ=y | 80 | CONFIG_MAGIC_SYSRQ=y |
82 | CONFIG_DEBUG_MEMORY_INIT=y | 81 | CONFIG_DEBUG_MEMORY_INIT=y |
diff --git a/arch/arc/configs/nsim_700_defconfig b/arch/arc/configs/nsim_700_defconfig index 219c2a65294b..318e4cd29629 100644 --- a/arch/arc/configs/nsim_700_defconfig +++ b/arch/arc/configs/nsim_700_defconfig | |||
@@ -56,6 +56,5 @@ CONFIG_EXT2_FS_XATTR=y | |||
56 | CONFIG_TMPFS=y | 56 | CONFIG_TMPFS=y |
57 | # CONFIG_MISC_FILESYSTEMS is not set | 57 | # CONFIG_MISC_FILESYSTEMS is not set |
58 | CONFIG_NFS_FS=y | 58 | CONFIG_NFS_FS=y |
59 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
60 | # CONFIG_ENABLE_MUST_CHECK is not set | 59 | # CONFIG_ENABLE_MUST_CHECK is not set |
61 | # CONFIG_DEBUG_PREEMPT is not set | 60 | # CONFIG_DEBUG_PREEMPT is not set |
diff --git a/arch/arc/configs/nsim_hs_defconfig b/arch/arc/configs/nsim_hs_defconfig index 739b90e5e893..c15807b0e0c1 100644 --- a/arch/arc/configs/nsim_hs_defconfig +++ b/arch/arc/configs/nsim_hs_defconfig | |||
@@ -56,6 +56,5 @@ CONFIG_EXT2_FS_XATTR=y | |||
56 | CONFIG_TMPFS=y | 56 | CONFIG_TMPFS=y |
57 | # CONFIG_MISC_FILESYSTEMS is not set | 57 | # CONFIG_MISC_FILESYSTEMS is not set |
58 | CONFIG_NFS_FS=y | 58 | CONFIG_NFS_FS=y |
59 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
60 | # CONFIG_ENABLE_MUST_CHECK is not set | 59 | # CONFIG_ENABLE_MUST_CHECK is not set |
61 | # CONFIG_DEBUG_PREEMPT is not set | 60 | # CONFIG_DEBUG_PREEMPT is not set |
diff --git a/arch/arc/configs/nsim_hs_smp_defconfig b/arch/arc/configs/nsim_hs_smp_defconfig index b5895bdf3a93..65e983fd942b 100644 --- a/arch/arc/configs/nsim_hs_smp_defconfig +++ b/arch/arc/configs/nsim_hs_smp_defconfig | |||
@@ -55,5 +55,4 @@ CONFIG_EXT2_FS_XATTR=y | |||
55 | CONFIG_TMPFS=y | 55 | CONFIG_TMPFS=y |
56 | # CONFIG_MISC_FILESYSTEMS is not set | 56 | # CONFIG_MISC_FILESYSTEMS is not set |
57 | CONFIG_NFS_FS=y | 57 | CONFIG_NFS_FS=y |
58 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
59 | # CONFIG_ENABLE_MUST_CHECK is not set | 58 | # CONFIG_ENABLE_MUST_CHECK is not set |
diff --git a/arch/arc/configs/nsimosci_defconfig b/arch/arc/configs/nsimosci_defconfig index 35dfc6491a09..08c5b99ac341 100644 --- a/arch/arc/configs/nsimosci_defconfig +++ b/arch/arc/configs/nsimosci_defconfig | |||
@@ -68,5 +68,4 @@ CONFIG_TMPFS=y | |||
68 | # CONFIG_MISC_FILESYSTEMS is not set | 68 | # CONFIG_MISC_FILESYSTEMS is not set |
69 | CONFIG_NFS_FS=y | 69 | CONFIG_NFS_FS=y |
70 | CONFIG_NFS_V3_ACL=y | 70 | CONFIG_NFS_V3_ACL=y |
71 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
72 | # CONFIG_ENABLE_MUST_CHECK is not set | 71 | # CONFIG_ENABLE_MUST_CHECK is not set |
diff --git a/arch/arc/configs/nsimosci_hs_defconfig b/arch/arc/configs/nsimosci_hs_defconfig index 1638e5bc9672..5b5e26d67955 100644 --- a/arch/arc/configs/nsimosci_hs_defconfig +++ b/arch/arc/configs/nsimosci_hs_defconfig | |||
@@ -66,5 +66,4 @@ CONFIG_TMPFS=y | |||
66 | # CONFIG_MISC_FILESYSTEMS is not set | 66 | # CONFIG_MISC_FILESYSTEMS is not set |
67 | CONFIG_NFS_FS=y | 67 | CONFIG_NFS_FS=y |
68 | CONFIG_NFS_V3_ACL=y | 68 | CONFIG_NFS_V3_ACL=y |
69 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
70 | # CONFIG_ENABLE_MUST_CHECK is not set | 69 | # CONFIG_ENABLE_MUST_CHECK is not set |
diff --git a/arch/arc/configs/nsimosci_hs_smp_defconfig b/arch/arc/configs/nsimosci_hs_smp_defconfig index 11cfbdb0f441..26af9b2f7fcb 100644 --- a/arch/arc/configs/nsimosci_hs_smp_defconfig +++ b/arch/arc/configs/nsimosci_hs_smp_defconfig | |||
@@ -77,6 +77,5 @@ CONFIG_TMPFS=y | |||
77 | # CONFIG_MISC_FILESYSTEMS is not set | 77 | # CONFIG_MISC_FILESYSTEMS is not set |
78 | CONFIG_NFS_FS=y | 78 | CONFIG_NFS_FS=y |
79 | CONFIG_NFS_V3_ACL=y | 79 | CONFIG_NFS_V3_ACL=y |
80 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
81 | # CONFIG_ENABLE_MUST_CHECK is not set | 80 | # CONFIG_ENABLE_MUST_CHECK is not set |
82 | CONFIG_FTRACE=y | 81 | CONFIG_FTRACE=y |
diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig index e71ade3cf9c8..5b5119d2b5d5 100644 --- a/arch/arc/configs/tb10x_defconfig +++ b/arch/arc/configs/tb10x_defconfig | |||
@@ -92,7 +92,6 @@ CONFIG_CONFIGFS_FS=y | |||
92 | # CONFIG_MISC_FILESYSTEMS is not set | 92 | # CONFIG_MISC_FILESYSTEMS is not set |
93 | # CONFIG_NETWORK_FILESYSTEMS is not set | 93 | # CONFIG_NETWORK_FILESYSTEMS is not set |
94 | CONFIG_DEBUG_INFO=y | 94 | CONFIG_DEBUG_INFO=y |
95 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
96 | CONFIG_STRIP_ASM_SYMS=y | 95 | CONFIG_STRIP_ASM_SYMS=y |
97 | CONFIG_DEBUG_FS=y | 96 | CONFIG_DEBUG_FS=y |
98 | CONFIG_HEADERS_CHECK=y | 97 | CONFIG_HEADERS_CHECK=y |
diff --git a/arch/arc/configs/vdk_hs38_defconfig b/arch/arc/configs/vdk_hs38_defconfig index e447ace6fa1c..0c3b21416819 100644 --- a/arch/arc/configs/vdk_hs38_defconfig +++ b/arch/arc/configs/vdk_hs38_defconfig | |||
@@ -87,7 +87,6 @@ CONFIG_NFS_FS=y | |||
87 | CONFIG_NFS_V3_ACL=y | 87 | CONFIG_NFS_V3_ACL=y |
88 | CONFIG_NLS_CODEPAGE_437=y | 88 | CONFIG_NLS_CODEPAGE_437=y |
89 | CONFIG_NLS_ISO8859_1=y | 89 | CONFIG_NLS_ISO8859_1=y |
90 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
91 | # CONFIG_ENABLE_MUST_CHECK is not set | 90 | # CONFIG_ENABLE_MUST_CHECK is not set |
92 | CONFIG_STRIP_ASM_SYMS=y | 91 | CONFIG_STRIP_ASM_SYMS=y |
93 | CONFIG_DEBUG_SHIRQ=y | 92 | CONFIG_DEBUG_SHIRQ=y |
diff --git a/arch/arc/configs/vdk_hs38_smp_defconfig b/arch/arc/configs/vdk_hs38_smp_defconfig index c82cdb10aaf4..f9ad9d3ee702 100644 --- a/arch/arc/configs/vdk_hs38_smp_defconfig +++ b/arch/arc/configs/vdk_hs38_smp_defconfig | |||
@@ -91,7 +91,6 @@ CONFIG_NFS_FS=y | |||
91 | CONFIG_NFS_V3_ACL=y | 91 | CONFIG_NFS_V3_ACL=y |
92 | CONFIG_NLS_CODEPAGE_437=y | 92 | CONFIG_NLS_CODEPAGE_437=y |
93 | CONFIG_NLS_ISO8859_1=y | 93 | CONFIG_NLS_ISO8859_1=y |
94 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
95 | # CONFIG_ENABLE_MUST_CHECK is not set | 94 | # CONFIG_ENABLE_MUST_CHECK is not set |
96 | CONFIG_STRIP_ASM_SYMS=y | 95 | CONFIG_STRIP_ASM_SYMS=y |
97 | CONFIG_DEBUG_SHIRQ=y | 96 | CONFIG_DEBUG_SHIRQ=y |
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig index bd55a2be51fc..dcf7610cfe55 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig | |||
@@ -161,7 +161,6 @@ CONFIG_PRINTK_TIME=y | |||
161 | CONFIG_BOOT_PRINTK_DELAY=y | 161 | CONFIG_BOOT_PRINTK_DELAY=y |
162 | CONFIG_DYNAMIC_DEBUG=y | 162 | CONFIG_DYNAMIC_DEBUG=y |
163 | CONFIG_DEBUG_INFO=y | 163 | CONFIG_DEBUG_INFO=y |
164 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
165 | # CONFIG_ENABLE_MUST_CHECK is not set | 164 | # CONFIG_ENABLE_MUST_CHECK is not set |
166 | CONFIG_UNUSED_SYMBOLS=y | 165 | CONFIG_UNUSED_SYMBOLS=y |
167 | CONFIG_DEBUG_MEMORY_INIT=y | 166 | CONFIG_DEBUG_MEMORY_INIT=y |
diff --git a/arch/arm/configs/cns3420vb_defconfig b/arch/arm/configs/cns3420vb_defconfig index c6dcd6e4f4e6..419b73564f29 100644 --- a/arch/arm/configs/cns3420vb_defconfig +++ b/arch/arm/configs/cns3420vb_defconfig | |||
@@ -60,7 +60,6 @@ CONFIG_EXT2_FS_XATTR=y | |||
60 | CONFIG_AUTOFS4_FS=y | 60 | CONFIG_AUTOFS4_FS=y |
61 | CONFIG_FSCACHE=y | 61 | CONFIG_FSCACHE=y |
62 | CONFIG_TMPFS=y | 62 | CONFIG_TMPFS=y |
63 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
64 | # CONFIG_ENABLE_MUST_CHECK is not set | 63 | # CONFIG_ENABLE_MUST_CHECK is not set |
65 | CONFIG_DEBUG_FS=y | 64 | CONFIG_DEBUG_FS=y |
66 | # CONFIG_ARM_UNWIND is not set | 65 | # CONFIG_ARM_UNWIND is not set |
diff --git a/arch/arm/configs/efm32_defconfig b/arch/arm/configs/efm32_defconfig index 860d27138e6f..ee42158f41ec 100644 --- a/arch/arm/configs/efm32_defconfig +++ b/arch/arm/configs/efm32_defconfig | |||
@@ -94,7 +94,6 @@ CONFIG_ROMFS_BACKED_BY_MTD=y | |||
94 | # CONFIG_NETWORK_FILESYSTEMS is not set | 94 | # CONFIG_NETWORK_FILESYSTEMS is not set |
95 | CONFIG_PRINTK_TIME=y | 95 | CONFIG_PRINTK_TIME=y |
96 | CONFIG_DEBUG_INFO=y | 96 | CONFIG_DEBUG_INFO=y |
97 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
98 | # CONFIG_ENABLE_MUST_CHECK is not set | 97 | # CONFIG_ENABLE_MUST_CHECK is not set |
99 | CONFIG_MAGIC_SYSRQ=y | 98 | CONFIG_MAGIC_SYSRQ=y |
100 | # CONFIG_SCHED_DEBUG is not set | 99 | # CONFIG_SCHED_DEBUG is not set |
diff --git a/arch/arm/configs/eseries_pxa_defconfig b/arch/arm/configs/eseries_pxa_defconfig index cd27d651463c..eabb784cf7da 100644 --- a/arch/arm/configs/eseries_pxa_defconfig +++ b/arch/arm/configs/eseries_pxa_defconfig | |||
@@ -103,7 +103,6 @@ CONFIG_NFS_V3=y | |||
103 | CONFIG_PARTITION_ADVANCED=y | 103 | CONFIG_PARTITION_ADVANCED=y |
104 | CONFIG_NLS_CODEPAGE_437=y | 104 | CONFIG_NLS_CODEPAGE_437=y |
105 | CONFIG_NLS_ISO8859_1=y | 105 | CONFIG_NLS_ISO8859_1=y |
106 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
107 | # CONFIG_ENABLE_MUST_CHECK is not set | 106 | # CONFIG_ENABLE_MUST_CHECK is not set |
108 | CONFIG_CRYPTO_CBC=m | 107 | CONFIG_CRYPTO_CBC=m |
109 | CONFIG_CRYPTO_PCBC=m | 108 | CONFIG_CRYPTO_PCBC=m |
diff --git a/arch/arm/configs/gemini_defconfig b/arch/arm/configs/gemini_defconfig index 553777ac2814..ef9aae89907d 100644 --- a/arch/arm/configs/gemini_defconfig +++ b/arch/arm/configs/gemini_defconfig | |||
@@ -87,6 +87,5 @@ CONFIG_TMPFS_POSIX_ACL=y | |||
87 | CONFIG_ROMFS_FS=y | 87 | CONFIG_ROMFS_FS=y |
88 | CONFIG_NLS_CODEPAGE_437=y | 88 | CONFIG_NLS_CODEPAGE_437=y |
89 | CONFIG_NLS_ISO8859_1=y | 89 | CONFIG_NLS_ISO8859_1=y |
90 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
91 | # CONFIG_ENABLE_MUST_CHECK is not set | 90 | # CONFIG_ENABLE_MUST_CHECK is not set |
92 | CONFIG_DEBUG_FS=y | 91 | CONFIG_DEBUG_FS=y |
diff --git a/arch/arm/configs/mini2440_defconfig b/arch/arm/configs/mini2440_defconfig index 88ea02e7ba19..d95a8059d30b 100644 --- a/arch/arm/configs/mini2440_defconfig +++ b/arch/arm/configs/mini2440_defconfig | |||
@@ -298,7 +298,6 @@ CONFIG_NLS_KOI8_R=m | |||
298 | CONFIG_NLS_KOI8_U=m | 298 | CONFIG_NLS_KOI8_U=m |
299 | CONFIG_NLS_UTF8=m | 299 | CONFIG_NLS_UTF8=m |
300 | CONFIG_DEBUG_INFO=y | 300 | CONFIG_DEBUG_INFO=y |
301 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
302 | # CONFIG_ENABLE_MUST_CHECK is not set | 301 | # CONFIG_ENABLE_MUST_CHECK is not set |
303 | CONFIG_STRIP_ASM_SYMS=y | 302 | CONFIG_STRIP_ASM_SYMS=y |
304 | CONFIG_DEBUG_FS=y | 303 | CONFIG_DEBUG_FS=y |
diff --git a/arch/arm/configs/moxart_defconfig b/arch/arm/configs/moxart_defconfig index 2da0d9ee2107..078228a19339 100644 --- a/arch/arm/configs/moxart_defconfig +++ b/arch/arm/configs/moxart_defconfig | |||
@@ -125,7 +125,6 @@ CONFIG_CONFIGFS_FS=y | |||
125 | CONFIG_JFFS2_FS=y | 125 | CONFIG_JFFS2_FS=y |
126 | CONFIG_PRINTK_TIME=y | 126 | CONFIG_PRINTK_TIME=y |
127 | CONFIG_DEBUG_INFO=y | 127 | CONFIG_DEBUG_INFO=y |
128 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
129 | # CONFIG_ENABLE_MUST_CHECK is not set | 128 | # CONFIG_ENABLE_MUST_CHECK is not set |
130 | CONFIG_DEBUG_PAGEALLOC=y | 129 | CONFIG_DEBUG_PAGEALLOC=y |
131 | CONFIG_DEBUG_OBJECTS=y | 130 | CONFIG_DEBUG_OBJECTS=y |
diff --git a/arch/arm/configs/mps2_defconfig b/arch/arm/configs/mps2_defconfig index 0bcdec7cc169..1d923dbb9928 100644 --- a/arch/arm/configs/mps2_defconfig +++ b/arch/arm/configs/mps2_defconfig | |||
@@ -100,7 +100,6 @@ CONFIG_ROOT_NFS=y | |||
100 | CONFIG_NLS=y | 100 | CONFIG_NLS=y |
101 | CONFIG_PRINTK_TIME=y | 101 | CONFIG_PRINTK_TIME=y |
102 | CONFIG_DEBUG_INFO=y | 102 | CONFIG_DEBUG_INFO=y |
103 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
104 | # CONFIG_ENABLE_MUST_CHECK is not set | 103 | # CONFIG_ENABLE_MUST_CHECK is not set |
105 | CONFIG_DEBUG_FS=y | 104 | CONFIG_DEBUG_FS=y |
106 | # CONFIG_SCHED_DEBUG is not set | 105 | # CONFIG_SCHED_DEBUG is not set |
diff --git a/arch/arm/configs/nuc910_defconfig b/arch/arm/configs/nuc910_defconfig index a72653645f9d..c0d152c02fba 100644 --- a/arch/arm/configs/nuc910_defconfig +++ b/arch/arm/configs/nuc910_defconfig | |||
@@ -47,7 +47,6 @@ CONFIG_ROMFS_FS=y | |||
47 | CONFIG_PARTITION_ADVANCED=y | 47 | CONFIG_PARTITION_ADVANCED=y |
48 | CONFIG_NLS_CODEPAGE_437=y | 48 | CONFIG_NLS_CODEPAGE_437=y |
49 | CONFIG_NLS_ISO8859_1=y | 49 | CONFIG_NLS_ISO8859_1=y |
50 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
51 | # CONFIG_ENABLE_MUST_CHECK is not set | 50 | # CONFIG_ENABLE_MUST_CHECK is not set |
52 | CONFIG_DEBUG_FS=y | 51 | CONFIG_DEBUG_FS=y |
53 | # CONFIG_CRC32 is not set | 52 | # CONFIG_CRC32 is not set |
diff --git a/arch/arm/configs/nuc950_defconfig b/arch/arm/configs/nuc950_defconfig index 614a0a28d0b4..8dde1186c2ef 100644 --- a/arch/arm/configs/nuc950_defconfig +++ b/arch/arm/configs/nuc950_defconfig | |||
@@ -64,6 +64,5 @@ CONFIG_ROMFS_FS=y | |||
64 | CONFIG_PARTITION_ADVANCED=y | 64 | CONFIG_PARTITION_ADVANCED=y |
65 | CONFIG_NLS_CODEPAGE_437=y | 65 | CONFIG_NLS_CODEPAGE_437=y |
66 | CONFIG_NLS_ISO8859_1=y | 66 | CONFIG_NLS_ISO8859_1=y |
67 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
68 | # CONFIG_ENABLE_MUST_CHECK is not set | 67 | # CONFIG_ENABLE_MUST_CHECK is not set |
69 | CONFIG_DEBUG_FS=y | 68 | CONFIG_DEBUG_FS=y |
diff --git a/arch/arm/configs/nuc960_defconfig b/arch/arm/configs/nuc960_defconfig index b84bbd216153..6bb784f8eb5b 100644 --- a/arch/arm/configs/nuc960_defconfig +++ b/arch/arm/configs/nuc960_defconfig | |||
@@ -53,7 +53,6 @@ CONFIG_ROMFS_FS=y | |||
53 | CONFIG_PARTITION_ADVANCED=y | 53 | CONFIG_PARTITION_ADVANCED=y |
54 | CONFIG_NLS_CODEPAGE_437=y | 54 | CONFIG_NLS_CODEPAGE_437=y |
55 | CONFIG_NLS_ISO8859_1=y | 55 | CONFIG_NLS_ISO8859_1=y |
56 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
57 | # CONFIG_ENABLE_MUST_CHECK is not set | 56 | # CONFIG_ENABLE_MUST_CHECK is not set |
58 | CONFIG_DEBUG_FS=y | 57 | CONFIG_DEBUG_FS=y |
59 | # CONFIG_CRC32 is not set | 58 | # CONFIG_CRC32 is not set |
diff --git a/arch/arm/configs/stm32_defconfig b/arch/arm/configs/stm32_defconfig index ba805b757a8d..0258ba891376 100644 --- a/arch/arm/configs/stm32_defconfig +++ b/arch/arm/configs/stm32_defconfig | |||
@@ -80,7 +80,6 @@ CONFIG_EXT3_FS=y | |||
80 | CONFIG_NLS=y | 80 | CONFIG_NLS=y |
81 | CONFIG_PRINTK_TIME=y | 81 | CONFIG_PRINTK_TIME=y |
82 | CONFIG_DEBUG_INFO=y | 82 | CONFIG_DEBUG_INFO=y |
83 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
84 | # CONFIG_ENABLE_MUST_CHECK is not set | 83 | # CONFIG_ENABLE_MUST_CHECK is not set |
85 | CONFIG_MAGIC_SYSRQ=y | 84 | CONFIG_MAGIC_SYSRQ=y |
86 | # CONFIG_SCHED_DEBUG is not set | 85 | # CONFIG_SCHED_DEBUG is not set |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index f5cc1ccfea3d..57de0dde3ae0 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -719,16 +719,9 @@ EXPORT_SYMBOL(phys_mem_access_prot); | |||
719 | 719 | ||
720 | #define vectors_base() (vectors_high() ? 0xffff0000 : 0) | 720 | #define vectors_base() (vectors_high() ? 0xffff0000 : 0) |
721 | 721 | ||
722 | static void __init *early_alloc_aligned(unsigned long sz, unsigned long align) | ||
723 | { | ||
724 | void *ptr = __va(memblock_phys_alloc(sz, align)); | ||
725 | memset(ptr, 0, sz); | ||
726 | return ptr; | ||
727 | } | ||
728 | |||
729 | static void __init *early_alloc(unsigned long sz) | 722 | static void __init *early_alloc(unsigned long sz) |
730 | { | 723 | { |
731 | return early_alloc_aligned(sz, sz); | 724 | return memblock_alloc(sz, sz); |
732 | } | 725 | } |
733 | 726 | ||
734 | static void *__init late_alloc(unsigned long sz) | 727 | static void *__init late_alloc(unsigned long sz) |
@@ -1000,7 +993,7 @@ void __init iotable_init(struct map_desc *io_desc, int nr) | |||
1000 | if (!nr) | 993 | if (!nr) |
1001 | return; | 994 | return; |
1002 | 995 | ||
1003 | svm = early_alloc_aligned(sizeof(*svm) * nr, __alignof__(*svm)); | 996 | svm = memblock_alloc(sizeof(*svm) * nr, __alignof__(*svm)); |
1004 | 997 | ||
1005 | for (md = io_desc; nr; md++, nr--) { | 998 | for (md = io_desc; nr; md++, nr--) { |
1006 | create_mapping(md); | 999 | create_mapping(md); |
@@ -1022,7 +1015,7 @@ void __init vm_reserve_area_early(unsigned long addr, unsigned long size, | |||
1022 | struct vm_struct *vm; | 1015 | struct vm_struct *vm; |
1023 | struct static_vm *svm; | 1016 | struct static_vm *svm; |
1024 | 1017 | ||
1025 | svm = early_alloc_aligned(sizeof(*svm), __alignof__(*svm)); | 1018 | svm = memblock_alloc(sizeof(*svm), __alignof__(*svm)); |
1026 | 1019 | ||
1027 | vm = &svm->vm; | 1020 | vm = &svm->vm; |
1028 | vm->addr = (void *)addr; | 1021 | vm->addr = (void *)addr; |
diff --git a/arch/c6x/mm/dma-coherent.c b/arch/c6x/mm/dma-coherent.c index 75b79571732c..0be289839ce0 100644 --- a/arch/c6x/mm/dma-coherent.c +++ b/arch/c6x/mm/dma-coherent.c | |||
@@ -121,8 +121,6 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr, | |||
121 | */ | 121 | */ |
122 | void __init coherent_mem_init(phys_addr_t start, u32 size) | 122 | void __init coherent_mem_init(phys_addr_t start, u32 size) |
123 | { | 123 | { |
124 | phys_addr_t bitmap_phys; | ||
125 | |||
126 | if (!size) | 124 | if (!size) |
127 | return; | 125 | return; |
128 | 126 | ||
@@ -138,11 +136,8 @@ void __init coherent_mem_init(phys_addr_t start, u32 size) | |||
138 | if (dma_size & (PAGE_SIZE - 1)) | 136 | if (dma_size & (PAGE_SIZE - 1)) |
139 | ++dma_pages; | 137 | ++dma_pages; |
140 | 138 | ||
141 | bitmap_phys = memblock_phys_alloc(BITS_TO_LONGS(dma_pages) * sizeof(long), | 139 | dma_bitmap = memblock_alloc(BITS_TO_LONGS(dma_pages) * sizeof(long), |
142 | sizeof(long)); | 140 | sizeof(long)); |
143 | |||
144 | dma_bitmap = phys_to_virt(bitmap_phys); | ||
145 | memset(dma_bitmap, 0, dma_pages * PAGE_SIZE); | ||
146 | } | 141 | } |
147 | 142 | ||
148 | static void c6x_dma_sync(struct device *dev, phys_addr_t paddr, size_t size, | 143 | static void c6x_dma_sync(struct device *dev, phys_addr_t paddr, size_t size, |
diff --git a/arch/h8300/configs/edosk2674_defconfig b/arch/h8300/configs/edosk2674_defconfig index 29fda12d5da9..23791dcf6c25 100644 --- a/arch/h8300/configs/edosk2674_defconfig +++ b/arch/h8300/configs/edosk2674_defconfig | |||
@@ -45,5 +45,4 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y | |||
45 | # CONFIG_SYSFS is not set | 45 | # CONFIG_SYSFS is not set |
46 | # CONFIG_MISC_FILESYSTEMS is not set | 46 | # CONFIG_MISC_FILESYSTEMS is not set |
47 | CONFIG_DEBUG_INFO=y | 47 | CONFIG_DEBUG_INFO=y |
48 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
49 | # CONFIG_ENABLE_MUST_CHECK is not set | 48 | # CONFIG_ENABLE_MUST_CHECK is not set |
diff --git a/arch/h8300/configs/h8300h-sim_defconfig b/arch/h8300/configs/h8300h-sim_defconfig index 80624f46b0ed..7fc9c2f0acc0 100644 --- a/arch/h8300/configs/h8300h-sim_defconfig +++ b/arch/h8300/configs/h8300h-sim_defconfig | |||
@@ -45,5 +45,4 @@ CONFIG_SERIAL_SH_SCI_EARLYCON=y | |||
45 | # CONFIG_SYSFS is not set | 45 | # CONFIG_SYSFS is not set |
46 | # CONFIG_MISC_FILESYSTEMS is not set | 46 | # CONFIG_MISC_FILESYSTEMS is not set |
47 | CONFIG_DEBUG_INFO=y | 47 | CONFIG_DEBUG_INFO=y |
48 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
49 | # CONFIG_ENABLE_MUST_CHECK is not set | 48 | # CONFIG_ENABLE_MUST_CHECK is not set |
diff --git a/arch/h8300/configs/h8s-sim_defconfig b/arch/h8300/configs/h8s-sim_defconfig index 29fda12d5da9..23791dcf6c25 100644 --- a/arch/h8300/configs/h8s-sim_defconfig +++ b/arch/h8300/configs/h8s-sim_defconfig | |||
@@ -45,5 +45,4 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y | |||
45 | # CONFIG_SYSFS is not set | 45 | # CONFIG_SYSFS is not set |
46 | # CONFIG_MISC_FILESYSTEMS is not set | 46 | # CONFIG_MISC_FILESYSTEMS is not set |
47 | CONFIG_DEBUG_INFO=y | 47 | CONFIG_DEBUG_INFO=y |
48 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
49 | # CONFIG_ENABLE_MUST_CHECK is not set | 48 | # CONFIG_ENABLE_MUST_CHECK is not set |
diff --git a/arch/m68k/configs/amcore_defconfig b/arch/m68k/configs/amcore_defconfig index 1ba10d57ddb1..0857cdbfde0c 100644 --- a/arch/m68k/configs/amcore_defconfig +++ b/arch/m68k/configs/amcore_defconfig | |||
@@ -88,7 +88,6 @@ CONFIG_ROMFS_FS=y | |||
88 | CONFIG_ROMFS_BACKED_BY_BOTH=y | 88 | CONFIG_ROMFS_BACKED_BY_BOTH=y |
89 | # CONFIG_NETWORK_FILESYSTEMS is not set | 89 | # CONFIG_NETWORK_FILESYSTEMS is not set |
90 | CONFIG_PRINTK_TIME=y | 90 | CONFIG_PRINTK_TIME=y |
91 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
92 | # CONFIG_ENABLE_MUST_CHECK is not set | 91 | # CONFIG_ENABLE_MUST_CHECK is not set |
93 | # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set | 92 | # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set |
94 | CONFIG_PANIC_ON_OOPS=y | 93 | CONFIG_PANIC_ON_OOPS=y |
diff --git a/arch/m68k/configs/stmark2_defconfig b/arch/m68k/configs/stmark2_defconfig index 3d07b1de7eb0..69f23c7b0497 100644 --- a/arch/m68k/configs/stmark2_defconfig +++ b/arch/m68k/configs/stmark2_defconfig | |||
@@ -76,7 +76,6 @@ CONFIG_GPIO_GENERIC_PLATFORM=y | |||
76 | CONFIG_FSCACHE=y | 76 | CONFIG_FSCACHE=y |
77 | # CONFIG_PROC_SYSCTL is not set | 77 | # CONFIG_PROC_SYSCTL is not set |
78 | CONFIG_PRINTK_TIME=y | 78 | CONFIG_PRINTK_TIME=y |
79 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
80 | # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set | 79 | # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set |
81 | CONFIG_SLUB_DEBUG_ON=y | 80 | CONFIG_SLUB_DEBUG_ON=y |
82 | CONFIG_PANIC_ON_OOPS=y | 81 | CONFIG_PANIC_ON_OOPS=y |
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index b17fd8aafd64..44f4b8910c21 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -363,8 +363,9 @@ void __init *early_get_page(void) | |||
363 | * Mem start + kernel_tlb -> here is limit | 363 | * Mem start + kernel_tlb -> here is limit |
364 | * because of mem mapping from head.S | 364 | * because of mem mapping from head.S |
365 | */ | 365 | */ |
366 | return __va(memblock_alloc_base(PAGE_SIZE, PAGE_SIZE, | 366 | return memblock_alloc_try_nid_raw(PAGE_SIZE, PAGE_SIZE, |
367 | memory_start + kernel_tlb)); | 367 | MEMBLOCK_LOW_LIMIT, memory_start + kernel_tlb, |
368 | NUMA_NO_NODE); | ||
368 | } | 369 | } |
369 | 370 | ||
370 | #endif /* CONFIG_MMU */ | 371 | #endif /* CONFIG_MMU */ |
diff --git a/arch/nds32/mm/init.c b/arch/nds32/mm/init.c index 253f79fc7196..d1e521cce317 100644 --- a/arch/nds32/mm/init.c +++ b/arch/nds32/mm/init.c | |||
@@ -78,8 +78,7 @@ static void __init map_ram(void) | |||
78 | } | 78 | } |
79 | 79 | ||
80 | /* Alloc one page for holding PTE's... */ | 80 | /* Alloc one page for holding PTE's... */ |
81 | pte = (pte_t *) __va(memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE)); | 81 | pte = memblock_alloc(PAGE_SIZE, PAGE_SIZE); |
82 | memset(pte, 0, PAGE_SIZE); | ||
83 | set_pmd(pme, __pmd(__pa(pte) + _PAGE_KERNEL_TABLE)); | 82 | set_pmd(pme, __pmd(__pa(pte) + _PAGE_KERNEL_TABLE)); |
84 | 83 | ||
85 | /* Fill the newly allocated page with PTE'S */ | 84 | /* Fill the newly allocated page with PTE'S */ |
@@ -111,8 +110,7 @@ static void __init fixedrange_init(void) | |||
111 | pgd = swapper_pg_dir + pgd_index(vaddr); | 110 | pgd = swapper_pg_dir + pgd_index(vaddr); |
112 | pud = pud_offset(pgd, vaddr); | 111 | pud = pud_offset(pgd, vaddr); |
113 | pmd = pmd_offset(pud, vaddr); | 112 | pmd = pmd_offset(pud, vaddr); |
114 | fixmap_pmd_p = (pmd_t *) __va(memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE)); | 113 | fixmap_pmd_p = memblock_alloc(PAGE_SIZE, PAGE_SIZE); |
115 | memset(fixmap_pmd_p, 0, PAGE_SIZE); | ||
116 | set_pmd(pmd, __pmd(__pa(fixmap_pmd_p) + _PAGE_KERNEL_TABLE)); | 114 | set_pmd(pmd, __pmd(__pa(fixmap_pmd_p) + _PAGE_KERNEL_TABLE)); |
117 | 115 | ||
118 | #ifdef CONFIG_HIGHMEM | 116 | #ifdef CONFIG_HIGHMEM |
@@ -124,8 +122,7 @@ static void __init fixedrange_init(void) | |||
124 | pgd = swapper_pg_dir + pgd_index(vaddr); | 122 | pgd = swapper_pg_dir + pgd_index(vaddr); |
125 | pud = pud_offset(pgd, vaddr); | 123 | pud = pud_offset(pgd, vaddr); |
126 | pmd = pmd_offset(pud, vaddr); | 124 | pmd = pmd_offset(pud, vaddr); |
127 | pte = (pte_t *) __va(memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE)); | 125 | pte = memblock_alloc(PAGE_SIZE, PAGE_SIZE); |
128 | memset(pte, 0, PAGE_SIZE); | ||
129 | set_pmd(pmd, __pmd(__pa(pte) + _PAGE_KERNEL_TABLE)); | 126 | set_pmd(pmd, __pmd(__pa(pte) + _PAGE_KERNEL_TABLE)); |
130 | pkmap_page_table = pte; | 127 | pkmap_page_table = pte; |
131 | #endif /* CONFIG_HIGHMEM */ | 128 | #endif /* CONFIG_HIGHMEM */ |
@@ -150,8 +147,7 @@ void __init paging_init(void) | |||
150 | fixedrange_init(); | 147 | fixedrange_init(); |
151 | 148 | ||
152 | /* allocate space for empty_zero_page */ | 149 | /* allocate space for empty_zero_page */ |
153 | zero_page = __va(memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE)); | 150 | zero_page = memblock_alloc(PAGE_SIZE, PAGE_SIZE); |
154 | memset(zero_page, 0, PAGE_SIZE); | ||
155 | zone_sizes_init(); | 151 | zone_sizes_init(); |
156 | 152 | ||
157 | empty_zero_page = virt_to_page(zero_page); | 153 | empty_zero_page = virt_to_page(zero_page); |
diff --git a/arch/nios2/configs/10m50_defconfig b/arch/nios2/configs/10m50_defconfig index c601c8ff1ae6..7977ab7e2ca6 100644 --- a/arch/nios2/configs/10m50_defconfig +++ b/arch/nios2/configs/10m50_defconfig | |||
@@ -77,4 +77,3 @@ CONFIG_NFS_V3_ACL=y | |||
77 | CONFIG_ROOT_NFS=y | 77 | CONFIG_ROOT_NFS=y |
78 | CONFIG_SUNRPC_DEBUG=y | 78 | CONFIG_SUNRPC_DEBUG=y |
79 | CONFIG_DEBUG_INFO=y | 79 | CONFIG_DEBUG_INFO=y |
80 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
diff --git a/arch/nios2/configs/3c120_defconfig b/arch/nios2/configs/3c120_defconfig index fce33588d55c..ceb97cd85ac1 100644 --- a/arch/nios2/configs/3c120_defconfig +++ b/arch/nios2/configs/3c120_defconfig | |||
@@ -74,4 +74,3 @@ CONFIG_NFS_V3_ACL=y | |||
74 | CONFIG_ROOT_NFS=y | 74 | CONFIG_ROOT_NFS=y |
75 | CONFIG_SUNRPC_DEBUG=y | 75 | CONFIG_SUNRPC_DEBUG=y |
76 | CONFIG_DEBUG_INFO=y | 76 | CONFIG_DEBUG_INFO=y |
77 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
diff --git a/arch/nios2/mm/fault.c b/arch/nios2/mm/fault.c index 24fd84cf6006..eb65f17c158d 100644 --- a/arch/nios2/mm/fault.c +++ b/arch/nios2/mm/fault.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/extable.h> | 25 | #include <linux/extable.h> |
26 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
27 | #include <linux/ptrace.h> | ||
28 | 27 | ||
29 | #include <asm/mmu_context.h> | 28 | #include <asm/mmu_context.h> |
30 | #include <asm/traps.h> | 29 | #include <asm/traps.h> |
diff --git a/arch/openrisc/configs/or1ksim_defconfig b/arch/openrisc/configs/or1ksim_defconfig index a73aa90501be..d8ff4f8ffb88 100644 --- a/arch/openrisc/configs/or1ksim_defconfig +++ b/arch/openrisc/configs/or1ksim_defconfig | |||
@@ -54,5 +54,4 @@ CONFIG_SERIAL_OF_PLATFORM=y | |||
54 | # CONFIG_DNOTIFY is not set | 54 | # CONFIG_DNOTIFY is not set |
55 | CONFIG_TMPFS=y | 55 | CONFIG_TMPFS=y |
56 | CONFIG_NFS_FS=y | 56 | CONFIG_NFS_FS=y |
57 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
58 | # CONFIG_ENABLE_MUST_CHECK is not set | 57 | # CONFIG_ENABLE_MUST_CHECK is not set |
diff --git a/arch/openrisc/configs/simple_smp_defconfig b/arch/openrisc/configs/simple_smp_defconfig index b6e3c7e158e7..64278992df9c 100644 --- a/arch/openrisc/configs/simple_smp_defconfig +++ b/arch/openrisc/configs/simple_smp_defconfig | |||
@@ -61,6 +61,5 @@ CONFIG_SERIAL_OF_PLATFORM=y | |||
61 | CONFIG_TMPFS=y | 61 | CONFIG_TMPFS=y |
62 | CONFIG_NFS_FS=y | 62 | CONFIG_NFS_FS=y |
63 | CONFIG_XZ_DEC=y | 63 | CONFIG_XZ_DEC=y |
64 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
65 | # CONFIG_ENABLE_MUST_CHECK is not set | 64 | # CONFIG_ENABLE_MUST_CHECK is not set |
66 | # CONFIG_RCU_TRACE is not set | 65 | # CONFIG_RCU_TRACE is not set |
diff --git a/arch/openrisc/mm/ioremap.c b/arch/openrisc/mm/ioremap.c index 270d1c9bc0d6..051bcb4fefd3 100644 --- a/arch/openrisc/mm/ioremap.c +++ b/arch/openrisc/mm/ioremap.c | |||
@@ -122,13 +122,10 @@ pte_t __ref *pte_alloc_one_kernel(struct mm_struct *mm) | |||
122 | { | 122 | { |
123 | pte_t *pte; | 123 | pte_t *pte; |
124 | 124 | ||
125 | if (likely(mem_init_done)) { | 125 | if (likely(mem_init_done)) |
126 | pte = (pte_t *) __get_free_page(GFP_KERNEL); | 126 | pte = (pte_t *)get_zeroed_page(GFP_KERNEL); |
127 | } else { | 127 | else |
128 | pte = (pte_t *) __va(memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE)); | 128 | pte = memblock_alloc(PAGE_SIZE, PAGE_SIZE); |
129 | } | ||
130 | 129 | ||
131 | if (pte) | ||
132 | clear_page(pte); | ||
133 | return pte; | 130 | return pte; |
134 | } | 131 | } |
diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig index c2b1c4404683..e4bfb1101c0e 100644 --- a/arch/powerpc/configs/mpc512x_defconfig +++ b/arch/powerpc/configs/mpc512x_defconfig | |||
@@ -120,6 +120,5 @@ CONFIG_NFS_FS=y | |||
120 | CONFIG_ROOT_NFS=y | 120 | CONFIG_ROOT_NFS=y |
121 | CONFIG_NLS_CODEPAGE_437=y | 121 | CONFIG_NLS_CODEPAGE_437=y |
122 | CONFIG_NLS_ISO8859_1=y | 122 | CONFIG_NLS_ISO8859_1=y |
123 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
124 | # CONFIG_ENABLE_MUST_CHECK is not set | 123 | # CONFIG_ENABLE_MUST_CHECK is not set |
125 | # CONFIG_CRYPTO_HW is not set | 124 | # CONFIG_CRYPTO_HW is not set |
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig index 53687c3a70c4..7c6baf6df139 100644 --- a/arch/powerpc/configs/ppc6xx_defconfig +++ b/arch/powerpc/configs/ppc6xx_defconfig | |||
@@ -1123,7 +1123,6 @@ CONFIG_NLS_ISO8859_15=m | |||
1123 | CONFIG_NLS_KOI8_R=m | 1123 | CONFIG_NLS_KOI8_R=m |
1124 | CONFIG_NLS_KOI8_U=m | 1124 | CONFIG_NLS_KOI8_U=m |
1125 | CONFIG_DEBUG_INFO=y | 1125 | CONFIG_DEBUG_INFO=y |
1126 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
1127 | CONFIG_UNUSED_SYMBOLS=y | 1126 | CONFIG_UNUSED_SYMBOLS=y |
1128 | CONFIG_HEADERS_CHECK=y | 1127 | CONFIG_HEADERS_CHECK=y |
1129 | CONFIG_MAGIC_SYSRQ=y | 1128 | CONFIG_MAGIC_SYSRQ=y |
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index b8480127793d..8c890c6557ed 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -28,7 +28,7 @@ | |||
28 | static void *__init alloc_paca_data(unsigned long size, unsigned long align, | 28 | static void *__init alloc_paca_data(unsigned long size, unsigned long align, |
29 | unsigned long limit, int cpu) | 29 | unsigned long limit, int cpu) |
30 | { | 30 | { |
31 | unsigned long pa; | 31 | void *ptr; |
32 | int nid; | 32 | int nid; |
33 | 33 | ||
34 | /* | 34 | /* |
@@ -43,17 +43,15 @@ static void *__init alloc_paca_data(unsigned long size, unsigned long align, | |||
43 | nid = early_cpu_to_node(cpu); | 43 | nid = early_cpu_to_node(cpu); |
44 | } | 44 | } |
45 | 45 | ||
46 | pa = memblock_alloc_base_nid(size, align, limit, nid, MEMBLOCK_NONE); | 46 | ptr = memblock_alloc_try_nid(size, align, MEMBLOCK_LOW_LIMIT, |
47 | if (!pa) { | 47 | limit, nid); |
48 | pa = memblock_alloc_base(size, align, limit); | 48 | if (!ptr) |
49 | if (!pa) | 49 | panic("cannot allocate paca data"); |
50 | panic("cannot allocate paca data"); | ||
51 | } | ||
52 | 50 | ||
53 | if (cpu == boot_cpuid) | 51 | if (cpu == boot_cpuid) |
54 | memblock_set_bottom_up(false); | 52 | memblock_set_bottom_up(false); |
55 | 53 | ||
56 | return __va(pa); | 54 | return ptr; |
57 | } | 55 | } |
58 | 56 | ||
59 | #ifdef CONFIG_PPC_PSERIES | 57 | #ifdef CONFIG_PPC_PSERIES |
@@ -119,7 +117,6 @@ static struct slb_shadow * __init new_slb_shadow(int cpu, unsigned long limit) | |||
119 | } | 117 | } |
120 | 118 | ||
121 | s = alloc_paca_data(sizeof(*s), L1_CACHE_BYTES, limit, cpu); | 119 | s = alloc_paca_data(sizeof(*s), L1_CACHE_BYTES, limit, cpu); |
122 | memset(s, 0, sizeof(*s)); | ||
123 | 120 | ||
124 | s->persistent = cpu_to_be32(SLB_NUM_BOLTED); | 121 | s->persistent = cpu_to_be32(SLB_NUM_BOLTED); |
125 | s->buffer_length = cpu_to_be32(sizeof(*s)); | 122 | s->buffer_length = cpu_to_be32(sizeof(*s)); |
@@ -223,7 +220,6 @@ void __init allocate_paca(int cpu) | |||
223 | paca = alloc_paca_data(sizeof(struct paca_struct), L1_CACHE_BYTES, | 220 | paca = alloc_paca_data(sizeof(struct paca_struct), L1_CACHE_BYTES, |
224 | limit, cpu); | 221 | limit, cpu); |
225 | paca_ptrs[cpu] = paca; | 222 | paca_ptrs[cpu] = paca; |
226 | memset(paca, 0, sizeof(struct paca_struct)); | ||
227 | 223 | ||
228 | initialise_paca(paca, cpu); | 224 | initialise_paca(paca, cpu); |
229 | #ifdef CONFIG_PPC_PSERIES | 225 | #ifdef CONFIG_PPC_PSERIES |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index e7534f306c8e..f17868e19e2c 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -459,8 +459,8 @@ void __init smp_setup_cpu_maps(void) | |||
459 | 459 | ||
460 | DBG("smp_setup_cpu_maps()\n"); | 460 | DBG("smp_setup_cpu_maps()\n"); |
461 | 461 | ||
462 | cpu_to_phys_id = __va(memblock_phys_alloc(nr_cpu_ids * sizeof(u32), __alignof__(u32))); | 462 | cpu_to_phys_id = memblock_alloc(nr_cpu_ids * sizeof(u32), |
463 | memset(cpu_to_phys_id, 0, nr_cpu_ids * sizeof(u32)); | 463 | __alignof__(u32)); |
464 | 464 | ||
465 | for_each_node_by_type(dn, "cpu") { | 465 | for_each_node_by_type(dn, "cpu") { |
466 | const __be32 *intserv; | 466 | const __be32 *intserv; |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index daa361fc6a24..ff0aac42bb33 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -902,8 +902,9 @@ static void __ref init_fallback_flush(void) | |||
902 | * hardware prefetch runoff. We don't have a recipe for load patterns to | 902 | * hardware prefetch runoff. We don't have a recipe for load patterns to |
903 | * reliably avoid the prefetcher. | 903 | * reliably avoid the prefetcher. |
904 | */ | 904 | */ |
905 | l1d_flush_fallback_area = __va(memblock_alloc_base(l1d_size * 2, l1d_size, limit)); | 905 | l1d_flush_fallback_area = memblock_alloc_try_nid(l1d_size * 2, |
906 | memset(l1d_flush_fallback_area, 0, l1d_size * 2); | 906 | l1d_size, MEMBLOCK_LOW_LIMIT, |
907 | limit, NUMA_NO_NODE); | ||
907 | 908 | ||
908 | for_each_possible_cpu(cpu) { | 909 | for_each_possible_cpu(cpu) { |
909 | struct paca_struct *paca = paca_ptrs[cpu]; | 910 | struct paca_struct *paca = paca_ptrs[cpu]; |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 4aa0797000f7..3d4b2399192f 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -908,9 +908,9 @@ static void __init htab_initialize(void) | |||
908 | #ifdef CONFIG_DEBUG_PAGEALLOC | 908 | #ifdef CONFIG_DEBUG_PAGEALLOC |
909 | if (debug_pagealloc_enabled()) { | 909 | if (debug_pagealloc_enabled()) { |
910 | linear_map_hash_count = memblock_end_of_DRAM() >> PAGE_SHIFT; | 910 | linear_map_hash_count = memblock_end_of_DRAM() >> PAGE_SHIFT; |
911 | linear_map_hash_slots = __va(memblock_alloc_base( | 911 | linear_map_hash_slots = memblock_alloc_try_nid( |
912 | linear_map_hash_count, 1, ppc64_rma_size)); | 912 | linear_map_hash_count, 1, MEMBLOCK_LOW_LIMIT, |
913 | memset(linear_map_hash_slots, 0, linear_map_hash_count); | 913 | ppc64_rma_size, NUMA_NO_NODE); |
914 | } | 914 | } |
915 | #endif /* CONFIG_DEBUG_PAGEALLOC */ | 915 | #endif /* CONFIG_DEBUG_PAGEALLOC */ |
916 | 916 | ||
diff --git a/arch/powerpc/mm/pgtable-book3e.c b/arch/powerpc/mm/pgtable-book3e.c index e0ccf36714b2..53cbc7dc2df2 100644 --- a/arch/powerpc/mm/pgtable-book3e.c +++ b/arch/powerpc/mm/pgtable-book3e.c | |||
@@ -57,12 +57,8 @@ void vmemmap_remove_mapping(unsigned long start, | |||
57 | 57 | ||
58 | static __ref void *early_alloc_pgtable(unsigned long size) | 58 | static __ref void *early_alloc_pgtable(unsigned long size) |
59 | { | 59 | { |
60 | void *pt; | 60 | return memblock_alloc_try_nid(size, size, MEMBLOCK_LOW_LIMIT, |
61 | 61 | __pa(MAX_DMA_ADDRESS), NUMA_NO_NODE); | |
62 | pt = __va(memblock_alloc_base(size, size, __pa(MAX_DMA_ADDRESS))); | ||
63 | memset(pt, 0, size); | ||
64 | |||
65 | return pt; | ||
66 | } | 62 | } |
67 | 63 | ||
68 | /* | 64 | /* |
diff --git a/arch/powerpc/mm/pgtable-book3s64.c b/arch/powerpc/mm/pgtable-book3s64.c index e7da590c7a78..92a3e4c39540 100644 --- a/arch/powerpc/mm/pgtable-book3s64.c +++ b/arch/powerpc/mm/pgtable-book3s64.c | |||
@@ -195,11 +195,8 @@ void __init mmu_partition_table_init(void) | |||
195 | unsigned long ptcr; | 195 | unsigned long ptcr; |
196 | 196 | ||
197 | BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 36), "Partition table size too large."); | 197 | BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 36), "Partition table size too large."); |
198 | partition_tb = __va(memblock_alloc_base(patb_size, patb_size, | ||
199 | MEMBLOCK_ALLOC_ANYWHERE)); | ||
200 | |||
201 | /* Initialize the Partition Table with no entries */ | 198 | /* Initialize the Partition Table with no entries */ |
202 | memset((void *)partition_tb, 0, patb_size); | 199 | partition_tb = memblock_alloc(patb_size, patb_size); |
203 | 200 | ||
204 | /* | 201 | /* |
205 | * update partition table control register, | 202 | * update partition table control register, |
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index dced3cd241c2..e377684ac6ad 100644 --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c | |||
@@ -51,26 +51,15 @@ static int native_register_process_table(unsigned long base, unsigned long pg_sz | |||
51 | static __ref void *early_alloc_pgtable(unsigned long size, int nid, | 51 | static __ref void *early_alloc_pgtable(unsigned long size, int nid, |
52 | unsigned long region_start, unsigned long region_end) | 52 | unsigned long region_start, unsigned long region_end) |
53 | { | 53 | { |
54 | unsigned long pa = 0; | 54 | phys_addr_t min_addr = MEMBLOCK_LOW_LIMIT; |
55 | void *pt; | 55 | phys_addr_t max_addr = MEMBLOCK_ALLOC_ANYWHERE; |
56 | 56 | ||
57 | if (region_start || region_end) /* has region hint */ | 57 | if (region_start) |
58 | pa = memblock_alloc_range(size, size, region_start, region_end, | 58 | min_addr = region_start; |
59 | MEMBLOCK_NONE); | 59 | if (region_end) |
60 | else if (nid != -1) /* has node hint */ | 60 | max_addr = region_end; |
61 | pa = memblock_alloc_base_nid(size, size, | ||
62 | MEMBLOCK_ALLOC_ANYWHERE, | ||
63 | nid, MEMBLOCK_NONE); | ||
64 | 61 | ||
65 | if (!pa) | 62 | return memblock_alloc_try_nid(size, size, min_addr, max_addr, nid); |
66 | pa = memblock_alloc_base(size, size, MEMBLOCK_ALLOC_ANYWHERE); | ||
67 | |||
68 | BUG_ON(!pa); | ||
69 | |||
70 | pt = __va(pa); | ||
71 | memset(pt, 0, size); | ||
72 | |||
73 | return pt; | ||
74 | } | 63 | } |
75 | 64 | ||
76 | static int early_map_kernel_page(unsigned long ea, unsigned long pa, | 65 | static int early_map_kernel_page(unsigned long ea, unsigned long pa, |
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c index 2d5b0d50fb31..6c8a60b1e31d 100644 --- a/arch/powerpc/mm/ppc_mmu_32.c +++ b/arch/powerpc/mm/ppc_mmu_32.c | |||
@@ -339,8 +339,7 @@ void __init MMU_init_hw(void) | |||
339 | * Find some memory for the hash table. | 339 | * Find some memory for the hash table. |
340 | */ | 340 | */ |
341 | if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322); | 341 | if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322); |
342 | Hash = __va(memblock_phys_alloc(Hash_size, Hash_size)); | 342 | Hash = memblock_alloc(Hash_size, Hash_size); |
343 | memset(Hash, 0, Hash_size); | ||
344 | _SDR1 = __pa(Hash) | SDR1_LOW_BITS; | 343 | _SDR1 = __pa(Hash) | SDR1_LOW_BITS; |
345 | 344 | ||
346 | Hash_end = (struct hash_pte *) ((unsigned long)Hash + Hash_size); | 345 | Hash_end = (struct hash_pte *) ((unsigned long)Hash + Hash_size); |
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index bbeb6a1b0393..86368e238f6e 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
@@ -208,7 +208,9 @@ static int __init iob_init(struct device_node *dn) | |||
208 | pr_debug(" -> %s\n", __func__); | 208 | pr_debug(" -> %s\n", __func__); |
209 | 209 | ||
210 | /* For 2G space, 8x64 pages (2^21 bytes) is max total l2 size */ | 210 | /* For 2G space, 8x64 pages (2^21 bytes) is max total l2 size */ |
211 | iob_l2_base = (u32 *)__va(memblock_alloc_base(1UL<<21, 1UL<<21, 0x80000000)); | 211 | iob_l2_base = memblock_alloc_try_nid_raw(1UL << 21, 1UL << 21, |
212 | MEMBLOCK_LOW_LIMIT, 0x80000000, | ||
213 | NUMA_NO_NODE); | ||
212 | 214 | ||
213 | pr_info("IOBMAP L2 allocated at: %p\n", iob_l2_base); | 215 | pr_info("IOBMAP L2 allocated at: %p\n", iob_l2_base); |
214 | 216 | ||
@@ -269,4 +271,3 @@ void __init iommu_init_early_pasemi(void) | |||
269 | pasemi_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pasemi; | 271 | pasemi_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pasemi; |
270 | set_pci_dma_ops(&dma_iommu_ops); | 272 | set_pci_dma_ops(&dma_iommu_ops); |
271 | } | 273 | } |
272 | |||
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 2ca3ba95f8aa..727a7de08635 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c | |||
@@ -170,8 +170,7 @@ int __init early_init_dt_scan_recoverable_ranges(unsigned long node, | |||
170 | /* | 170 | /* |
171 | * Allocate a buffer to hold the MC recoverable ranges. | 171 | * Allocate a buffer to hold the MC recoverable ranges. |
172 | */ | 172 | */ |
173 | mc_recoverable_range =__va(memblock_phys_alloc(size, __alignof__(u64))); | 173 | mc_recoverable_range = memblock_alloc(size, __alignof__(u64)); |
174 | memset(mc_recoverable_range, 0, size); | ||
175 | 174 | ||
176 | for (i = 0; i < mc_recoverable_range_len; i++) { | 175 | for (i = 0; i < mc_recoverable_range_len; i++) { |
177 | mc_recoverable_range[i].start_addr = | 176 | mc_recoverable_range[i].start_addr = |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 41f62ca27c63..e4f0dfd4ae33 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -130,8 +130,13 @@ static void __init fwnmi_init(void) | |||
130 | * It will be used in real mode mce handler, hence it needs to be | 130 | * It will be used in real mode mce handler, hence it needs to be |
131 | * below RMA. | 131 | * below RMA. |
132 | */ | 132 | */ |
133 | mce_data_buf = __va(memblock_alloc_base(RTAS_ERROR_LOG_MAX * nr_cpus, | 133 | mce_data_buf = memblock_alloc_try_nid_raw(RTAS_ERROR_LOG_MAX * nr_cpus, |
134 | RTAS_ERROR_LOG_MAX, ppc64_rma_size)); | 134 | RTAS_ERROR_LOG_MAX, MEMBLOCK_LOW_LIMIT, |
135 | ppc64_rma_size, NUMA_NO_NODE); | ||
136 | if (!mce_data_buf) | ||
137 | panic("Failed to allocate %d bytes below %pa for MCE buffer\n", | ||
138 | RTAS_ERROR_LOG_MAX * nr_cpus, &ppc64_rma_size); | ||
139 | |||
135 | for_each_possible_cpu(i) { | 140 | for_each_possible_cpu(i) { |
136 | paca_ptrs[i]->mce_data_buf = mce_data_buf + | 141 | paca_ptrs[i]->mce_data_buf = mce_data_buf + |
137 | (RTAS_ERROR_LOG_MAX * i); | 142 | (RTAS_ERROR_LOG_MAX * i); |
@@ -140,8 +145,13 @@ static void __init fwnmi_init(void) | |||
140 | #ifdef CONFIG_PPC_BOOK3S_64 | 145 | #ifdef CONFIG_PPC_BOOK3S_64 |
141 | /* Allocate per cpu slb area to save old slb contents during MCE */ | 146 | /* Allocate per cpu slb area to save old slb contents during MCE */ |
142 | size = sizeof(struct slb_entry) * mmu_slb_size * nr_cpus; | 147 | size = sizeof(struct slb_entry) * mmu_slb_size * nr_cpus; |
143 | slb_ptr = __va(memblock_alloc_base(size, sizeof(struct slb_entry), | 148 | slb_ptr = memblock_alloc_try_nid_raw(size, sizeof(struct slb_entry), |
144 | ppc64_rma_size)); | 149 | MEMBLOCK_LOW_LIMIT, ppc64_rma_size, |
150 | NUMA_NO_NODE); | ||
151 | if (!slb_ptr) | ||
152 | panic("Failed to allocate %zu bytes below %pa for slb area\n", | ||
153 | size, &ppc64_rma_size); | ||
154 | |||
145 | for_each_possible_cpu(i) | 155 | for_each_possible_cpu(i) |
146 | paca_ptrs[i]->mce_faulty_slbs = slb_ptr + (mmu_slb_size * i); | 156 | paca_ptrs[i]->mce_faulty_slbs = slb_ptr + (mmu_slb_size * i); |
147 | #endif | 157 | #endif |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 809797dbe169..fc5c5c23303e 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -251,8 +251,11 @@ static void allocate_dart(void) | |||
251 | * 16MB (1 << 24) alignment. We allocate a full 16Mb chuck since we | 251 | * 16MB (1 << 24) alignment. We allocate a full 16Mb chuck since we |
252 | * will blow up an entire large page anyway in the kernel mapping. | 252 | * will blow up an entire large page anyway in the kernel mapping. |
253 | */ | 253 | */ |
254 | dart_tablebase = __va(memblock_alloc_base(1UL<<24, | 254 | dart_tablebase = memblock_alloc_try_nid_raw(SZ_16M, SZ_16M, |
255 | 1UL<<24, 0x80000000L)); | 255 | MEMBLOCK_LOW_LIMIT, SZ_2G, |
256 | NUMA_NO_NODE); | ||
257 | if (!dart_tablebase) | ||
258 | panic("Failed to allocate 16MB below 2GB for DART table\n"); | ||
256 | 259 | ||
257 | /* There is no point scanning the DART space for leaks*/ | 260 | /* There is no point scanning the DART space for leaks*/ |
258 | kmemleak_no_scan((void *)dart_tablebase); | 261 | kmemleak_no_scan((void *)dart_tablebase); |
diff --git a/arch/s390/numa/numa.c b/arch/s390/numa/numa.c index d31bde0870d8..2d1271e2a70d 100644 --- a/arch/s390/numa/numa.c +++ b/arch/s390/numa/numa.c | |||
@@ -58,18 +58,6 @@ EXPORT_SYMBOL(__node_distance); | |||
58 | int numa_debug_enabled; | 58 | int numa_debug_enabled; |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * alloc_node_data() - Allocate node data | ||
62 | */ | ||
63 | static __init pg_data_t *alloc_node_data(void) | ||
64 | { | ||
65 | pg_data_t *res; | ||
66 | |||
67 | res = (pg_data_t *) memblock_phys_alloc(sizeof(pg_data_t), 8); | ||
68 | memset(res, 0, sizeof(pg_data_t)); | ||
69 | return res; | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * numa_setup_memory() - Assign bootmem to nodes | 61 | * numa_setup_memory() - Assign bootmem to nodes |
74 | * | 62 | * |
75 | * The memory is first added to memblock without any respect to nodes. | 63 | * The memory is first added to memblock without any respect to nodes. |
@@ -105,7 +93,7 @@ static void __init numa_setup_memory(void) | |||
105 | 93 | ||
106 | /* Allocate and fill out node_data */ | 94 | /* Allocate and fill out node_data */ |
107 | for (nid = 0; nid < MAX_NUMNODES; nid++) | 95 | for (nid = 0; nid < MAX_NUMNODES; nid++) |
108 | NODE_DATA(nid) = alloc_node_data(); | 96 | NODE_DATA(nid) = memblock_alloc(sizeof(pg_data_t), 8); |
109 | 97 | ||
110 | for_each_online_node(nid) { | 98 | for_each_online_node(nid) { |
111 | unsigned long start_pfn, end_pfn; | 99 | unsigned long start_pfn, end_pfn; |
diff --git a/arch/sh/configs/apsh4a3a_defconfig b/arch/sh/configs/apsh4a3a_defconfig index 4710df43a5b5..6c7cdc3beb28 100644 --- a/arch/sh/configs/apsh4a3a_defconfig +++ b/arch/sh/configs/apsh4a3a_defconfig | |||
@@ -81,7 +81,6 @@ CONFIG_NLS_CODEPAGE_932=y | |||
81 | CONFIG_NLS_ASCII=y | 81 | CONFIG_NLS_ASCII=y |
82 | CONFIG_NLS_ISO8859_1=y | 82 | CONFIG_NLS_ISO8859_1=y |
83 | CONFIG_NLS_UTF8=y | 83 | CONFIG_NLS_UTF8=y |
84 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
85 | # CONFIG_ENABLE_MUST_CHECK is not set | 84 | # CONFIG_ENABLE_MUST_CHECK is not set |
86 | CONFIG_DEBUG_FS=y | 85 | CONFIG_DEBUG_FS=y |
87 | CONFIG_DEBUG_KERNEL=y | 86 | CONFIG_DEBUG_KERNEL=y |
diff --git a/arch/sh/configs/edosk7705_defconfig b/arch/sh/configs/edosk7705_defconfig index db756e099052..ef7cc31997b1 100644 --- a/arch/sh/configs/edosk7705_defconfig +++ b/arch/sh/configs/edosk7705_defconfig | |||
@@ -32,6 +32,5 @@ CONFIG_SH_PCLK_FREQ=31250000 | |||
32 | # CONFIG_DNOTIFY is not set | 32 | # CONFIG_DNOTIFY is not set |
33 | # CONFIG_PROC_FS is not set | 33 | # CONFIG_PROC_FS is not set |
34 | # CONFIG_SYSFS is not set | 34 | # CONFIG_SYSFS is not set |
35 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
36 | # CONFIG_ENABLE_MUST_CHECK is not set | 35 | # CONFIG_ENABLE_MUST_CHECK is not set |
37 | # CONFIG_CRC32 is not set | 36 | # CONFIG_CRC32 is not set |
diff --git a/arch/sh/configs/espt_defconfig b/arch/sh/configs/espt_defconfig index 2985fe7c6d50..444d75947e70 100644 --- a/arch/sh/configs/espt_defconfig +++ b/arch/sh/configs/espt_defconfig | |||
@@ -111,7 +111,6 @@ CONFIG_NLS_ISO8859_15=y | |||
111 | CONFIG_NLS_KOI8_R=y | 111 | CONFIG_NLS_KOI8_R=y |
112 | CONFIG_NLS_KOI8_U=y | 112 | CONFIG_NLS_KOI8_U=y |
113 | CONFIG_NLS_UTF8=y | 113 | CONFIG_NLS_UTF8=y |
114 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
115 | # CONFIG_ENABLE_MUST_CHECK is not set | 114 | # CONFIG_ENABLE_MUST_CHECK is not set |
116 | CONFIG_DEBUG_FS=y | 115 | CONFIG_DEBUG_FS=y |
117 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 116 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
diff --git a/arch/sh/configs/sdk7786_defconfig b/arch/sh/configs/sdk7786_defconfig index e9ee0c878ead..d16e9334cd98 100644 --- a/arch/sh/configs/sdk7786_defconfig +++ b/arch/sh/configs/sdk7786_defconfig | |||
@@ -209,7 +209,6 @@ CONFIG_NLS_ISO8859_1=y | |||
209 | CONFIG_NLS_ISO8859_15=m | 209 | CONFIG_NLS_ISO8859_15=m |
210 | CONFIG_NLS_UTF8=m | 210 | CONFIG_NLS_UTF8=m |
211 | CONFIG_PRINTK_TIME=y | 211 | CONFIG_PRINTK_TIME=y |
212 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
213 | # CONFIG_ENABLE_MUST_CHECK is not set | 212 | # CONFIG_ENABLE_MUST_CHECK is not set |
214 | CONFIG_MAGIC_SYSRQ=y | 213 | CONFIG_MAGIC_SYSRQ=y |
215 | CONFIG_DEBUG_KERNEL=y | 214 | CONFIG_DEBUG_KERNEL=y |
diff --git a/arch/sh/configs/sh2007_defconfig b/arch/sh/configs/sh2007_defconfig index 34094e05e892..a1cf6447dbb1 100644 --- a/arch/sh/configs/sh2007_defconfig +++ b/arch/sh/configs/sh2007_defconfig | |||
@@ -157,7 +157,6 @@ CONFIG_NLS_ISO8859_15=y | |||
157 | CONFIG_NLS_KOI8_R=y | 157 | CONFIG_NLS_KOI8_R=y |
158 | CONFIG_NLS_KOI8_U=y | 158 | CONFIG_NLS_KOI8_U=y |
159 | CONFIG_NLS_UTF8=y | 159 | CONFIG_NLS_UTF8=y |
160 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
161 | # CONFIG_ENABLE_MUST_CHECK is not set | 160 | # CONFIG_ENABLE_MUST_CHECK is not set |
162 | CONFIG_DEBUG_FS=y | 161 | CONFIG_DEBUG_FS=y |
163 | CONFIG_DEBUG_KERNEL=y | 162 | CONFIG_DEBUG_KERNEL=y |
diff --git a/arch/sh/configs/sh7724_generic_defconfig b/arch/sh/configs/sh7724_generic_defconfig index d15e53647983..d04bc27aa816 100644 --- a/arch/sh/configs/sh7724_generic_defconfig +++ b/arch/sh/configs/sh7724_generic_defconfig | |||
@@ -40,6 +40,5 @@ CONFIG_UIO_PDRV_GENIRQ=y | |||
40 | # CONFIG_PROC_FS is not set | 40 | # CONFIG_PROC_FS is not set |
41 | # CONFIG_SYSFS is not set | 41 | # CONFIG_SYSFS is not set |
42 | # CONFIG_MISC_FILESYSTEMS is not set | 42 | # CONFIG_MISC_FILESYSTEMS is not set |
43 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
44 | # CONFIG_ENABLE_MUST_CHECK is not set | 43 | # CONFIG_ENABLE_MUST_CHECK is not set |
45 | # CONFIG_CRC32 is not set | 44 | # CONFIG_CRC32 is not set |
diff --git a/arch/sh/configs/sh7763rdp_defconfig b/arch/sh/configs/sh7763rdp_defconfig index 2ef780fb9813..405bf62d22d0 100644 --- a/arch/sh/configs/sh7763rdp_defconfig +++ b/arch/sh/configs/sh7763rdp_defconfig | |||
@@ -113,7 +113,6 @@ CONFIG_NLS_ISO8859_15=y | |||
113 | CONFIG_NLS_KOI8_R=y | 113 | CONFIG_NLS_KOI8_R=y |
114 | CONFIG_NLS_KOI8_U=y | 114 | CONFIG_NLS_KOI8_U=y |
115 | CONFIG_NLS_UTF8=y | 115 | CONFIG_NLS_UTF8=y |
116 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
117 | # CONFIG_ENABLE_MUST_CHECK is not set | 116 | # CONFIG_ENABLE_MUST_CHECK is not set |
118 | CONFIG_DEBUG_FS=y | 117 | CONFIG_DEBUG_FS=y |
119 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 118 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
diff --git a/arch/sh/configs/sh7770_generic_defconfig b/arch/sh/configs/sh7770_generic_defconfig index 742634b37c0a..e5b733c2d988 100644 --- a/arch/sh/configs/sh7770_generic_defconfig +++ b/arch/sh/configs/sh7770_generic_defconfig | |||
@@ -42,6 +42,5 @@ CONFIG_UIO_PDRV_GENIRQ=y | |||
42 | # CONFIG_PROC_FS is not set | 42 | # CONFIG_PROC_FS is not set |
43 | # CONFIG_SYSFS is not set | 43 | # CONFIG_SYSFS is not set |
44 | # CONFIG_MISC_FILESYSTEMS is not set | 44 | # CONFIG_MISC_FILESYSTEMS is not set |
45 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
46 | # CONFIG_ENABLE_MUST_CHECK is not set | 45 | # CONFIG_ENABLE_MUST_CHECK is not set |
47 | # CONFIG_CRC32 is not set | 46 | # CONFIG_CRC32 is not set |
diff --git a/arch/sh/configs/sh7785lcr_defconfig b/arch/sh/configs/sh7785lcr_defconfig index 7098828d392e..5201bb78c6f9 100644 --- a/arch/sh/configs/sh7785lcr_defconfig +++ b/arch/sh/configs/sh7785lcr_defconfig | |||
@@ -109,7 +109,6 @@ CONFIG_NFSD_V4=y | |||
109 | CONFIG_NLS_CODEPAGE_437=y | 109 | CONFIG_NLS_CODEPAGE_437=y |
110 | CONFIG_NLS_CODEPAGE_932=y | 110 | CONFIG_NLS_CODEPAGE_932=y |
111 | CONFIG_NLS_ISO8859_1=y | 111 | CONFIG_NLS_ISO8859_1=y |
112 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
113 | # CONFIG_ENABLE_MUST_CHECK is not set | 112 | # CONFIG_ENABLE_MUST_CHECK is not set |
114 | CONFIG_DEBUG_KERNEL=y | 113 | CONFIG_DEBUG_KERNEL=y |
115 | CONFIG_DETECT_HUNG_TASK=y | 114 | CONFIG_DETECT_HUNG_TASK=y |
diff --git a/arch/sh/configs/ul2_defconfig b/arch/sh/configs/ul2_defconfig index 5f2921a85192..1b7412df12e0 100644 --- a/arch/sh/configs/ul2_defconfig +++ b/arch/sh/configs/ul2_defconfig | |||
@@ -82,7 +82,6 @@ CONFIG_NFSD=y | |||
82 | CONFIG_NLS_CODEPAGE_437=y | 82 | CONFIG_NLS_CODEPAGE_437=y |
83 | CONFIG_NLS_CODEPAGE_932=y | 83 | CONFIG_NLS_CODEPAGE_932=y |
84 | CONFIG_NLS_ISO8859_1=y | 84 | CONFIG_NLS_ISO8859_1=y |
85 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
86 | # CONFIG_ENABLE_MUST_CHECK is not set | 85 | # CONFIG_ENABLE_MUST_CHECK is not set |
87 | CONFIG_CRYPTO_MICHAEL_MIC=y | 86 | CONFIG_CRYPTO_MICHAEL_MIC=y |
88 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 87 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
diff --git a/arch/sh/configs/urquell_defconfig b/arch/sh/configs/urquell_defconfig index 7d5591b7c088..f891045e633a 100644 --- a/arch/sh/configs/urquell_defconfig +++ b/arch/sh/configs/urquell_defconfig | |||
@@ -136,7 +136,6 @@ CONFIG_NLS_CODEPAGE_437=y | |||
136 | CONFIG_NLS_CODEPAGE_932=y | 136 | CONFIG_NLS_CODEPAGE_932=y |
137 | CONFIG_NLS_ISO8859_1=y | 137 | CONFIG_NLS_ISO8859_1=y |
138 | CONFIG_PRINTK_TIME=y | 138 | CONFIG_PRINTK_TIME=y |
139 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
140 | # CONFIG_ENABLE_MUST_CHECK is not set | 139 | # CONFIG_ENABLE_MUST_CHECK is not set |
141 | CONFIG_DEBUG_FS=y | 140 | CONFIG_DEBUG_FS=y |
142 | CONFIG_DEBUG_KERNEL=y | 141 | CONFIG_DEBUG_KERNEL=y |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index a8e5c0e00fca..a0fa4de03dd5 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -192,24 +192,16 @@ void __init page_table_range_init(unsigned long start, unsigned long end, | |||
192 | void __init allocate_pgdat(unsigned int nid) | 192 | void __init allocate_pgdat(unsigned int nid) |
193 | { | 193 | { |
194 | unsigned long start_pfn, end_pfn; | 194 | unsigned long start_pfn, end_pfn; |
195 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
196 | unsigned long phys; | ||
197 | #endif | ||
198 | 195 | ||
199 | get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); | 196 | get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); |
200 | 197 | ||
201 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 198 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
202 | phys = __memblock_alloc_base(sizeof(struct pglist_data), | 199 | NODE_DATA(nid) = memblock_alloc_try_nid_nopanic( |
203 | SMP_CACHE_BYTES, end_pfn << PAGE_SHIFT); | 200 | sizeof(struct pglist_data), |
204 | /* Retry with all of system memory */ | 201 | SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, |
205 | if (!phys) | 202 | MEMBLOCK_ALLOC_ACCESSIBLE, nid); |
206 | phys = __memblock_alloc_base(sizeof(struct pglist_data), | 203 | if (!NODE_DATA(nid)) |
207 | SMP_CACHE_BYTES, memblock_end_of_DRAM()); | ||
208 | if (!phys) | ||
209 | panic("Can't allocate pgdat for node %d\n", nid); | 204 | panic("Can't allocate pgdat for node %d\n", nid); |
210 | |||
211 | NODE_DATA(nid) = __va(phys); | ||
212 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); | ||
213 | #endif | 205 | #endif |
214 | 206 | ||
215 | NODE_DATA(nid)->node_start_pfn = start_pfn; | 207 | NODE_DATA(nid)->node_start_pfn = start_pfn; |
diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c index 830e8b3684e4..c4bde6148810 100644 --- a/arch/sh/mm/numa.c +++ b/arch/sh/mm/numa.c | |||
@@ -41,9 +41,8 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end) | |||
41 | __add_active_range(nid, start_pfn, end_pfn); | 41 | __add_active_range(nid, start_pfn, end_pfn); |
42 | 42 | ||
43 | /* Node-local pgdat */ | 43 | /* Node-local pgdat */ |
44 | NODE_DATA(nid) = __va(memblock_alloc_base(sizeof(struct pglist_data), | 44 | NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), |
45 | SMP_CACHE_BYTES, end)); | 45 | SMP_CACHE_BYTES, nid); |
46 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); | ||
47 | 46 | ||
48 | NODE_DATA(nid)->node_start_pfn = start_pfn; | 47 | NODE_DATA(nid)->node_start_pfn = start_pfn; |
49 | NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; | 48 | NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; |
diff --git a/arch/sparc/configs/sparc32_defconfig b/arch/sparc/configs/sparc32_defconfig index 207a43a2d8b3..2d4f34c52c67 100644 --- a/arch/sparc/configs/sparc32_defconfig +++ b/arch/sparc/configs/sparc32_defconfig | |||
@@ -75,7 +75,6 @@ CONFIG_NFS_FS=y | |||
75 | CONFIG_ROOT_NFS=y | 75 | CONFIG_ROOT_NFS=y |
76 | CONFIG_RPCSEC_GSS_KRB5=m | 76 | CONFIG_RPCSEC_GSS_KRB5=m |
77 | CONFIG_NLS=y | 77 | CONFIG_NLS=y |
78 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
79 | CONFIG_DEBUG_KERNEL=y | 78 | CONFIG_DEBUG_KERNEL=y |
80 | CONFIG_DETECT_HUNG_TASK=y | 79 | CONFIG_DETECT_HUNG_TASK=y |
81 | # CONFIG_SCHED_DEBUG is not set | 80 | # CONFIG_SCHED_DEBUG is not set |
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig index 4d4e1cc6402f..ea547d596fcf 100644 --- a/arch/sparc/configs/sparc64_defconfig +++ b/arch/sparc/configs/sparc64_defconfig | |||
@@ -201,7 +201,6 @@ CONFIG_PROC_KCORE=y | |||
201 | CONFIG_TMPFS=y | 201 | CONFIG_TMPFS=y |
202 | CONFIG_HUGETLBFS=y | 202 | CONFIG_HUGETLBFS=y |
203 | CONFIG_PRINTK_TIME=y | 203 | CONFIG_PRINTK_TIME=y |
204 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
205 | CONFIG_MAGIC_SYSRQ=y | 204 | CONFIG_MAGIC_SYSRQ=y |
206 | CONFIG_DEBUG_KERNEL=y | 205 | CONFIG_DEBUG_KERNEL=y |
207 | CONFIG_LOCKUP_DETECTOR=y | 206 | CONFIG_LOCKUP_DETECTOR=y |
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c index e897a4ded3a1..c50ff1fee0e6 100644 --- a/arch/sparc/kernel/prom_64.c +++ b/arch/sparc/kernel/prom_64.c | |||
@@ -34,16 +34,13 @@ | |||
34 | 34 | ||
35 | void * __init prom_early_alloc(unsigned long size) | 35 | void * __init prom_early_alloc(unsigned long size) |
36 | { | 36 | { |
37 | unsigned long paddr = memblock_phys_alloc(size, SMP_CACHE_BYTES); | 37 | void *ret = memblock_alloc(size, SMP_CACHE_BYTES); |
38 | void *ret; | ||
39 | 38 | ||
40 | if (!paddr) { | 39 | if (!ret) { |
41 | prom_printf("prom_early_alloc(%lu) failed\n", size); | 40 | prom_printf("prom_early_alloc(%lu) failed\n", size); |
42 | prom_halt(); | 41 | prom_halt(); |
43 | } | 42 | } |
44 | 43 | ||
45 | ret = __va(paddr); | ||
46 | memset(ret, 0, size); | ||
47 | prom_early_allocated += size; | 44 | prom_early_allocated += size; |
48 | 45 | ||
49 | return ret; | 46 | return ret; |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 9e6bd868ba6f..ef340e8f209f 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -1089,16 +1089,13 @@ static void __init allocate_node_data(int nid) | |||
1089 | struct pglist_data *p; | 1089 | struct pglist_data *p; |
1090 | unsigned long start_pfn, end_pfn; | 1090 | unsigned long start_pfn, end_pfn; |
1091 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 1091 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
1092 | unsigned long paddr; | ||
1093 | 1092 | ||
1094 | paddr = memblock_phys_alloc_try_nid(sizeof(struct pglist_data), | 1093 | NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), |
1095 | SMP_CACHE_BYTES, nid); | 1094 | SMP_CACHE_BYTES, nid); |
1096 | if (!paddr) { | 1095 | if (!NODE_DATA(nid)) { |
1097 | prom_printf("Cannot allocate pglist_data for nid[%d]\n", nid); | 1096 | prom_printf("Cannot allocate pglist_data for nid[%d]\n", nid); |
1098 | prom_halt(); | 1097 | prom_halt(); |
1099 | } | 1098 | } |
1100 | NODE_DATA(nid) = __va(paddr); | ||
1101 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); | ||
1102 | 1099 | ||
1103 | NODE_DATA(nid)->node_id = nid; | 1100 | NODE_DATA(nid)->node_id = nid; |
1104 | #endif | 1101 | #endif |
diff --git a/arch/unicore32/mm/init.c b/arch/unicore32/mm/init.c index 85ef2c624090..74b6a2e29809 100644 --- a/arch/unicore32/mm/init.c +++ b/arch/unicore32/mm/init.c | |||
@@ -274,30 +274,6 @@ void __init mem_init(void) | |||
274 | memblock_free_all(); | 274 | memblock_free_all(); |
275 | 275 | ||
276 | mem_init_print_info(NULL); | 276 | mem_init_print_info(NULL); |
277 | printk(KERN_NOTICE "Virtual kernel memory layout:\n" | ||
278 | " vector : 0x%08lx - 0x%08lx (%4ld kB)\n" | ||
279 | " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n" | ||
280 | " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n" | ||
281 | " modules : 0x%08lx - 0x%08lx (%4ld MB)\n" | ||
282 | " .init : 0x%p" " - 0x%p" " (%4d kB)\n" | ||
283 | " .text : 0x%p" " - 0x%p" " (%4d kB)\n" | ||
284 | " .data : 0x%p" " - 0x%p" " (%4d kB)\n", | ||
285 | |||
286 | VECTORS_BASE, VECTORS_BASE + PAGE_SIZE, | ||
287 | DIV_ROUND_UP(PAGE_SIZE, SZ_1K), | ||
288 | VMALLOC_START, VMALLOC_END, | ||
289 | DIV_ROUND_UP((VMALLOC_END - VMALLOC_START), SZ_1M), | ||
290 | PAGE_OFFSET, (unsigned long)high_memory, | ||
291 | DIV_ROUND_UP(((unsigned long)high_memory - PAGE_OFFSET), SZ_1M), | ||
292 | MODULES_VADDR, MODULES_END, | ||
293 | DIV_ROUND_UP((MODULES_END - MODULES_VADDR), SZ_1M), | ||
294 | |||
295 | __init_begin, __init_end, | ||
296 | DIV_ROUND_UP((__init_end - __init_begin), SZ_1K), | ||
297 | _stext, _etext, | ||
298 | DIV_ROUND_UP((_etext - _stext), SZ_1K), | ||
299 | _sdata, _edata, | ||
300 | DIV_ROUND_UP((_edata - _sdata), SZ_1K)); | ||
301 | 277 | ||
302 | BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR); | 278 | BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR); |
303 | BUG_ON(TASK_SIZE > MODULES_VADDR); | 279 | BUG_ON(TASK_SIZE > MODULES_VADDR); |
diff --git a/arch/unicore32/mm/mmu.c b/arch/unicore32/mm/mmu.c index 040a8c279761..a40219291965 100644 --- a/arch/unicore32/mm/mmu.c +++ b/arch/unicore32/mm/mmu.c | |||
@@ -141,18 +141,12 @@ static void __init build_mem_type_table(void) | |||
141 | 141 | ||
142 | #define vectors_base() (vectors_high() ? 0xffff0000 : 0) | 142 | #define vectors_base() (vectors_high() ? 0xffff0000 : 0) |
143 | 143 | ||
144 | static void __init *early_alloc(unsigned long sz) | ||
145 | { | ||
146 | void *ptr = __va(memblock_phys_alloc(sz, sz)); | ||
147 | memset(ptr, 0, sz); | ||
148 | return ptr; | ||
149 | } | ||
150 | |||
151 | static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, | 144 | static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, |
152 | unsigned long prot) | 145 | unsigned long prot) |
153 | { | 146 | { |
154 | if (pmd_none(*pmd)) { | 147 | if (pmd_none(*pmd)) { |
155 | pte_t *pte = early_alloc(PTRS_PER_PTE * sizeof(pte_t)); | 148 | pte_t *pte = memblock_alloc(PTRS_PER_PTE * sizeof(pte_t), |
149 | PTRS_PER_PTE * sizeof(pte_t)); | ||
156 | __pmd_populate(pmd, __pa(pte) | prot); | 150 | __pmd_populate(pmd, __pa(pte) | prot); |
157 | } | 151 | } |
158 | BUG_ON(pmd_bad(*pmd)); | 152 | BUG_ON(pmd_bad(*pmd)); |
@@ -354,7 +348,7 @@ static void __init devicemaps_init(void) | |||
354 | /* | 348 | /* |
355 | * Allocate the vector page early. | 349 | * Allocate the vector page early. |
356 | */ | 350 | */ |
357 | vectors = early_alloc(PAGE_SIZE); | 351 | vectors = memblock_alloc(PAGE_SIZE, PAGE_SIZE); |
358 | 352 | ||
359 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) | 353 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) |
360 | pmd_clear(pmd_off_k(addr)); | 354 | pmd_clear(pmd_off_k(addr)); |
@@ -431,7 +425,7 @@ void __init paging_init(void) | |||
431 | top_pmd = pmd_off_k(0xffff0000); | 425 | top_pmd = pmd_off_k(0xffff0000); |
432 | 426 | ||
433 | /* allocate the zero page. */ | 427 | /* allocate the zero page. */ |
434 | zero_page = early_alloc(PAGE_SIZE); | 428 | zero_page = memblock_alloc(PAGE_SIZE, PAGE_SIZE); |
435 | 429 | ||
436 | bootmem_init(); | 430 | bootmem_init(); |
437 | 431 | ||
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig index 5d946f4a881f..9f908112bbb9 100644 --- a/arch/x86/configs/i386_defconfig +++ b/arch/x86/configs/i386_defconfig | |||
@@ -287,7 +287,6 @@ CONFIG_NLS_ASCII=y | |||
287 | CONFIG_NLS_ISO8859_1=y | 287 | CONFIG_NLS_ISO8859_1=y |
288 | CONFIG_NLS_UTF8=y | 288 | CONFIG_NLS_UTF8=y |
289 | CONFIG_PRINTK_TIME=y | 289 | CONFIG_PRINTK_TIME=y |
290 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
291 | CONFIG_FRAME_WARN=1024 | 290 | CONFIG_FRAME_WARN=1024 |
292 | CONFIG_MAGIC_SYSRQ=y | 291 | CONFIG_MAGIC_SYSRQ=y |
293 | # CONFIG_UNUSED_SYMBOLS is not set | 292 | # CONFIG_UNUSED_SYMBOLS is not set |
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig index 300ad569d6a7..1d3badfda09e 100644 --- a/arch/x86/configs/x86_64_defconfig +++ b/arch/x86/configs/x86_64_defconfig | |||
@@ -286,7 +286,6 @@ CONFIG_NLS_ASCII=y | |||
286 | CONFIG_NLS_ISO8859_1=y | 286 | CONFIG_NLS_ISO8859_1=y |
287 | CONFIG_NLS_UTF8=y | 287 | CONFIG_NLS_UTF8=y |
288 | CONFIG_PRINTK_TIME=y | 288 | CONFIG_PRINTK_TIME=y |
289 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
290 | CONFIG_MAGIC_SYSRQ=y | 289 | CONFIG_MAGIC_SYSRQ=y |
291 | # CONFIG_UNUSED_SYMBOLS is not set | 290 | # CONFIG_UNUSED_SYMBOLS is not set |
292 | CONFIG_DEBUG_KERNEL=y | 291 | CONFIG_DEBUG_KERNEL=y |
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 9d5c75f02295..667f1da36208 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -1031,7 +1031,7 @@ bad_area_access_error(struct pt_regs *regs, unsigned long error_code, | |||
1031 | 1031 | ||
1032 | static void | 1032 | static void |
1033 | do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address, | 1033 | do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address, |
1034 | unsigned int fault) | 1034 | vm_fault_t fault) |
1035 | { | 1035 | { |
1036 | struct task_struct *tsk = current; | 1036 | struct task_struct *tsk = current; |
1037 | 1037 | ||
diff --git a/crypto/Makefile b/crypto/Makefile index 799ed5e94606..fb5bf2a3a666 100644 --- a/crypto/Makefile +++ b/crypto/Makefile | |||
@@ -128,7 +128,7 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c_generic.o | |||
128 | obj-$(CONFIG_CRYPTO_CRC32) += crc32_generic.o | 128 | obj-$(CONFIG_CRYPTO_CRC32) += crc32_generic.o |
129 | obj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif_common.o crct10dif_generic.o | 129 | obj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif_common.o crct10dif_generic.o |
130 | obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o | 130 | obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o |
131 | obj-$(CONFIG_CRYPTO_LZO) += lzo.o | 131 | obj-$(CONFIG_CRYPTO_LZO) += lzo.o lzo-rle.o |
132 | obj-$(CONFIG_CRYPTO_LZ4) += lz4.o | 132 | obj-$(CONFIG_CRYPTO_LZ4) += lz4.o |
133 | obj-$(CONFIG_CRYPTO_LZ4HC) += lz4hc.o | 133 | obj-$(CONFIG_CRYPTO_LZ4HC) += lz4hc.o |
134 | obj-$(CONFIG_CRYPTO_842) += 842.o | 134 | obj-$(CONFIG_CRYPTO_842) += 842.o |
diff --git a/crypto/lzo-rle.c b/crypto/lzo-rle.c new file mode 100644 index 000000000000..ea9c75b1db49 --- /dev/null +++ b/crypto/lzo-rle.c | |||
@@ -0,0 +1,175 @@ | |||
1 | /* | ||
2 | * Cryptographic API. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License version 2 as published by | ||
6 | * the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include <linux/init.h> | ||
20 | #include <linux/module.h> | ||
21 | #include <linux/crypto.h> | ||
22 | #include <linux/vmalloc.h> | ||
23 | #include <linux/mm.h> | ||
24 | #include <linux/lzo.h> | ||
25 | #include <crypto/internal/scompress.h> | ||
26 | |||
27 | struct lzorle_ctx { | ||
28 | void *lzorle_comp_mem; | ||
29 | }; | ||
30 | |||
31 | static void *lzorle_alloc_ctx(struct crypto_scomp *tfm) | ||
32 | { | ||
33 | void *ctx; | ||
34 | |||
35 | ctx = kvmalloc(LZO1X_MEM_COMPRESS, GFP_KERNEL); | ||
36 | if (!ctx) | ||
37 | return ERR_PTR(-ENOMEM); | ||
38 | |||
39 | return ctx; | ||
40 | } | ||
41 | |||
42 | static int lzorle_init(struct crypto_tfm *tfm) | ||
43 | { | ||
44 | struct lzorle_ctx *ctx = crypto_tfm_ctx(tfm); | ||
45 | |||
46 | ctx->lzorle_comp_mem = lzorle_alloc_ctx(NULL); | ||
47 | if (IS_ERR(ctx->lzorle_comp_mem)) | ||
48 | return -ENOMEM; | ||
49 | |||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | static void lzorle_free_ctx(struct crypto_scomp *tfm, void *ctx) | ||
54 | { | ||
55 | kvfree(ctx); | ||
56 | } | ||
57 | |||
58 | static void lzorle_exit(struct crypto_tfm *tfm) | ||
59 | { | ||
60 | struct lzorle_ctx *ctx = crypto_tfm_ctx(tfm); | ||
61 | |||
62 | lzorle_free_ctx(NULL, ctx->lzorle_comp_mem); | ||
63 | } | ||
64 | |||
65 | static int __lzorle_compress(const u8 *src, unsigned int slen, | ||
66 | u8 *dst, unsigned int *dlen, void *ctx) | ||
67 | { | ||
68 | size_t tmp_len = *dlen; /* size_t(ulong) <-> uint on 64 bit */ | ||
69 | int err; | ||
70 | |||
71 | err = lzorle1x_1_compress(src, slen, dst, &tmp_len, ctx); | ||
72 | |||
73 | if (err != LZO_E_OK) | ||
74 | return -EINVAL; | ||
75 | |||
76 | *dlen = tmp_len; | ||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | static int lzorle_compress(struct crypto_tfm *tfm, const u8 *src, | ||
81 | unsigned int slen, u8 *dst, unsigned int *dlen) | ||
82 | { | ||
83 | struct lzorle_ctx *ctx = crypto_tfm_ctx(tfm); | ||
84 | |||
85 | return __lzorle_compress(src, slen, dst, dlen, ctx->lzorle_comp_mem); | ||
86 | } | ||
87 | |||
88 | static int lzorle_scompress(struct crypto_scomp *tfm, const u8 *src, | ||
89 | unsigned int slen, u8 *dst, unsigned int *dlen, | ||
90 | void *ctx) | ||
91 | { | ||
92 | return __lzorle_compress(src, slen, dst, dlen, ctx); | ||
93 | } | ||
94 | |||
95 | static int __lzorle_decompress(const u8 *src, unsigned int slen, | ||
96 | u8 *dst, unsigned int *dlen) | ||
97 | { | ||
98 | int err; | ||
99 | size_t tmp_len = *dlen; /* size_t(ulong) <-> uint on 64 bit */ | ||
100 | |||
101 | err = lzo1x_decompress_safe(src, slen, dst, &tmp_len); | ||
102 | |||
103 | if (err != LZO_E_OK) | ||
104 | return -EINVAL; | ||
105 | |||
106 | *dlen = tmp_len; | ||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | static int lzorle_decompress(struct crypto_tfm *tfm, const u8 *src, | ||
111 | unsigned int slen, u8 *dst, unsigned int *dlen) | ||
112 | { | ||
113 | return __lzorle_decompress(src, slen, dst, dlen); | ||
114 | } | ||
115 | |||
116 | static int lzorle_sdecompress(struct crypto_scomp *tfm, const u8 *src, | ||
117 | unsigned int slen, u8 *dst, unsigned int *dlen, | ||
118 | void *ctx) | ||
119 | { | ||
120 | return __lzorle_decompress(src, slen, dst, dlen); | ||
121 | } | ||
122 | |||
123 | static struct crypto_alg alg = { | ||
124 | .cra_name = "lzo-rle", | ||
125 | .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, | ||
126 | .cra_ctxsize = sizeof(struct lzorle_ctx), | ||
127 | .cra_module = THIS_MODULE, | ||
128 | .cra_init = lzorle_init, | ||
129 | .cra_exit = lzorle_exit, | ||
130 | .cra_u = { .compress = { | ||
131 | .coa_compress = lzorle_compress, | ||
132 | .coa_decompress = lzorle_decompress } } | ||
133 | }; | ||
134 | |||
135 | static struct scomp_alg scomp = { | ||
136 | .alloc_ctx = lzorle_alloc_ctx, | ||
137 | .free_ctx = lzorle_free_ctx, | ||
138 | .compress = lzorle_scompress, | ||
139 | .decompress = lzorle_sdecompress, | ||
140 | .base = { | ||
141 | .cra_name = "lzo-rle", | ||
142 | .cra_driver_name = "lzo-rle-scomp", | ||
143 | .cra_module = THIS_MODULE, | ||
144 | } | ||
145 | }; | ||
146 | |||
147 | static int __init lzorle_mod_init(void) | ||
148 | { | ||
149 | int ret; | ||
150 | |||
151 | ret = crypto_register_alg(&alg); | ||
152 | if (ret) | ||
153 | return ret; | ||
154 | |||
155 | ret = crypto_register_scomp(&scomp); | ||
156 | if (ret) { | ||
157 | crypto_unregister_alg(&alg); | ||
158 | return ret; | ||
159 | } | ||
160 | |||
161 | return ret; | ||
162 | } | ||
163 | |||
164 | static void __exit lzorle_mod_fini(void) | ||
165 | { | ||
166 | crypto_unregister_alg(&alg); | ||
167 | crypto_unregister_scomp(&scomp); | ||
168 | } | ||
169 | |||
170 | module_init(lzorle_mod_init); | ||
171 | module_exit(lzorle_mod_fini); | ||
172 | |||
173 | MODULE_LICENSE("GPL"); | ||
174 | MODULE_DESCRIPTION("LZO-RLE Compression Algorithm"); | ||
175 | MODULE_ALIAS_CRYPTO("lzo-rle"); | ||
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index e7fb87e114a5..1ea2d5007ff5 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -76,8 +76,8 @@ static char *check[] = { | |||
76 | "cast6", "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea", | 76 | "cast6", "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea", |
77 | "khazad", "wp512", "wp384", "wp256", "tnepres", "xeta", "fcrypt", | 77 | "khazad", "wp512", "wp384", "wp256", "tnepres", "xeta", "fcrypt", |
78 | "camellia", "seed", "salsa20", "rmd128", "rmd160", "rmd256", "rmd320", | 78 | "camellia", "seed", "salsa20", "rmd128", "rmd160", "rmd256", "rmd320", |
79 | "lzo", "cts", "sha3-224", "sha3-256", "sha3-384", "sha3-512", | 79 | "lzo", "lzo-rle", "cts", "sha3-224", "sha3-256", "sha3-384", |
80 | "streebog256", "streebog512", | 80 | "sha3-512", "streebog256", "streebog512", |
81 | NULL | 81 | NULL |
82 | }; | 82 | }; |
83 | 83 | ||
diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c index 4ed0a78fdc09..4d9a38890965 100644 --- a/drivers/block/zram/zcomp.c +++ b/drivers/block/zram/zcomp.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | static const char * const backends[] = { | 21 | static const char * const backends[] = { |
22 | "lzo", | 22 | "lzo", |
23 | "lzo-rle", | ||
23 | #if IS_ENABLED(CONFIG_CRYPTO_LZ4) | 24 | #if IS_ENABLED(CONFIG_CRYPTO_LZ4) |
24 | "lz4", | 25 | "lz4", |
25 | #endif | 26 | #endif |
diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio_mport_cdev.c index cbe467ff1aba..1e1f42e210a0 100644 --- a/drivers/rapidio/devices/rio_mport_cdev.c +++ b/drivers/rapidio/devices/rio_mport_cdev.c | |||
@@ -2149,6 +2149,7 @@ static void mport_release_mapping(struct kref *ref) | |||
2149 | switch (map->dir) { | 2149 | switch (map->dir) { |
2150 | case MAP_INBOUND: | 2150 | case MAP_INBOUND: |
2151 | rio_unmap_inb_region(mport, map->phys_addr); | 2151 | rio_unmap_inb_region(mport, map->phys_addr); |
2152 | /* fall through */ | ||
2152 | case MAP_DMA: | 2153 | case MAP_DMA: |
2153 | dma_free_coherent(mport->dev.parent, map->size, | 2154 | dma_free_coherent(mport->dev.parent, map->size, |
2154 | map->virt_addr, map->phys_addr); | 2155 | map->virt_addr, map->phys_addr); |
diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c index bad0e0ea4f30..cf45829585cb 100644 --- a/drivers/rapidio/rio_cm.c +++ b/drivers/rapidio/rio_cm.c | |||
@@ -1215,7 +1215,9 @@ static int riocm_ch_listen(u16 ch_id) | |||
1215 | riocm_debug(CHOP, "(ch_%d)", ch_id); | 1215 | riocm_debug(CHOP, "(ch_%d)", ch_id); |
1216 | 1216 | ||
1217 | ch = riocm_get_channel(ch_id); | 1217 | ch = riocm_get_channel(ch_id); |
1218 | if (!ch || !riocm_cmp_exch(ch, RIO_CM_CHAN_BOUND, RIO_CM_LISTEN)) | 1218 | if (!ch) |
1219 | return -EINVAL; | ||
1220 | if (!riocm_cmp_exch(ch, RIO_CM_CHAN_BOUND, RIO_CM_LISTEN)) | ||
1219 | ret = -EINVAL; | 1221 | ret = -EINVAL; |
1220 | riocm_put_channel(ch); | 1222 | riocm_put_channel(ch); |
1221 | return ret; | 1223 | return ret; |
diff --git a/fs/autofs/autofs_i.h b/fs/autofs/autofs_i.h index 3e59f0ed777b..70c132acdab1 100644 --- a/fs/autofs/autofs_i.h +++ b/fs/autofs/autofs_i.h | |||
@@ -105,6 +105,7 @@ struct autofs_wait_queue { | |||
105 | 105 | ||
106 | #define AUTOFS_SBI_CATATONIC 0x0001 | 106 | #define AUTOFS_SBI_CATATONIC 0x0001 |
107 | #define AUTOFS_SBI_STRICTEXPIRE 0x0002 | 107 | #define AUTOFS_SBI_STRICTEXPIRE 0x0002 |
108 | #define AUTOFS_SBI_IGNORE 0x0004 | ||
108 | 109 | ||
109 | struct autofs_sb_info { | 110 | struct autofs_sb_info { |
110 | u32 magic; | 111 | u32 magic; |
@@ -215,6 +216,8 @@ static inline int autofs_prepare_pipe(struct file *pipe) | |||
215 | return -EINVAL; | 216 | return -EINVAL; |
216 | /* We want a packet pipe */ | 217 | /* We want a packet pipe */ |
217 | pipe->f_flags |= O_DIRECT; | 218 | pipe->f_flags |= O_DIRECT; |
219 | /* We don't expect -EAGAIN */ | ||
220 | pipe->f_flags &= ~O_NONBLOCK; | ||
218 | return 0; | 221 | return 0; |
219 | } | 222 | } |
220 | 223 | ||
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index 078992eee299..80597b88718b 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c | |||
@@ -82,18 +82,20 @@ static int autofs_show_options(struct seq_file *m, struct dentry *root) | |||
82 | seq_printf(m, ",maxproto=%d", sbi->max_proto); | 82 | seq_printf(m, ",maxproto=%d", sbi->max_proto); |
83 | 83 | ||
84 | if (autofs_type_offset(sbi->type)) | 84 | if (autofs_type_offset(sbi->type)) |
85 | seq_printf(m, ",offset"); | 85 | seq_puts(m, ",offset"); |
86 | else if (autofs_type_direct(sbi->type)) | 86 | else if (autofs_type_direct(sbi->type)) |
87 | seq_printf(m, ",direct"); | 87 | seq_puts(m, ",direct"); |
88 | else | 88 | else |
89 | seq_printf(m, ",indirect"); | 89 | seq_puts(m, ",indirect"); |
90 | if (sbi->flags & AUTOFS_SBI_STRICTEXPIRE) | 90 | if (sbi->flags & AUTOFS_SBI_STRICTEXPIRE) |
91 | seq_printf(m, ",strictexpire"); | 91 | seq_puts(m, ",strictexpire"); |
92 | if (sbi->flags & AUTOFS_SBI_IGNORE) | ||
93 | seq_puts(m, ",ignore"); | ||
92 | #ifdef CONFIG_CHECKPOINT_RESTORE | 94 | #ifdef CONFIG_CHECKPOINT_RESTORE |
93 | if (sbi->pipe) | 95 | if (sbi->pipe) |
94 | seq_printf(m, ",pipe_ino=%ld", file_inode(sbi->pipe)->i_ino); | 96 | seq_printf(m, ",pipe_ino=%ld", file_inode(sbi->pipe)->i_ino); |
95 | else | 97 | else |
96 | seq_printf(m, ",pipe_ino=-1"); | 98 | seq_puts(m, ",pipe_ino=-1"); |
97 | #endif | 99 | #endif |
98 | return 0; | 100 | return 0; |
99 | } | 101 | } |
@@ -111,7 +113,8 @@ static const struct super_operations autofs_sops = { | |||
111 | }; | 113 | }; |
112 | 114 | ||
113 | enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto, | 115 | enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto, |
114 | Opt_indirect, Opt_direct, Opt_offset, Opt_strictexpire}; | 116 | Opt_indirect, Opt_direct, Opt_offset, Opt_strictexpire, |
117 | Opt_ignore}; | ||
115 | 118 | ||
116 | static const match_table_t tokens = { | 119 | static const match_table_t tokens = { |
117 | {Opt_fd, "fd=%u"}, | 120 | {Opt_fd, "fd=%u"}, |
@@ -124,6 +127,7 @@ static const match_table_t tokens = { | |||
124 | {Opt_direct, "direct"}, | 127 | {Opt_direct, "direct"}, |
125 | {Opt_offset, "offset"}, | 128 | {Opt_offset, "offset"}, |
126 | {Opt_strictexpire, "strictexpire"}, | 129 | {Opt_strictexpire, "strictexpire"}, |
130 | {Opt_ignore, "ignore"}, | ||
127 | {Opt_err, NULL} | 131 | {Opt_err, NULL} |
128 | }; | 132 | }; |
129 | 133 | ||
@@ -206,6 +210,9 @@ static int parse_options(char *options, | |||
206 | case Opt_strictexpire: | 210 | case Opt_strictexpire: |
207 | sbi->flags |= AUTOFS_SBI_STRICTEXPIRE; | 211 | sbi->flags |= AUTOFS_SBI_STRICTEXPIRE; |
208 | break; | 212 | break; |
213 | case Opt_ignore: | ||
214 | sbi->flags |= AUTOFS_SBI_IGNORE; | ||
215 | break; | ||
209 | default: | 216 | default: |
210 | return 1; | 217 | return 1; |
211 | } | 218 | } |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 54207327f98f..7d09d125f148 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -57,8 +57,6 @@ | |||
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | static int load_elf_binary(struct linux_binprm *bprm); | 59 | static int load_elf_binary(struct linux_binprm *bprm); |
60 | static unsigned long elf_map(struct file *, unsigned long, struct elf_phdr *, | ||
61 | int, int, unsigned long); | ||
62 | 60 | ||
63 | #ifdef CONFIG_USELIB | 61 | #ifdef CONFIG_USELIB |
64 | static int load_elf_library(struct file *); | 62 | static int load_elf_library(struct file *); |
@@ -347,7 +345,7 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec, | |||
347 | #ifndef elf_map | 345 | #ifndef elf_map |
348 | 346 | ||
349 | static unsigned long elf_map(struct file *filep, unsigned long addr, | 347 | static unsigned long elf_map(struct file *filep, unsigned long addr, |
350 | struct elf_phdr *eppnt, int prot, int type, | 348 | const struct elf_phdr *eppnt, int prot, int type, |
351 | unsigned long total_size) | 349 | unsigned long total_size) |
352 | { | 350 | { |
353 | unsigned long map_addr; | 351 | unsigned long map_addr; |
@@ -387,7 +385,7 @@ static unsigned long elf_map(struct file *filep, unsigned long addr, | |||
387 | 385 | ||
388 | #endif /* !elf_map */ | 386 | #endif /* !elf_map */ |
389 | 387 | ||
390 | static unsigned long total_mapping_size(struct elf_phdr *cmds, int nr) | 388 | static unsigned long total_mapping_size(const struct elf_phdr *cmds, int nr) |
391 | { | 389 | { |
392 | int i, first_idx = -1, last_idx = -1; | 390 | int i, first_idx = -1, last_idx = -1; |
393 | 391 | ||
@@ -414,12 +412,13 @@ static unsigned long total_mapping_size(struct elf_phdr *cmds, int nr) | |||
414 | * header pointed to by elf_ex, into a newly allocated array. The caller is | 412 | * header pointed to by elf_ex, into a newly allocated array. The caller is |
415 | * responsible for freeing the allocated data. Returns an ERR_PTR upon failure. | 413 | * responsible for freeing the allocated data. Returns an ERR_PTR upon failure. |
416 | */ | 414 | */ |
417 | static struct elf_phdr *load_elf_phdrs(struct elfhdr *elf_ex, | 415 | static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex, |
418 | struct file *elf_file) | 416 | struct file *elf_file) |
419 | { | 417 | { |
420 | struct elf_phdr *elf_phdata = NULL; | 418 | struct elf_phdr *elf_phdata = NULL; |
421 | int retval, size, err = -1; | 419 | int retval, err = -1; |
422 | loff_t pos = elf_ex->e_phoff; | 420 | loff_t pos = elf_ex->e_phoff; |
421 | unsigned int size; | ||
423 | 422 | ||
424 | /* | 423 | /* |
425 | * If the size of this structure has changed, then punt, since | 424 | * If the size of this structure has changed, then punt, since |
@@ -429,13 +428,9 @@ static struct elf_phdr *load_elf_phdrs(struct elfhdr *elf_ex, | |||
429 | goto out; | 428 | goto out; |
430 | 429 | ||
431 | /* Sanity check the number of program headers... */ | 430 | /* Sanity check the number of program headers... */ |
432 | if (elf_ex->e_phnum < 1 || | ||
433 | elf_ex->e_phnum > 65536U / sizeof(struct elf_phdr)) | ||
434 | goto out; | ||
435 | |||
436 | /* ...and their total size. */ | 431 | /* ...and their total size. */ |
437 | size = sizeof(struct elf_phdr) * elf_ex->e_phnum; | 432 | size = sizeof(struct elf_phdr) * elf_ex->e_phnum; |
438 | if (size > ELF_MIN_ALIGN) | 433 | if (size == 0 || size > 65536 || size > ELF_MIN_ALIGN) |
439 | goto out; | 434 | goto out; |
440 | 435 | ||
441 | elf_phdata = kmalloc(size, GFP_KERNEL); | 436 | elf_phdata = kmalloc(size, GFP_KERNEL); |
@@ -2033,7 +2028,6 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, | |||
2033 | struct elf_note_info *info, | 2028 | struct elf_note_info *info, |
2034 | const kernel_siginfo_t *siginfo, struct pt_regs *regs) | 2029 | const kernel_siginfo_t *siginfo, struct pt_regs *regs) |
2035 | { | 2030 | { |
2036 | struct list_head *t; | ||
2037 | struct core_thread *ct; | 2031 | struct core_thread *ct; |
2038 | struct elf_thread_status *ets; | 2032 | struct elf_thread_status *ets; |
2039 | 2033 | ||
@@ -2050,10 +2044,9 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, | |||
2050 | list_add(&ets->list, &info->thread_list); | 2044 | list_add(&ets->list, &info->thread_list); |
2051 | } | 2045 | } |
2052 | 2046 | ||
2053 | list_for_each(t, &info->thread_list) { | 2047 | list_for_each_entry(ets, &info->thread_list, list) { |
2054 | int sz; | 2048 | int sz; |
2055 | 2049 | ||
2056 | ets = list_entry(t, struct elf_thread_status, list); | ||
2057 | sz = elf_dump_thread_status(siginfo->si_signo, ets); | 2050 | sz = elf_dump_thread_status(siginfo->si_signo, ets); |
2058 | info->thread_status_size += sz; | 2051 | info->thread_status_size += sz; |
2059 | } | 2052 | } |
@@ -2117,20 +2110,17 @@ static size_t get_note_info_size(struct elf_note_info *info) | |||
2117 | static int write_note_info(struct elf_note_info *info, | 2110 | static int write_note_info(struct elf_note_info *info, |
2118 | struct coredump_params *cprm) | 2111 | struct coredump_params *cprm) |
2119 | { | 2112 | { |
2113 | struct elf_thread_status *ets; | ||
2120 | int i; | 2114 | int i; |
2121 | struct list_head *t; | ||
2122 | 2115 | ||
2123 | for (i = 0; i < info->numnote; i++) | 2116 | for (i = 0; i < info->numnote; i++) |
2124 | if (!writenote(info->notes + i, cprm)) | 2117 | if (!writenote(info->notes + i, cprm)) |
2125 | return 0; | 2118 | return 0; |
2126 | 2119 | ||
2127 | /* write out the thread status notes section */ | 2120 | /* write out the thread status notes section */ |
2128 | list_for_each(t, &info->thread_list) { | 2121 | list_for_each_entry(ets, &info->thread_list, list) { |
2129 | struct elf_thread_status *tmp = | 2122 | for (i = 0; i < ets->num_notes; i++) |
2130 | list_entry(t, struct elf_thread_status, list); | 2123 | if (!writenote(&ets->notes[i], cprm)) |
2131 | |||
2132 | for (i = 0; i < tmp->num_notes; i++) | ||
2133 | if (!writenote(&tmp->notes[i], cprm)) | ||
2134 | return 0; | 2124 | return 0; |
2135 | } | 2125 | } |
2136 | 2126 | ||
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 85140913c0f5..129d26226e70 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -3449,31 +3449,17 @@ void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...); | |||
3449 | 3449 | ||
3450 | #if defined(CONFIG_DYNAMIC_DEBUG) | 3450 | #if defined(CONFIG_DYNAMIC_DEBUG) |
3451 | #define btrfs_debug(fs_info, fmt, args...) \ | 3451 | #define btrfs_debug(fs_info, fmt, args...) \ |
3452 | do { \ | 3452 | _dynamic_func_call_no_desc(fmt, btrfs_printk, \ |
3453 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 3453 | fs_info, KERN_DEBUG fmt, ##args) |
3454 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ | 3454 | #define btrfs_debug_in_rcu(fs_info, fmt, args...) \ |
3455 | btrfs_printk(fs_info, KERN_DEBUG fmt, ##args); \ | 3455 | _dynamic_func_call_no_desc(fmt, btrfs_printk_in_rcu, \ |
3456 | } while (0) | 3456 | fs_info, KERN_DEBUG fmt, ##args) |
3457 | #define btrfs_debug_in_rcu(fs_info, fmt, args...) \ | ||
3458 | do { \ | ||
3459 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | ||
3460 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ | ||
3461 | btrfs_printk_in_rcu(fs_info, KERN_DEBUG fmt, ##args); \ | ||
3462 | } while (0) | ||
3463 | #define btrfs_debug_rl_in_rcu(fs_info, fmt, args...) \ | 3457 | #define btrfs_debug_rl_in_rcu(fs_info, fmt, args...) \ |
3464 | do { \ | 3458 | _dynamic_func_call_no_desc(fmt, btrfs_printk_rl_in_rcu, \ |
3465 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 3459 | fs_info, KERN_DEBUG fmt, ##args) |
3466 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ | 3460 | #define btrfs_debug_rl(fs_info, fmt, args...) \ |
3467 | btrfs_printk_rl_in_rcu(fs_info, KERN_DEBUG fmt, \ | 3461 | _dynamic_func_call_no_desc(fmt, btrfs_printk_ratelimited, \ |
3468 | ##args);\ | 3462 | fs_info, KERN_DEBUG fmt, ##args) |
3469 | } while (0) | ||
3470 | #define btrfs_debug_rl(fs_info, fmt, args...) \ | ||
3471 | do { \ | ||
3472 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | ||
3473 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ | ||
3474 | btrfs_printk_ratelimited(fs_info, KERN_DEBUG fmt, \ | ||
3475 | ##args); \ | ||
3476 | } while (0) | ||
3477 | #elif defined(DEBUG) | 3463 | #elif defined(DEBUG) |
3478 | #define btrfs_debug(fs_info, fmt, args...) \ | 3464 | #define btrfs_debug(fs_info, fmt, args...) \ |
3479 | btrfs_printk(fs_info, KERN_DEBUG fmt, ##args) | 3465 | btrfs_printk(fs_info, KERN_DEBUG fmt, ##args) |
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index a5d219d920e7..4a0e98d87fcc 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -50,10 +50,10 @@ | |||
50 | * | 50 | * |
51 | * 1) epmutex (mutex) | 51 | * 1) epmutex (mutex) |
52 | * 2) ep->mtx (mutex) | 52 | * 2) ep->mtx (mutex) |
53 | * 3) ep->wq.lock (spinlock) | 53 | * 3) ep->lock (rwlock) |
54 | * | 54 | * |
55 | * The acquire order is the one listed above, from 1 to 3. | 55 | * The acquire order is the one listed above, from 1 to 3. |
56 | * We need a spinlock (ep->wq.lock) because we manipulate objects | 56 | * We need a rwlock (ep->lock) because we manipulate objects |
57 | * from inside the poll callback, that might be triggered from | 57 | * from inside the poll callback, that might be triggered from |
58 | * a wake_up() that in turn might be called from IRQ context. | 58 | * a wake_up() that in turn might be called from IRQ context. |
59 | * So we can't sleep inside the poll callback and hence we need | 59 | * So we can't sleep inside the poll callback and hence we need |
@@ -85,7 +85,7 @@ | |||
85 | * of epoll file descriptors, we use the current recursion depth as | 85 | * of epoll file descriptors, we use the current recursion depth as |
86 | * the lockdep subkey. | 86 | * the lockdep subkey. |
87 | * It is possible to drop the "ep->mtx" and to use the global | 87 | * It is possible to drop the "ep->mtx" and to use the global |
88 | * mutex "epmutex" (together with "ep->wq.lock") to have it working, | 88 | * mutex "epmutex" (together with "ep->lock") to have it working, |
89 | * but having "ep->mtx" will make the interface more scalable. | 89 | * but having "ep->mtx" will make the interface more scalable. |
90 | * Events that require holding "epmutex" are very rare, while for | 90 | * Events that require holding "epmutex" are very rare, while for |
91 | * normal operations the epoll private "ep->mtx" will guarantee | 91 | * normal operations the epoll private "ep->mtx" will guarantee |
@@ -182,8 +182,6 @@ struct epitem { | |||
182 | * This structure is stored inside the "private_data" member of the file | 182 | * This structure is stored inside the "private_data" member of the file |
183 | * structure and represents the main data structure for the eventpoll | 183 | * structure and represents the main data structure for the eventpoll |
184 | * interface. | 184 | * interface. |
185 | * | ||
186 | * Access to it is protected by the lock inside wq. | ||
187 | */ | 185 | */ |
188 | struct eventpoll { | 186 | struct eventpoll { |
189 | /* | 187 | /* |
@@ -203,13 +201,16 @@ struct eventpoll { | |||
203 | /* List of ready file descriptors */ | 201 | /* List of ready file descriptors */ |
204 | struct list_head rdllist; | 202 | struct list_head rdllist; |
205 | 203 | ||
204 | /* Lock which protects rdllist and ovflist */ | ||
205 | rwlock_t lock; | ||
206 | |||
206 | /* RB tree root used to store monitored fd structs */ | 207 | /* RB tree root used to store monitored fd structs */ |
207 | struct rb_root_cached rbr; | 208 | struct rb_root_cached rbr; |
208 | 209 | ||
209 | /* | 210 | /* |
210 | * This is a single linked list that chains all the "struct epitem" that | 211 | * This is a single linked list that chains all the "struct epitem" that |
211 | * happened while transferring ready events to userspace w/out | 212 | * happened while transferring ready events to userspace w/out |
212 | * holding ->wq.lock. | 213 | * holding ->lock. |
213 | */ | 214 | */ |
214 | struct epitem *ovflist; | 215 | struct epitem *ovflist; |
215 | 216 | ||
@@ -697,17 +698,17 @@ static __poll_t ep_scan_ready_list(struct eventpoll *ep, | |||
697 | * because we want the "sproc" callback to be able to do it | 698 | * because we want the "sproc" callback to be able to do it |
698 | * in a lockless way. | 699 | * in a lockless way. |
699 | */ | 700 | */ |
700 | spin_lock_irq(&ep->wq.lock); | 701 | write_lock_irq(&ep->lock); |
701 | list_splice_init(&ep->rdllist, &txlist); | 702 | list_splice_init(&ep->rdllist, &txlist); |
702 | WRITE_ONCE(ep->ovflist, NULL); | 703 | WRITE_ONCE(ep->ovflist, NULL); |
703 | spin_unlock_irq(&ep->wq.lock); | 704 | write_unlock_irq(&ep->lock); |
704 | 705 | ||
705 | /* | 706 | /* |
706 | * Now call the callback function. | 707 | * Now call the callback function. |
707 | */ | 708 | */ |
708 | res = (*sproc)(ep, &txlist, priv); | 709 | res = (*sproc)(ep, &txlist, priv); |
709 | 710 | ||
710 | spin_lock_irq(&ep->wq.lock); | 711 | write_lock_irq(&ep->lock); |
711 | /* | 712 | /* |
712 | * During the time we spent inside the "sproc" callback, some | 713 | * During the time we spent inside the "sproc" callback, some |
713 | * other events might have been queued by the poll callback. | 714 | * other events might have been queued by the poll callback. |
@@ -722,7 +723,11 @@ static __poll_t ep_scan_ready_list(struct eventpoll *ep, | |||
722 | * contain them, and the list_splice() below takes care of them. | 723 | * contain them, and the list_splice() below takes care of them. |
723 | */ | 724 | */ |
724 | if (!ep_is_linked(epi)) { | 725 | if (!ep_is_linked(epi)) { |
725 | list_add_tail(&epi->rdllink, &ep->rdllist); | 726 | /* |
727 | * ->ovflist is LIFO, so we have to reverse it in order | ||
728 | * to keep in FIFO. | ||
729 | */ | ||
730 | list_add(&epi->rdllink, &ep->rdllist); | ||
726 | ep_pm_stay_awake(epi); | 731 | ep_pm_stay_awake(epi); |
727 | } | 732 | } |
728 | } | 733 | } |
@@ -745,11 +750,11 @@ static __poll_t ep_scan_ready_list(struct eventpoll *ep, | |||
745 | * the ->poll() wait list (delayed after we release the lock). | 750 | * the ->poll() wait list (delayed after we release the lock). |
746 | */ | 751 | */ |
747 | if (waitqueue_active(&ep->wq)) | 752 | if (waitqueue_active(&ep->wq)) |
748 | wake_up_locked(&ep->wq); | 753 | wake_up(&ep->wq); |
749 | if (waitqueue_active(&ep->poll_wait)) | 754 | if (waitqueue_active(&ep->poll_wait)) |
750 | pwake++; | 755 | pwake++; |
751 | } | 756 | } |
752 | spin_unlock_irq(&ep->wq.lock); | 757 | write_unlock_irq(&ep->lock); |
753 | 758 | ||
754 | if (!ep_locked) | 759 | if (!ep_locked) |
755 | mutex_unlock(&ep->mtx); | 760 | mutex_unlock(&ep->mtx); |
@@ -789,10 +794,10 @@ static int ep_remove(struct eventpoll *ep, struct epitem *epi) | |||
789 | 794 | ||
790 | rb_erase_cached(&epi->rbn, &ep->rbr); | 795 | rb_erase_cached(&epi->rbn, &ep->rbr); |
791 | 796 | ||
792 | spin_lock_irq(&ep->wq.lock); | 797 | write_lock_irq(&ep->lock); |
793 | if (ep_is_linked(epi)) | 798 | if (ep_is_linked(epi)) |
794 | list_del_init(&epi->rdllink); | 799 | list_del_init(&epi->rdllink); |
795 | spin_unlock_irq(&ep->wq.lock); | 800 | write_unlock_irq(&ep->lock); |
796 | 801 | ||
797 | wakeup_source_unregister(ep_wakeup_source(epi)); | 802 | wakeup_source_unregister(ep_wakeup_source(epi)); |
798 | /* | 803 | /* |
@@ -842,7 +847,7 @@ static void ep_free(struct eventpoll *ep) | |||
842 | * Walks through the whole tree by freeing each "struct epitem". At this | 847 | * Walks through the whole tree by freeing each "struct epitem". At this |
843 | * point we are sure no poll callbacks will be lingering around, and also by | 848 | * point we are sure no poll callbacks will be lingering around, and also by |
844 | * holding "epmutex" we can be sure that no file cleanup code will hit | 849 | * holding "epmutex" we can be sure that no file cleanup code will hit |
845 | * us during this operation. So we can avoid the lock on "ep->wq.lock". | 850 | * us during this operation. So we can avoid the lock on "ep->lock". |
846 | * We do not need to lock ep->mtx, either, we only do it to prevent | 851 | * We do not need to lock ep->mtx, either, we only do it to prevent |
847 | * a lockdep warning. | 852 | * a lockdep warning. |
848 | */ | 853 | */ |
@@ -1023,6 +1028,7 @@ static int ep_alloc(struct eventpoll **pep) | |||
1023 | goto free_uid; | 1028 | goto free_uid; |
1024 | 1029 | ||
1025 | mutex_init(&ep->mtx); | 1030 | mutex_init(&ep->mtx); |
1031 | rwlock_init(&ep->lock); | ||
1026 | init_waitqueue_head(&ep->wq); | 1032 | init_waitqueue_head(&ep->wq); |
1027 | init_waitqueue_head(&ep->poll_wait); | 1033 | init_waitqueue_head(&ep->poll_wait); |
1028 | INIT_LIST_HEAD(&ep->rdllist); | 1034 | INIT_LIST_HEAD(&ep->rdllist); |
@@ -1112,21 +1118,107 @@ struct file *get_epoll_tfile_raw_ptr(struct file *file, int tfd, | |||
1112 | } | 1118 | } |
1113 | #endif /* CONFIG_CHECKPOINT_RESTORE */ | 1119 | #endif /* CONFIG_CHECKPOINT_RESTORE */ |
1114 | 1120 | ||
1121 | /** | ||
1122 | * Adds a new entry to the tail of the list in a lockless way, i.e. | ||
1123 | * multiple CPUs are allowed to call this function concurrently. | ||
1124 | * | ||
1125 | * Beware: it is necessary to prevent any other modifications of the | ||
1126 | * existing list until all changes are completed, in other words | ||
1127 | * concurrent list_add_tail_lockless() calls should be protected | ||
1128 | * with a read lock, where write lock acts as a barrier which | ||
1129 | * makes sure all list_add_tail_lockless() calls are fully | ||
1130 | * completed. | ||
1131 | * | ||
1132 | * Also an element can be locklessly added to the list only in one | ||
1133 | * direction i.e. either to the tail either to the head, otherwise | ||
1134 | * concurrent access will corrupt the list. | ||
1135 | * | ||
1136 | * Returns %false if element has been already added to the list, %true | ||
1137 | * otherwise. | ||
1138 | */ | ||
1139 | static inline bool list_add_tail_lockless(struct list_head *new, | ||
1140 | struct list_head *head) | ||
1141 | { | ||
1142 | struct list_head *prev; | ||
1143 | |||
1144 | /* | ||
1145 | * This is simple 'new->next = head' operation, but cmpxchg() | ||
1146 | * is used in order to detect that same element has been just | ||
1147 | * added to the list from another CPU: the winner observes | ||
1148 | * new->next == new. | ||
1149 | */ | ||
1150 | if (cmpxchg(&new->next, new, head) != new) | ||
1151 | return false; | ||
1152 | |||
1153 | /* | ||
1154 | * Initially ->next of a new element must be updated with the head | ||
1155 | * (we are inserting to the tail) and only then pointers are atomically | ||
1156 | * exchanged. XCHG guarantees memory ordering, thus ->next should be | ||
1157 | * updated before pointers are actually swapped and pointers are | ||
1158 | * swapped before prev->next is updated. | ||
1159 | */ | ||
1160 | |||
1161 | prev = xchg(&head->prev, new); | ||
1162 | |||
1163 | /* | ||
1164 | * It is safe to modify prev->next and new->prev, because a new element | ||
1165 | * is added only to the tail and new->next is updated before XCHG. | ||
1166 | */ | ||
1167 | |||
1168 | prev->next = new; | ||
1169 | new->prev = prev; | ||
1170 | |||
1171 | return true; | ||
1172 | } | ||
1173 | |||
1174 | /** | ||
1175 | * Chains a new epi entry to the tail of the ep->ovflist in a lockless way, | ||
1176 | * i.e. multiple CPUs are allowed to call this function concurrently. | ||
1177 | * | ||
1178 | * Returns %false if epi element has been already chained, %true otherwise. | ||
1179 | */ | ||
1180 | static inline bool chain_epi_lockless(struct epitem *epi) | ||
1181 | { | ||
1182 | struct eventpoll *ep = epi->ep; | ||
1183 | |||
1184 | /* Check that the same epi has not been just chained from another CPU */ | ||
1185 | if (cmpxchg(&epi->next, EP_UNACTIVE_PTR, NULL) != EP_UNACTIVE_PTR) | ||
1186 | return false; | ||
1187 | |||
1188 | /* Atomically exchange tail */ | ||
1189 | epi->next = xchg(&ep->ovflist, epi); | ||
1190 | |||
1191 | return true; | ||
1192 | } | ||
1193 | |||
1115 | /* | 1194 | /* |
1116 | * This is the callback that is passed to the wait queue wakeup | 1195 | * This is the callback that is passed to the wait queue wakeup |
1117 | * mechanism. It is called by the stored file descriptors when they | 1196 | * mechanism. It is called by the stored file descriptors when they |
1118 | * have events to report. | 1197 | * have events to report. |
1198 | * | ||
1199 | * This callback takes a read lock in order not to content with concurrent | ||
1200 | * events from another file descriptors, thus all modifications to ->rdllist | ||
1201 | * or ->ovflist are lockless. Read lock is paired with the write lock from | ||
1202 | * ep_scan_ready_list(), which stops all list modifications and guarantees | ||
1203 | * that lists state is seen correctly. | ||
1204 | * | ||
1205 | * Another thing worth to mention is that ep_poll_callback() can be called | ||
1206 | * concurrently for the same @epi from different CPUs if poll table was inited | ||
1207 | * with several wait queues entries. Plural wakeup from different CPUs of a | ||
1208 | * single wait queue is serialized by wq.lock, but the case when multiple wait | ||
1209 | * queues are used should be detected accordingly. This is detected using | ||
1210 | * cmpxchg() operation. | ||
1119 | */ | 1211 | */ |
1120 | static int ep_poll_callback(wait_queue_entry_t *wait, unsigned mode, int sync, void *key) | 1212 | static int ep_poll_callback(wait_queue_entry_t *wait, unsigned mode, int sync, void *key) |
1121 | { | 1213 | { |
1122 | int pwake = 0; | 1214 | int pwake = 0; |
1123 | unsigned long flags; | ||
1124 | struct epitem *epi = ep_item_from_wait(wait); | 1215 | struct epitem *epi = ep_item_from_wait(wait); |
1125 | struct eventpoll *ep = epi->ep; | 1216 | struct eventpoll *ep = epi->ep; |
1126 | __poll_t pollflags = key_to_poll(key); | 1217 | __poll_t pollflags = key_to_poll(key); |
1218 | unsigned long flags; | ||
1127 | int ewake = 0; | 1219 | int ewake = 0; |
1128 | 1220 | ||
1129 | spin_lock_irqsave(&ep->wq.lock, flags); | 1221 | read_lock_irqsave(&ep->lock, flags); |
1130 | 1222 | ||
1131 | ep_set_busy_poll_napi_id(epi); | 1223 | ep_set_busy_poll_napi_id(epi); |
1132 | 1224 | ||
@@ -1155,24 +1247,15 @@ static int ep_poll_callback(wait_queue_entry_t *wait, unsigned mode, int sync, v | |||
1155 | * chained in ep->ovflist and requeued later on. | 1247 | * chained in ep->ovflist and requeued later on. |
1156 | */ | 1248 | */ |
1157 | if (READ_ONCE(ep->ovflist) != EP_UNACTIVE_PTR) { | 1249 | if (READ_ONCE(ep->ovflist) != EP_UNACTIVE_PTR) { |
1158 | if (epi->next == EP_UNACTIVE_PTR) { | 1250 | if (epi->next == EP_UNACTIVE_PTR && |
1159 | epi->next = READ_ONCE(ep->ovflist); | 1251 | chain_epi_lockless(epi)) |
1160 | WRITE_ONCE(ep->ovflist, epi); | 1252 | ep_pm_stay_awake_rcu(epi); |
1161 | if (epi->ws) { | ||
1162 | /* | ||
1163 | * Activate ep->ws since epi->ws may get | ||
1164 | * deactivated at any time. | ||
1165 | */ | ||
1166 | __pm_stay_awake(ep->ws); | ||
1167 | } | ||
1168 | |||
1169 | } | ||
1170 | goto out_unlock; | 1253 | goto out_unlock; |
1171 | } | 1254 | } |
1172 | 1255 | ||
1173 | /* If this file is already in the ready list we exit soon */ | 1256 | /* If this file is already in the ready list we exit soon */ |
1174 | if (!ep_is_linked(epi)) { | 1257 | if (!ep_is_linked(epi) && |
1175 | list_add_tail(&epi->rdllink, &ep->rdllist); | 1258 | list_add_tail_lockless(&epi->rdllink, &ep->rdllist)) { |
1176 | ep_pm_stay_awake_rcu(epi); | 1259 | ep_pm_stay_awake_rcu(epi); |
1177 | } | 1260 | } |
1178 | 1261 | ||
@@ -1197,13 +1280,13 @@ static int ep_poll_callback(wait_queue_entry_t *wait, unsigned mode, int sync, v | |||
1197 | break; | 1280 | break; |
1198 | } | 1281 | } |
1199 | } | 1282 | } |
1200 | wake_up_locked(&ep->wq); | 1283 | wake_up(&ep->wq); |
1201 | } | 1284 | } |
1202 | if (waitqueue_active(&ep->poll_wait)) | 1285 | if (waitqueue_active(&ep->poll_wait)) |
1203 | pwake++; | 1286 | pwake++; |
1204 | 1287 | ||
1205 | out_unlock: | 1288 | out_unlock: |
1206 | spin_unlock_irqrestore(&ep->wq.lock, flags); | 1289 | read_unlock_irqrestore(&ep->lock, flags); |
1207 | 1290 | ||
1208 | /* We have to call this outside the lock */ | 1291 | /* We have to call this outside the lock */ |
1209 | if (pwake) | 1292 | if (pwake) |
@@ -1488,7 +1571,7 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, | |||
1488 | goto error_remove_epi; | 1571 | goto error_remove_epi; |
1489 | 1572 | ||
1490 | /* We have to drop the new item inside our item list to keep track of it */ | 1573 | /* We have to drop the new item inside our item list to keep track of it */ |
1491 | spin_lock_irq(&ep->wq.lock); | 1574 | write_lock_irq(&ep->lock); |
1492 | 1575 | ||
1493 | /* record NAPI ID of new item if present */ | 1576 | /* record NAPI ID of new item if present */ |
1494 | ep_set_busy_poll_napi_id(epi); | 1577 | ep_set_busy_poll_napi_id(epi); |
@@ -1500,12 +1583,12 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, | |||
1500 | 1583 | ||
1501 | /* Notify waiting tasks that events are available */ | 1584 | /* Notify waiting tasks that events are available */ |
1502 | if (waitqueue_active(&ep->wq)) | 1585 | if (waitqueue_active(&ep->wq)) |
1503 | wake_up_locked(&ep->wq); | 1586 | wake_up(&ep->wq); |
1504 | if (waitqueue_active(&ep->poll_wait)) | 1587 | if (waitqueue_active(&ep->poll_wait)) |
1505 | pwake++; | 1588 | pwake++; |
1506 | } | 1589 | } |
1507 | 1590 | ||
1508 | spin_unlock_irq(&ep->wq.lock); | 1591 | write_unlock_irq(&ep->lock); |
1509 | 1592 | ||
1510 | atomic_long_inc(&ep->user->epoll_watches); | 1593 | atomic_long_inc(&ep->user->epoll_watches); |
1511 | 1594 | ||
@@ -1531,10 +1614,10 @@ error_unregister: | |||
1531 | * list, since that is used/cleaned only inside a section bound by "mtx". | 1614 | * list, since that is used/cleaned only inside a section bound by "mtx". |
1532 | * And ep_insert() is called with "mtx" held. | 1615 | * And ep_insert() is called with "mtx" held. |
1533 | */ | 1616 | */ |
1534 | spin_lock_irq(&ep->wq.lock); | 1617 | write_lock_irq(&ep->lock); |
1535 | if (ep_is_linked(epi)) | 1618 | if (ep_is_linked(epi)) |
1536 | list_del_init(&epi->rdllink); | 1619 | list_del_init(&epi->rdllink); |
1537 | spin_unlock_irq(&ep->wq.lock); | 1620 | write_unlock_irq(&ep->lock); |
1538 | 1621 | ||
1539 | wakeup_source_unregister(ep_wakeup_source(epi)); | 1622 | wakeup_source_unregister(ep_wakeup_source(epi)); |
1540 | 1623 | ||
@@ -1578,9 +1661,9 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, | |||
1578 | * 1) Flush epi changes above to other CPUs. This ensures | 1661 | * 1) Flush epi changes above to other CPUs. This ensures |
1579 | * we do not miss events from ep_poll_callback if an | 1662 | * we do not miss events from ep_poll_callback if an |
1580 | * event occurs immediately after we call f_op->poll(). | 1663 | * event occurs immediately after we call f_op->poll(). |
1581 | * We need this because we did not take ep->wq.lock while | 1664 | * We need this because we did not take ep->lock while |
1582 | * changing epi above (but ep_poll_callback does take | 1665 | * changing epi above (but ep_poll_callback does take |
1583 | * ep->wq.lock). | 1666 | * ep->lock). |
1584 | * | 1667 | * |
1585 | * 2) We also need to ensure we do not miss _past_ events | 1668 | * 2) We also need to ensure we do not miss _past_ events |
1586 | * when calling f_op->poll(). This barrier also | 1669 | * when calling f_op->poll(). This barrier also |
@@ -1599,18 +1682,18 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, | |||
1599 | * list, push it inside. | 1682 | * list, push it inside. |
1600 | */ | 1683 | */ |
1601 | if (ep_item_poll(epi, &pt, 1)) { | 1684 | if (ep_item_poll(epi, &pt, 1)) { |
1602 | spin_lock_irq(&ep->wq.lock); | 1685 | write_lock_irq(&ep->lock); |
1603 | if (!ep_is_linked(epi)) { | 1686 | if (!ep_is_linked(epi)) { |
1604 | list_add_tail(&epi->rdllink, &ep->rdllist); | 1687 | list_add_tail(&epi->rdllink, &ep->rdllist); |
1605 | ep_pm_stay_awake(epi); | 1688 | ep_pm_stay_awake(epi); |
1606 | 1689 | ||
1607 | /* Notify waiting tasks that events are available */ | 1690 | /* Notify waiting tasks that events are available */ |
1608 | if (waitqueue_active(&ep->wq)) | 1691 | if (waitqueue_active(&ep->wq)) |
1609 | wake_up_locked(&ep->wq); | 1692 | wake_up(&ep->wq); |
1610 | if (waitqueue_active(&ep->poll_wait)) | 1693 | if (waitqueue_active(&ep->poll_wait)) |
1611 | pwake++; | 1694 | pwake++; |
1612 | } | 1695 | } |
1613 | spin_unlock_irq(&ep->wq.lock); | 1696 | write_unlock_irq(&ep->lock); |
1614 | } | 1697 | } |
1615 | 1698 | ||
1616 | /* We have to call this outside the lock */ | 1699 | /* We have to call this outside the lock */ |
@@ -1771,9 +1854,9 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events, | |||
1771 | */ | 1854 | */ |
1772 | timed_out = 1; | 1855 | timed_out = 1; |
1773 | 1856 | ||
1774 | spin_lock_irq(&ep->wq.lock); | 1857 | write_lock_irq(&ep->lock); |
1775 | eavail = ep_events_available(ep); | 1858 | eavail = ep_events_available(ep); |
1776 | spin_unlock_irq(&ep->wq.lock); | 1859 | write_unlock_irq(&ep->lock); |
1777 | 1860 | ||
1778 | goto send_events; | 1861 | goto send_events; |
1779 | } | 1862 | } |
@@ -1563,7 +1563,7 @@ static void bprm_fill_uid(struct linux_binprm *bprm) | |||
1563 | 1563 | ||
1564 | /* | 1564 | /* |
1565 | * Fill the binprm structure from the inode. | 1565 | * Fill the binprm structure from the inode. |
1566 | * Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes | 1566 | * Check permissions, then read the first BINPRM_BUF_SIZE bytes |
1567 | * | 1567 | * |
1568 | * This may be called multiple times for binary chains (scripts for example). | 1568 | * This may be called multiple times for binary chains (scripts for example). |
1569 | */ | 1569 | */ |
@@ -1944,15 +1944,10 @@ EXPORT_SYMBOL(set_binfmt); | |||
1944 | */ | 1944 | */ |
1945 | void set_dumpable(struct mm_struct *mm, int value) | 1945 | void set_dumpable(struct mm_struct *mm, int value) |
1946 | { | 1946 | { |
1947 | unsigned long old, new; | ||
1948 | |||
1949 | if (WARN_ON((unsigned)value > SUID_DUMP_ROOT)) | 1947 | if (WARN_ON((unsigned)value > SUID_DUMP_ROOT)) |
1950 | return; | 1948 | return; |
1951 | 1949 | ||
1952 | do { | 1950 | set_mask_bits(&mm->flags, MMF_DUMPABLE_MASK, value); |
1953 | old = READ_ONCE(mm->flags); | ||
1954 | new = (old & ~MMF_DUMPABLE_MASK) | value; | ||
1955 | } while (cmpxchg(&mm->flags, old, new) != old); | ||
1956 | } | 1951 | } |
1957 | 1952 | ||
1958 | SYSCALL_DEFINE3(execve, | 1953 | SYSCALL_DEFINE3(execve, |
diff --git a/fs/fat/file.c b/fs/fat/file.c index 13935ee99e1e..b3bed32946b1 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c | |||
@@ -214,6 +214,7 @@ const struct file_operations fat_file_operations = { | |||
214 | #endif | 214 | #endif |
215 | .fsync = fat_file_fsync, | 215 | .fsync = fat_file_fsync, |
216 | .splice_read = generic_file_splice_read, | 216 | .splice_read = generic_file_splice_read, |
217 | .splice_write = iter_file_splice_write, | ||
217 | .fallocate = fat_fallocate, | 218 | .fallocate = fat_fallocate, |
218 | }; | 219 | }; |
219 | 220 | ||
diff --git a/fs/namei.c b/fs/namei.c index 87d7710a2e1d..0a8c5c27f90e 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/bitops.h> | 39 | #include <linux/bitops.h> |
40 | #include <linux/init_task.h> | 40 | #include <linux/init_task.h> |
41 | #include <linux/uaccess.h> | 41 | #include <linux/uaccess.h> |
42 | #include <linux/build_bug.h> | ||
43 | 42 | ||
44 | #include "internal.h" | 43 | #include "internal.h" |
45 | #include "mount.h" | 44 | #include "mount.h" |
@@ -131,7 +130,6 @@ getname_flags(const char __user *filename, int flags, int *empty) | |||
131 | struct filename *result; | 130 | struct filename *result; |
132 | char *kname; | 131 | char *kname; |
133 | int len; | 132 | int len; |
134 | BUILD_BUG_ON(offsetof(struct filename, iname) % sizeof(long) != 0); | ||
135 | 133 | ||
136 | result = audit_reusename(filename); | 134 | result = audit_reusename(filename); |
137 | if (result) | 135 | if (result) |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 03b4c4f225d0..dca5f244d63d 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -953,9 +953,6 @@ acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {} | |||
953 | #if defined(CONFIG_ACPI) && defined(CONFIG_DYNAMIC_DEBUG) | 953 | #if defined(CONFIG_ACPI) && defined(CONFIG_DYNAMIC_DEBUG) |
954 | __printf(3, 4) | 954 | __printf(3, 4) |
955 | void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const char *fmt, ...); | 955 | void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const char *fmt, ...); |
956 | #else | ||
957 | #define __acpi_handle_debug(descriptor, handle, fmt, ...) \ | ||
958 | acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__); | ||
959 | #endif | 956 | #endif |
960 | 957 | ||
961 | /* | 958 | /* |
@@ -985,12 +982,8 @@ void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c | |||
985 | #else | 982 | #else |
986 | #if defined(CONFIG_DYNAMIC_DEBUG) | 983 | #if defined(CONFIG_DYNAMIC_DEBUG) |
987 | #define acpi_handle_debug(handle, fmt, ...) \ | 984 | #define acpi_handle_debug(handle, fmt, ...) \ |
988 | do { \ | 985 | _dynamic_func_call(fmt, __acpi_handle_debug, \ |
989 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 986 | handle, pr_fmt(fmt), ##__VA_ARGS__) |
990 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ | ||
991 | __acpi_handle_debug(&descriptor, handle, pr_fmt(fmt), \ | ||
992 | ##__VA_ARGS__); \ | ||
993 | } while (0) | ||
994 | #else | 987 | #else |
995 | #define acpi_handle_debug(handle, fmt, ...) \ | 988 | #define acpi_handle_debug(handle, fmt, ...) \ |
996 | ({ \ | 989 | ({ \ |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 705f7c442691..602af23b98c7 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -246,7 +246,7 @@ static __always_inline void __assign_bit(long nr, volatile unsigned long *addr, | |||
246 | new__ = (old__ & ~mask__) | bits__; \ | 246 | new__ = (old__ & ~mask__) | bits__; \ |
247 | } while (cmpxchg(ptr, old__, new__) != old__); \ | 247 | } while (cmpxchg(ptr, old__, new__) != old__); \ |
248 | \ | 248 | \ |
249 | new__; \ | 249 | old__; \ |
250 | }) | 250 | }) |
251 | #endif | 251 | #endif |
252 | 252 | ||
diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h index faeec7433aab..0fe5426f2bdc 100644 --- a/include/linux/build_bug.h +++ b/include/linux/build_bug.h | |||
@@ -58,4 +58,23 @@ | |||
58 | */ | 58 | */ |
59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") |
60 | 60 | ||
61 | /** | ||
62 | * static_assert - check integer constant expression at build time | ||
63 | * | ||
64 | * static_assert() is a wrapper for the C11 _Static_assert, with a | ||
65 | * little macro magic to make the message optional (defaulting to the | ||
66 | * stringification of the tested expression). | ||
67 | * | ||
68 | * Contrary to BUILD_BUG_ON(), static_assert() can be used at global | ||
69 | * scope, but requires the expression to be an integer constant | ||
70 | * expression (i.e., it is not enough that __builtin_constant_p() is | ||
71 | * true for expr). | ||
72 | * | ||
73 | * Also note that BUILD_BUG_ON() fails the build if the condition is | ||
74 | * true, while static_assert() fails the build if the expression is | ||
75 | * false. | ||
76 | */ | ||
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ||
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ||
79 | |||
61 | #endif /* _LINUX_BUILD_BUG_H */ | 80 | #endif /* _LINUX_BUILD_BUG_H */ |
diff --git a/include/linux/delay.h b/include/linux/delay.h index b78bab4395d8..8e6828094c1e 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h | |||
@@ -55,6 +55,7 @@ static inline void ndelay(unsigned long x) | |||
55 | 55 | ||
56 | extern unsigned long lpj_fine; | 56 | extern unsigned long lpj_fine; |
57 | void calibrate_delay(void); | 57 | void calibrate_delay(void); |
58 | void __attribute__((weak)) calibration_delay_done(void); | ||
58 | void msleep(unsigned int msecs); | 59 | void msleep(unsigned int msecs); |
59 | unsigned long msleep_interruptible(unsigned int msecs); | 60 | unsigned long msleep_interruptible(unsigned int msecs); |
60 | void usleep_range(unsigned long min, unsigned long max); | 61 | void usleep_range(unsigned long min, unsigned long max); |
diff --git a/include/linux/device.h b/include/linux/device.h index 54b586105179..f40f6064ba05 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -1568,7 +1568,7 @@ do { \ | |||
1568 | DEFAULT_RATELIMIT_INTERVAL, \ | 1568 | DEFAULT_RATELIMIT_INTERVAL, \ |
1569 | DEFAULT_RATELIMIT_BURST); \ | 1569 | DEFAULT_RATELIMIT_BURST); \ |
1570 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 1570 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ |
1571 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ | 1571 | if (DYNAMIC_DEBUG_BRANCH(descriptor) && \ |
1572 | __ratelimit(&_rs)) \ | 1572 | __ratelimit(&_rs)) \ |
1573 | __dynamic_dev_dbg(&descriptor, dev, dev_fmt(fmt), \ | 1573 | __dynamic_dev_dbg(&descriptor, dev, dev_fmt(fmt), \ |
1574 | ##__VA_ARGS__); \ | 1574 | ##__VA_ARGS__); \ |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index b3419da1a776..c2be029b9b53 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -47,10 +47,10 @@ struct _ddebug { | |||
47 | } __attribute__((aligned(8))); | 47 | } __attribute__((aligned(8))); |
48 | 48 | ||
49 | 49 | ||
50 | int ddebug_add_module(struct _ddebug *tab, unsigned int n, | ||
51 | const char *modname); | ||
52 | 50 | ||
53 | #if defined(CONFIG_DYNAMIC_DEBUG) | 51 | #if defined(CONFIG_DYNAMIC_DEBUG) |
52 | int ddebug_add_module(struct _ddebug *tab, unsigned int n, | ||
53 | const char *modname); | ||
54 | extern int ddebug_remove_module(const char *mod_name); | 54 | extern int ddebug_remove_module(const char *mod_name); |
55 | extern __printf(2, 3) | 55 | extern __printf(2, 3) |
56 | void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); | 56 | void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); |
@@ -71,7 +71,7 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor, | |||
71 | const struct net_device *dev, | 71 | const struct net_device *dev, |
72 | const char *fmt, ...); | 72 | const char *fmt, ...); |
73 | 73 | ||
74 | #define DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, key, init) \ | 74 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ |
75 | static struct _ddebug __aligned(8) \ | 75 | static struct _ddebug __aligned(8) \ |
76 | __attribute__((section("__verbose"))) name = { \ | 76 | __attribute__((section("__verbose"))) name = { \ |
77 | .modname = KBUILD_MODNAME, \ | 77 | .modname = KBUILD_MODNAME, \ |
@@ -80,35 +80,27 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor, | |||
80 | .format = (fmt), \ | 80 | .format = (fmt), \ |
81 | .lineno = __LINE__, \ | 81 | .lineno = __LINE__, \ |
82 | .flags = _DPRINTK_FLAGS_DEFAULT, \ | 82 | .flags = _DPRINTK_FLAGS_DEFAULT, \ |
83 | dd_key_init(key, init) \ | 83 | _DPRINTK_KEY_INIT \ |
84 | } | 84 | } |
85 | 85 | ||
86 | #ifdef CONFIG_JUMP_LABEL | 86 | #ifdef CONFIG_JUMP_LABEL |
87 | 87 | ||
88 | #define dd_key_init(key, init) key = (init) | ||
89 | |||
90 | #ifdef DEBUG | 88 | #ifdef DEBUG |
91 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ | 89 | |
92 | DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_true, \ | 90 | #define _DPRINTK_KEY_INIT .key.dd_key_true = (STATIC_KEY_TRUE_INIT) |
93 | (STATIC_KEY_TRUE_INIT)) | ||
94 | 91 | ||
95 | #define DYNAMIC_DEBUG_BRANCH(descriptor) \ | 92 | #define DYNAMIC_DEBUG_BRANCH(descriptor) \ |
96 | static_branch_likely(&descriptor.key.dd_key_true) | 93 | static_branch_likely(&descriptor.key.dd_key_true) |
97 | #else | 94 | #else |
98 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ | 95 | #define _DPRINTK_KEY_INIT .key.dd_key_false = (STATIC_KEY_FALSE_INIT) |
99 | DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \ | ||
100 | (STATIC_KEY_FALSE_INIT)) | ||
101 | 96 | ||
102 | #define DYNAMIC_DEBUG_BRANCH(descriptor) \ | 97 | #define DYNAMIC_DEBUG_BRANCH(descriptor) \ |
103 | static_branch_unlikely(&descriptor.key.dd_key_false) | 98 | static_branch_unlikely(&descriptor.key.dd_key_false) |
104 | #endif | 99 | #endif |
105 | 100 | ||
106 | #else | 101 | #else /* !HAVE_JUMP_LABEL */ |
107 | 102 | ||
108 | #define dd_key_init(key, init) | 103 | #define _DPRINTK_KEY_INIT |
109 | |||
110 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ | ||
111 | DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, 0, 0) | ||
112 | 104 | ||
113 | #ifdef DEBUG | 105 | #ifdef DEBUG |
114 | #define DYNAMIC_DEBUG_BRANCH(descriptor) \ | 106 | #define DYNAMIC_DEBUG_BRANCH(descriptor) \ |
@@ -120,46 +112,66 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor, | |||
120 | 112 | ||
121 | #endif | 113 | #endif |
122 | 114 | ||
123 | #define dynamic_pr_debug(fmt, ...) \ | 115 | #define __dynamic_func_call(id, fmt, func, ...) do { \ |
124 | do { \ | 116 | DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \ |
125 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 117 | if (DYNAMIC_DEBUG_BRANCH(id)) \ |
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \ | 118 | func(&id, ##__VA_ARGS__); \ |
127 | __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ | ||
128 | ##__VA_ARGS__); \ | ||
129 | } while (0) | 119 | } while (0) |
130 | 120 | ||
131 | #define dynamic_dev_dbg(dev, fmt, ...) \ | 121 | #define __dynamic_func_call_no_desc(id, fmt, func, ...) do { \ |
132 | do { \ | 122 | DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \ |
133 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 123 | if (DYNAMIC_DEBUG_BRANCH(id)) \ |
134 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \ | 124 | func(__VA_ARGS__); \ |
135 | __dynamic_dev_dbg(&descriptor, dev, fmt, \ | ||
136 | ##__VA_ARGS__); \ | ||
137 | } while (0) | 125 | } while (0) |
138 | 126 | ||
127 | /* | ||
128 | * "Factory macro" for generating a call to func, guarded by a | ||
129 | * DYNAMIC_DEBUG_BRANCH. The dynamic debug decriptor will be | ||
130 | * initialized using the fmt argument. The function will be called with | ||
131 | * the address of the descriptor as first argument, followed by all | ||
132 | * the varargs. Note that fmt is repeated in invocations of this | ||
133 | * macro. | ||
134 | */ | ||
135 | #define _dynamic_func_call(fmt, func, ...) \ | ||
136 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) | ||
137 | /* | ||
138 | * A variant that does the same, except that the descriptor is not | ||
139 | * passed as the first argument to the function; it is only called | ||
140 | * with precisely the macro's varargs. | ||
141 | */ | ||
142 | #define _dynamic_func_call_no_desc(fmt, func, ...) \ | ||
143 | __dynamic_func_call_no_desc(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) | ||
144 | |||
145 | #define dynamic_pr_debug(fmt, ...) \ | ||
146 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ | ||
147 | pr_fmt(fmt), ##__VA_ARGS__) | ||
148 | |||
149 | #define dynamic_dev_dbg(dev, fmt, ...) \ | ||
150 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \ | ||
151 | dev, fmt, ##__VA_ARGS__) | ||
152 | |||
139 | #define dynamic_netdev_dbg(dev, fmt, ...) \ | 153 | #define dynamic_netdev_dbg(dev, fmt, ...) \ |
140 | do { \ | 154 | _dynamic_func_call(fmt, __dynamic_netdev_dbg, \ |
141 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 155 | dev, fmt, ##__VA_ARGS__) |
142 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \ | ||
143 | __dynamic_netdev_dbg(&descriptor, dev, fmt, \ | ||
144 | ##__VA_ARGS__); \ | ||
145 | } while (0) | ||
146 | 156 | ||
147 | #define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ | 157 | #define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ |
148 | groupsize, buf, len, ascii) \ | 158 | groupsize, buf, len, ascii) \ |
149 | do { \ | 159 | _dynamic_func_call_no_desc(__builtin_constant_p(prefix_str) ? prefix_str : "hexdump", \ |
150 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, \ | 160 | print_hex_dump, \ |
151 | __builtin_constant_p(prefix_str) ? prefix_str : "hexdump");\ | 161 | KERN_DEBUG, prefix_str, prefix_type, \ |
152 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \ | 162 | rowsize, groupsize, buf, len, ascii) |
153 | print_hex_dump(KERN_DEBUG, prefix_str, \ | ||
154 | prefix_type, rowsize, groupsize, \ | ||
155 | buf, len, ascii); \ | ||
156 | } while (0) | ||
157 | 163 | ||
158 | #else | 164 | #else |
159 | 165 | ||
160 | #include <linux/string.h> | 166 | #include <linux/string.h> |
161 | #include <linux/errno.h> | 167 | #include <linux/errno.h> |
162 | 168 | ||
169 | static inline int ddebug_add_module(struct _ddebug *tab, unsigned int n, | ||
170 | const char *modname) | ||
171 | { | ||
172 | return 0; | ||
173 | } | ||
174 | |||
163 | static inline int ddebug_remove_module(const char *mod) | 175 | static inline int ddebug_remove_module(const char *mod) |
164 | { | 176 | { |
165 | return 0; | 177 | return 0; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4ede9ffa362a..2cc540805a02 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -38,6 +38,8 @@ | |||
38 | #include <linux/errseq.h> | 38 | #include <linux/errseq.h> |
39 | #include <linux/ioprio.h> | 39 | #include <linux/ioprio.h> |
40 | #include <linux/fs_types.h> | 40 | #include <linux/fs_types.h> |
41 | #include <linux/build_bug.h> | ||
42 | #include <linux/stddef.h> | ||
41 | 43 | ||
42 | #include <asm/byteorder.h> | 44 | #include <asm/byteorder.h> |
43 | #include <uapi/linux/fs.h> | 45 | #include <uapi/linux/fs.h> |
@@ -2478,6 +2480,7 @@ struct filename { | |||
2478 | struct audit_names *aname; | 2480 | struct audit_names *aname; |
2479 | const char iname[]; | 2481 | const char iname[]; |
2480 | }; | 2482 | }; |
2483 | static_assert(offsetof(struct filename, iname) % sizeof(long) == 0); | ||
2481 | 2484 | ||
2482 | extern long vfs_truncate(const struct path *, loff_t); | 2485 | extern long vfs_truncate(const struct path *, loff_t); |
2483 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | 2486 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a8868a32098c..34a5036debd3 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | 5 | ||
6 | #include <stdarg.h> | 6 | #include <stdarg.h> |
7 | #include <linux/limits.h> | ||
7 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
8 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
9 | #include <linux/types.h> | 10 | #include <linux/types.h> |
@@ -14,36 +15,9 @@ | |||
14 | #include <linux/printk.h> | 15 | #include <linux/printk.h> |
15 | #include <linux/build_bug.h> | 16 | #include <linux/build_bug.h> |
16 | #include <asm/byteorder.h> | 17 | #include <asm/byteorder.h> |
18 | #include <asm/div64.h> | ||
17 | #include <uapi/linux/kernel.h> | 19 | #include <uapi/linux/kernel.h> |
18 | 20 | ||
19 | #define USHRT_MAX ((u16)(~0U)) | ||
20 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) | ||
21 | #define SHRT_MIN ((s16)(-SHRT_MAX - 1)) | ||
22 | #define INT_MAX ((int)(~0U>>1)) | ||
23 | #define INT_MIN (-INT_MAX - 1) | ||
24 | #define UINT_MAX (~0U) | ||
25 | #define LONG_MAX ((long)(~0UL>>1)) | ||
26 | #define LONG_MIN (-LONG_MAX - 1) | ||
27 | #define ULONG_MAX (~0UL) | ||
28 | #define LLONG_MAX ((long long)(~0ULL>>1)) | ||
29 | #define LLONG_MIN (-LLONG_MAX - 1) | ||
30 | #define ULLONG_MAX (~0ULL) | ||
31 | #define SIZE_MAX (~(size_t)0) | ||
32 | #define PHYS_ADDR_MAX (~(phys_addr_t)0) | ||
33 | |||
34 | #define U8_MAX ((u8)~0U) | ||
35 | #define S8_MAX ((s8)(U8_MAX>>1)) | ||
36 | #define S8_MIN ((s8)(-S8_MAX - 1)) | ||
37 | #define U16_MAX ((u16)~0U) | ||
38 | #define S16_MAX ((s16)(U16_MAX>>1)) | ||
39 | #define S16_MIN ((s16)(-S16_MAX - 1)) | ||
40 | #define U32_MAX ((u32)~0U) | ||
41 | #define S32_MAX ((s32)(U32_MAX>>1)) | ||
42 | #define S32_MIN ((s32)(-S32_MAX - 1)) | ||
43 | #define U64_MAX ((u64)~0ULL) | ||
44 | #define S64_MAX ((s64)(U64_MAX>>1)) | ||
45 | #define S64_MIN ((s64)(-S64_MAX - 1)) | ||
46 | |||
47 | #define STACK_MAGIC 0xdeadbeef | 21 | #define STACK_MAGIC 0xdeadbeef |
48 | 22 | ||
49 | /** | 23 | /** |
@@ -133,12 +107,10 @@ | |||
133 | * | 107 | * |
134 | * Rounds @x up to next multiple of @y. If @y will always be a power | 108 | * Rounds @x up to next multiple of @y. If @y will always be a power |
135 | * of 2, consider using the faster round_up(). | 109 | * of 2, consider using the faster round_up(). |
136 | * | ||
137 | * The `const' here prevents gcc-3.3 from calling __divdi3 | ||
138 | */ | 110 | */ |
139 | #define roundup(x, y) ( \ | 111 | #define roundup(x, y) ( \ |
140 | { \ | 112 | { \ |
141 | const typeof(y) __y = y; \ | 113 | typeof(y) __y = y; \ |
142 | (((x) + (__y - 1)) / __y) * __y; \ | 114 | (((x) + (__y - 1)) / __y) * __y; \ |
143 | } \ | 115 | } \ |
144 | ) | 116 | ) |
@@ -204,7 +176,6 @@ | |||
204 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | 176 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) |
205 | 177 | ||
206 | #ifdef CONFIG_LBDAF | 178 | #ifdef CONFIG_LBDAF |
207 | # include <asm/div64.h> | ||
208 | # define sector_div(a, b) do_div(a, b) | 179 | # define sector_div(a, b) do_div(a, b) |
209 | #else | 180 | #else |
210 | # define sector_div(n, b)( \ | 181 | # define sector_div(n, b)( \ |
diff --git a/include/linux/limits.h b/include/linux/limits.h new file mode 100644 index 000000000000..76afcd24ff8c --- /dev/null +++ b/include/linux/limits.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
2 | #ifndef _LINUX_LIMITS_H | ||
3 | #define _LINUX_LIMITS_H | ||
4 | |||
5 | #include <uapi/linux/limits.h> | ||
6 | #include <linux/types.h> | ||
7 | |||
8 | #define USHRT_MAX ((unsigned short)~0U) | ||
9 | #define SHRT_MAX ((short)(USHRT_MAX >> 1)) | ||
10 | #define SHRT_MIN ((short)(-SHRT_MAX - 1)) | ||
11 | #define INT_MAX ((int)(~0U >> 1)) | ||
12 | #define INT_MIN (-INT_MAX - 1) | ||
13 | #define UINT_MAX (~0U) | ||
14 | #define LONG_MAX ((long)(~0UL >> 1)) | ||
15 | #define LONG_MIN (-LONG_MAX - 1) | ||
16 | #define ULONG_MAX (~0UL) | ||
17 | #define LLONG_MAX ((long long)(~0ULL >> 1)) | ||
18 | #define LLONG_MIN (-LLONG_MAX - 1) | ||
19 | #define ULLONG_MAX (~0ULL) | ||
20 | #define SIZE_MAX (~(size_t)0) | ||
21 | #define PHYS_ADDR_MAX (~(phys_addr_t)0) | ||
22 | |||
23 | #define U8_MAX ((u8)~0U) | ||
24 | #define S8_MAX ((s8)(U8_MAX >> 1)) | ||
25 | #define S8_MIN ((s8)(-S8_MAX - 1)) | ||
26 | #define U16_MAX ((u16)~0U) | ||
27 | #define S16_MAX ((s16)(U16_MAX >> 1)) | ||
28 | #define S16_MIN ((s16)(-S16_MAX - 1)) | ||
29 | #define U32_MAX ((u32)~0U) | ||
30 | #define S32_MAX ((s32)(U32_MAX >> 1)) | ||
31 | #define S32_MIN ((s32)(-S32_MAX - 1)) | ||
32 | #define U64_MAX ((u64)~0ULL) | ||
33 | #define S64_MAX ((s64)(U64_MAX >> 1)) | ||
34 | #define S64_MIN ((s64)(-S64_MAX - 1)) | ||
35 | |||
36 | #endif /* _LINUX_LIMITS_H */ | ||
diff --git a/include/linux/lzo.h b/include/linux/lzo.h index 2ae27cb89927..e95c7d1092b2 100644 --- a/include/linux/lzo.h +++ b/include/linux/lzo.h | |||
@@ -18,12 +18,16 @@ | |||
18 | #define LZO1X_1_MEM_COMPRESS (8192 * sizeof(unsigned short)) | 18 | #define LZO1X_1_MEM_COMPRESS (8192 * sizeof(unsigned short)) |
19 | #define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS | 19 | #define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS |
20 | 20 | ||
21 | #define lzo1x_worst_compress(x) ((x) + ((x) / 16) + 64 + 3) | 21 | #define lzo1x_worst_compress(x) ((x) + ((x) / 16) + 64 + 3 + 2) |
22 | 22 | ||
23 | /* This requires 'wrkmem' of size LZO1X_1_MEM_COMPRESS */ | 23 | /* This requires 'wrkmem' of size LZO1X_1_MEM_COMPRESS */ |
24 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, | 24 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, |
25 | unsigned char *dst, size_t *dst_len, void *wrkmem); | 25 | unsigned char *dst, size_t *dst_len, void *wrkmem); |
26 | 26 | ||
27 | /* This requires 'wrkmem' of size LZO1X_1_MEM_COMPRESS */ | ||
28 | int lzorle1x_1_compress(const unsigned char *src, size_t src_len, | ||
29 | unsigned char *dst, size_t *dst_len, void *wrkmem); | ||
30 | |||
27 | /* safe decompression with overrun testing */ | 31 | /* safe decompression with overrun testing */ |
28 | int lzo1x_decompress_safe(const unsigned char *src, size_t src_len, | 32 | int lzo1x_decompress_safe(const unsigned char *src, size_t src_len, |
29 | unsigned char *dst, size_t *dst_len); | 33 | unsigned char *dst, size_t *dst_len); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 20ec56f8e2bb..5801ee849f36 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1323,52 +1323,6 @@ static inline void clear_page_pfmemalloc(struct page *page) | |||
1323 | } | 1323 | } |
1324 | 1324 | ||
1325 | /* | 1325 | /* |
1326 | * Different kinds of faults, as returned by handle_mm_fault(). | ||
1327 | * Used to decide whether a process gets delivered SIGBUS or | ||
1328 | * just gets major/minor fault counters bumped up. | ||
1329 | */ | ||
1330 | |||
1331 | #define VM_FAULT_OOM 0x0001 | ||
1332 | #define VM_FAULT_SIGBUS 0x0002 | ||
1333 | #define VM_FAULT_MAJOR 0x0004 | ||
1334 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | ||
1335 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ | ||
1336 | #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ | ||
1337 | #define VM_FAULT_SIGSEGV 0x0040 | ||
1338 | |||
1339 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | ||
1340 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | ||
1341 | #define VM_FAULT_RETRY 0x0400 /* ->fault blocked, must retry */ | ||
1342 | #define VM_FAULT_FALLBACK 0x0800 /* huge page fault failed, fall back to small */ | ||
1343 | #define VM_FAULT_DONE_COW 0x1000 /* ->fault has fully handled COW */ | ||
1344 | #define VM_FAULT_NEEDDSYNC 0x2000 /* ->fault did not modify page tables | ||
1345 | * and needs fsync() to complete (for | ||
1346 | * synchronous page faults in DAX) */ | ||
1347 | |||
1348 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \ | ||
1349 | VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \ | ||
1350 | VM_FAULT_FALLBACK) | ||
1351 | |||
1352 | #define VM_FAULT_RESULT_TRACE \ | ||
1353 | { VM_FAULT_OOM, "OOM" }, \ | ||
1354 | { VM_FAULT_SIGBUS, "SIGBUS" }, \ | ||
1355 | { VM_FAULT_MAJOR, "MAJOR" }, \ | ||
1356 | { VM_FAULT_WRITE, "WRITE" }, \ | ||
1357 | { VM_FAULT_HWPOISON, "HWPOISON" }, \ | ||
1358 | { VM_FAULT_HWPOISON_LARGE, "HWPOISON_LARGE" }, \ | ||
1359 | { VM_FAULT_SIGSEGV, "SIGSEGV" }, \ | ||
1360 | { VM_FAULT_NOPAGE, "NOPAGE" }, \ | ||
1361 | { VM_FAULT_LOCKED, "LOCKED" }, \ | ||
1362 | { VM_FAULT_RETRY, "RETRY" }, \ | ||
1363 | { VM_FAULT_FALLBACK, "FALLBACK" }, \ | ||
1364 | { VM_FAULT_DONE_COW, "DONE_COW" }, \ | ||
1365 | { VM_FAULT_NEEDDSYNC, "NEEDDSYNC" } | ||
1366 | |||
1367 | /* Encode hstate index for a hwpoisoned large page */ | ||
1368 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) | ||
1369 | #define VM_FAULT_GET_HINDEX(x) (((x) >> 12) & 0xf) | ||
1370 | |||
1371 | /* | ||
1372 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. | 1326 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. |
1373 | */ | 1327 | */ |
1374 | extern void pagefault_out_of_memory(void); | 1328 | extern void pagefault_out_of_memory(void); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index ab9b48420200..86e7a7a46353 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #endif | 22 | #endif |
23 | #define AT_VECTOR_SIZE (2*(AT_VECTOR_SIZE_ARCH + AT_VECTOR_SIZE_BASE + 1)) | 23 | #define AT_VECTOR_SIZE (2*(AT_VECTOR_SIZE_ARCH + AT_VECTOR_SIZE_BASE + 1)) |
24 | 24 | ||
25 | typedef int vm_fault_t; | ||
26 | 25 | ||
27 | struct address_space; | 26 | struct address_space; |
28 | struct mem_cgroup; | 27 | struct mem_cgroup; |
@@ -621,6 +620,78 @@ static inline bool mm_tlb_flush_nested(struct mm_struct *mm) | |||
621 | 620 | ||
622 | struct vm_fault; | 621 | struct vm_fault; |
623 | 622 | ||
623 | /** | ||
624 | * typedef vm_fault_t - Return type for page fault handlers. | ||
625 | * | ||
626 | * Page fault handlers return a bitmask of %VM_FAULT values. | ||
627 | */ | ||
628 | typedef __bitwise unsigned int vm_fault_t; | ||
629 | |||
630 | /** | ||
631 | * enum vm_fault_reason - Page fault handlers return a bitmask of | ||
632 | * these values to tell the core VM what happened when handling the | ||
633 | * fault. Used to decide whether a process gets delivered SIGBUS or | ||
634 | * just gets major/minor fault counters bumped up. | ||
635 | * | ||
636 | * @VM_FAULT_OOM: Out Of Memory | ||
637 | * @VM_FAULT_SIGBUS: Bad access | ||
638 | * @VM_FAULT_MAJOR: Page read from storage | ||
639 | * @VM_FAULT_WRITE: Special case for get_user_pages | ||
640 | * @VM_FAULT_HWPOISON: Hit poisoned small page | ||
641 | * @VM_FAULT_HWPOISON_LARGE: Hit poisoned large page. Index encoded | ||
642 | * in upper bits | ||
643 | * @VM_FAULT_SIGSEGV: segmentation fault | ||
644 | * @VM_FAULT_NOPAGE: ->fault installed the pte, not return page | ||
645 | * @VM_FAULT_LOCKED: ->fault locked the returned page | ||
646 | * @VM_FAULT_RETRY: ->fault blocked, must retry | ||
647 | * @VM_FAULT_FALLBACK: huge page fault failed, fall back to small | ||
648 | * @VM_FAULT_DONE_COW: ->fault has fully handled COW | ||
649 | * @VM_FAULT_NEEDDSYNC: ->fault did not modify page tables and needs | ||
650 | * fsync() to complete (for synchronous page faults | ||
651 | * in DAX) | ||
652 | * @VM_FAULT_HINDEX_MASK: mask HINDEX value | ||
653 | * | ||
654 | */ | ||
655 | enum vm_fault_reason { | ||
656 | VM_FAULT_OOM = (__force vm_fault_t)0x000001, | ||
657 | VM_FAULT_SIGBUS = (__force vm_fault_t)0x000002, | ||
658 | VM_FAULT_MAJOR = (__force vm_fault_t)0x000004, | ||
659 | VM_FAULT_WRITE = (__force vm_fault_t)0x000008, | ||
660 | VM_FAULT_HWPOISON = (__force vm_fault_t)0x000010, | ||
661 | VM_FAULT_HWPOISON_LARGE = (__force vm_fault_t)0x000020, | ||
662 | VM_FAULT_SIGSEGV = (__force vm_fault_t)0x000040, | ||
663 | VM_FAULT_NOPAGE = (__force vm_fault_t)0x000100, | ||
664 | VM_FAULT_LOCKED = (__force vm_fault_t)0x000200, | ||
665 | VM_FAULT_RETRY = (__force vm_fault_t)0x000400, | ||
666 | VM_FAULT_FALLBACK = (__force vm_fault_t)0x000800, | ||
667 | VM_FAULT_DONE_COW = (__force vm_fault_t)0x001000, | ||
668 | VM_FAULT_NEEDDSYNC = (__force vm_fault_t)0x002000, | ||
669 | VM_FAULT_HINDEX_MASK = (__force vm_fault_t)0x0f0000, | ||
670 | }; | ||
671 | |||
672 | /* Encode hstate index for a hwpoisoned large page */ | ||
673 | #define VM_FAULT_SET_HINDEX(x) ((__force vm_fault_t)((x) << 16)) | ||
674 | #define VM_FAULT_GET_HINDEX(x) (((x) >> 16) & 0xf) | ||
675 | |||
676 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | \ | ||
677 | VM_FAULT_SIGSEGV | VM_FAULT_HWPOISON | \ | ||
678 | VM_FAULT_HWPOISON_LARGE | VM_FAULT_FALLBACK) | ||
679 | |||
680 | #define VM_FAULT_RESULT_TRACE \ | ||
681 | { VM_FAULT_OOM, "OOM" }, \ | ||
682 | { VM_FAULT_SIGBUS, "SIGBUS" }, \ | ||
683 | { VM_FAULT_MAJOR, "MAJOR" }, \ | ||
684 | { VM_FAULT_WRITE, "WRITE" }, \ | ||
685 | { VM_FAULT_HWPOISON, "HWPOISON" }, \ | ||
686 | { VM_FAULT_HWPOISON_LARGE, "HWPOISON_LARGE" }, \ | ||
687 | { VM_FAULT_SIGSEGV, "SIGSEGV" }, \ | ||
688 | { VM_FAULT_NOPAGE, "NOPAGE" }, \ | ||
689 | { VM_FAULT_LOCKED, "LOCKED" }, \ | ||
690 | { VM_FAULT_RETRY, "RETRY" }, \ | ||
691 | { VM_FAULT_FALLBACK, "FALLBACK" }, \ | ||
692 | { VM_FAULT_DONE_COW, "DONE_COW" }, \ | ||
693 | { VM_FAULT_NEEDDSYNC, "NEEDDSYNC" } | ||
694 | |||
624 | struct vm_special_mapping { | 695 | struct vm_special_mapping { |
625 | const char *name; /* The name, e.g. "[vdso]". */ | 696 | const char *name; /* The name, e.g. "[vdso]". */ |
626 | 697 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index e0930678c8bf..651fca72286c 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -263,7 +263,7 @@ do { \ | |||
263 | #define net_dbg_ratelimited(fmt, ...) \ | 263 | #define net_dbg_ratelimited(fmt, ...) \ |
264 | do { \ | 264 | do { \ |
265 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 265 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ |
266 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ | 266 | if (DYNAMIC_DEBUG_BRANCH(descriptor) && \ |
267 | net_ratelimit()) \ | 267 | net_ratelimit()) \ |
268 | __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ | 268 | __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ |
269 | ##__VA_ARGS__); \ | 269 | ##__VA_ARGS__); \ |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 14a9a39da9c7..b6f4ba16065a 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -109,7 +109,6 @@ extern struct pid *find_vpid(int nr); | |||
109 | */ | 109 | */ |
110 | extern struct pid *find_get_pid(int nr); | 110 | extern struct pid *find_get_pid(int nr); |
111 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); | 111 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); |
112 | int next_pidmap(struct pid_namespace *pid_ns, unsigned int last); | ||
113 | 112 | ||
114 | extern struct pid *alloc_pid(struct pid_namespace *ns); | 113 | extern struct pid *alloc_pid(struct pid_namespace *ns); |
115 | extern void free_pid(struct pid *pid); | 114 | extern void free_pid(struct pid *pid); |
diff --git a/include/linux/printk.h b/include/linux/printk.h index 77740a506ebb..02b5c115d89b 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -461,7 +461,7 @@ do { \ | |||
461 | DEFAULT_RATELIMIT_INTERVAL, \ | 461 | DEFAULT_RATELIMIT_INTERVAL, \ |
462 | DEFAULT_RATELIMIT_BURST); \ | 462 | DEFAULT_RATELIMIT_BURST); \ |
463 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, pr_fmt(fmt)); \ | 463 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, pr_fmt(fmt)); \ |
464 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ | 464 | if (DYNAMIC_DEBUG_BRANCH(descriptor) && \ |
465 | __ratelimit(&_rs)) \ | 465 | __ratelimit(&_rs)) \ |
466 | __dynamic_pr_debug(&descriptor, pr_fmt(fmt), ##__VA_ARGS__); \ | 466 | __dynamic_pr_debug(&descriptor, pr_fmt(fmt), ##__VA_ARGS__); \ |
467 | } while (0) | 467 | } while (0) |
diff --git a/include/linux/relay.h b/include/linux/relay.h index e1bdf01a86e2..c759f96e39c1 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
@@ -66,7 +66,7 @@ struct rchan | |||
66 | struct kref kref; /* channel refcount */ | 66 | struct kref kref; /* channel refcount */ |
67 | void *private_data; /* for user-defined data */ | 67 | void *private_data; /* for user-defined data */ |
68 | size_t last_toobig; /* tried to log event > subbuf size */ | 68 | size_t last_toobig; /* tried to log event > subbuf size */ |
69 | struct rchan_buf ** __percpu buf; /* per-cpu channel buffers */ | 69 | struct rchan_buf * __percpu *buf; /* per-cpu channel buffers */ |
70 | int is_global; /* One global buffer ? */ | 70 | int is_global; /* One global buffer ? */ |
71 | struct list_head list; /* for channel list */ | 71 | struct list_head list; /* for channel list */ |
72 | struct dentry *parent; /* parent dentry passed to open */ | 72 | struct dentry *parent; /* parent dentry passed to open */ |
diff --git a/include/linux/types.h b/include/linux/types.h index c2615d6a019e..cc0dbbe551d5 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -155,9 +155,9 @@ typedef u64 dma_addr_t; | |||
155 | typedef u32 dma_addr_t; | 155 | typedef u32 dma_addr_t; |
156 | #endif | 156 | #endif |
157 | 157 | ||
158 | typedef unsigned __bitwise gfp_t; | 158 | typedef unsigned int __bitwise gfp_t; |
159 | typedef unsigned __bitwise slab_flags_t; | 159 | typedef unsigned int __bitwise slab_flags_t; |
160 | typedef unsigned __bitwise fmode_t; | 160 | typedef unsigned int __bitwise fmode_t; |
161 | 161 | ||
162 | #ifdef CONFIG_PHYS_ADDR_T_64BIT | 162 | #ifdef CONFIG_PHYS_ADDR_T_64BIT |
163 | typedef u64 phys_addr_t; | 163 | typedef u64 phys_addr_t; |
diff --git a/include/uapi/linux/auto_fs.h b/include/uapi/linux/auto_fs.h index 082119630b49..1f7925afad2d 100644 --- a/include/uapi/linux/auto_fs.h +++ b/include/uapi/linux/auto_fs.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define AUTOFS_MIN_PROTO_VERSION 3 | 23 | #define AUTOFS_MIN_PROTO_VERSION 3 |
24 | #define AUTOFS_MAX_PROTO_VERSION 5 | 24 | #define AUTOFS_MAX_PROTO_VERSION 5 |
25 | 25 | ||
26 | #define AUTOFS_PROTO_SUBVERSION 4 | 26 | #define AUTOFS_PROTO_SUBVERSION 5 |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed | 29 | * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed |
diff --git a/include/uapi/linux/binfmts.h b/include/uapi/linux/binfmts.h index 4abad03a8853..689025d9c185 100644 --- a/include/uapi/linux/binfmts.h +++ b/include/uapi/linux/binfmts.h | |||
@@ -16,6 +16,6 @@ struct pt_regs; | |||
16 | #define MAX_ARG_STRINGS 0x7FFFFFFF | 16 | #define MAX_ARG_STRINGS 0x7FFFFFFF |
17 | 17 | ||
18 | /* sizeof(linux_binprm->buf) */ | 18 | /* sizeof(linux_binprm->buf) */ |
19 | #define BINPRM_BUF_SIZE 128 | 19 | #define BINPRM_BUF_SIZE 256 |
20 | 20 | ||
21 | #endif /* _UAPI_LINUX_BINFMTS_H */ | 21 | #endif /* _UAPI_LINUX_BINFMTS_H */ |
diff --git a/include/uapi/linux/limits.h b/include/uapi/linux/limits.h index c3547f07605c..6bcbe3068761 100644 --- a/include/uapi/linux/limits.h +++ b/include/uapi/linux/limits.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
2 | #ifndef _LINUX_LIMITS_H | 2 | #ifndef _UAPI_LINUX_LIMITS_H |
3 | #define _LINUX_LIMITS_H | 3 | #define _UAPI_LINUX_LIMITS_H |
4 | 4 | ||
5 | #define NR_OPEN 1024 | 5 | #define NR_OPEN 1024 |
6 | 6 | ||
diff --git a/init/initramfs.c b/init/initramfs.c index fca899622937..4749e1115eef 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -431,7 +431,7 @@ static long __init flush_buffer(void *bufv, unsigned long len) | |||
431 | len -= written; | 431 | len -= written; |
432 | state = Reset; | 432 | state = Reset; |
433 | } else | 433 | } else |
434 | error("junk in compressed archive"); | 434 | error("junk within compressed archive"); |
435 | } | 435 | } |
436 | return origLen; | 436 | return origLen; |
437 | } | 437 | } |
@@ -488,9 +488,9 @@ static char * __init unpack_to_rootfs(char *buf, unsigned long len) | |||
488 | message = msg_buf; | 488 | message = msg_buf; |
489 | } | 489 | } |
490 | } else | 490 | } else |
491 | error("junk in compressed archive"); | 491 | error("invalid magic at start of compressed archive"); |
492 | if (state != Reset) | 492 | if (state != Reset) |
493 | error("junk in compressed archive"); | 493 | error("junk at the end of compressed archive"); |
494 | this_header = saved_offset + my_inptr; | 494 | this_header = saved_offset + my_inptr; |
495 | buf += my_inptr; | 495 | buf += my_inptr; |
496 | len -= my_inptr; | 496 | len -= my_inptr; |
@@ -488,18 +488,14 @@ static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s) | |||
488 | static struct sem_array *sem_alloc(size_t nsems) | 488 | static struct sem_array *sem_alloc(size_t nsems) |
489 | { | 489 | { |
490 | struct sem_array *sma; | 490 | struct sem_array *sma; |
491 | size_t size; | ||
492 | 491 | ||
493 | if (nsems > (INT_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) | 492 | if (nsems > (INT_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) |
494 | return NULL; | 493 | return NULL; |
495 | 494 | ||
496 | size = sizeof(*sma) + nsems * sizeof(sma->sems[0]); | 495 | sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL); |
497 | sma = kvmalloc(size, GFP_KERNEL); | ||
498 | if (unlikely(!sma)) | 496 | if (unlikely(!sma)) |
499 | return NULL; | 497 | return NULL; |
500 | 498 | ||
501 | memset(sma, 0, size); | ||
502 | |||
503 | return sma; | 499 | return sma; |
504 | } | 500 | } |
505 | 501 | ||
@@ -1680,6 +1676,7 @@ static long ksys_semctl(int semid, int semnum, int cmd, unsigned long arg, int v | |||
1680 | case IPC_SET: | 1676 | case IPC_SET: |
1681 | if (copy_semid_from_user(&semid64, p, version)) | 1677 | if (copy_semid_from_user(&semid64, p, version)) |
1682 | return -EFAULT; | 1678 | return -EFAULT; |
1679 | /* fall through */ | ||
1683 | case IPC_RMID: | 1680 | case IPC_RMID: |
1684 | return semctl_down(ns, semid, cmd, &semid64); | 1681 | return semctl_down(ns, semid, cmd, &semid64); |
1685 | default: | 1682 | default: |
diff --git a/kernel/.gitignore b/kernel/.gitignore index b3097bde4e9c..6e699100872f 100644 --- a/kernel/.gitignore +++ b/kernel/.gitignore | |||
@@ -1,7 +1,5 @@ | |||
1 | # | 1 | # |
2 | # Generated files | 2 | # Generated files |
3 | # | 3 | # |
4 | config_data.h | ||
5 | config_data.gz | ||
6 | timeconst.h | 4 | timeconst.h |
7 | hz.bc | 5 | hz.bc |
diff --git a/kernel/Makefile b/kernel/Makefile index 6aa7543bcdb2..6c57e78817da 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
@@ -116,17 +116,8 @@ obj-$(CONFIG_GCC_PLUGIN_STACKLEAK) += stackleak.o | |||
116 | KASAN_SANITIZE_stackleak.o := n | 116 | KASAN_SANITIZE_stackleak.o := n |
117 | KCOV_INSTRUMENT_stackleak.o := n | 117 | KCOV_INSTRUMENT_stackleak.o := n |
118 | 118 | ||
119 | $(obj)/configs.o: $(obj)/config_data.h | 119 | $(obj)/configs.o: $(obj)/config_data.gz |
120 | 120 | ||
121 | targets += config_data.gz | 121 | targets += config_data.gz |
122 | $(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE | 122 | $(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE |
123 | $(call if_changed,gzip) | 123 | $(call if_changed,gzip) |
124 | |||
125 | filechk_ikconfiggz = \ | ||
126 | echo "static const char kernel_config_data[] __used = MAGIC_START"; \ | ||
127 | cat $< | scripts/bin2c; \ | ||
128 | echo "MAGIC_END;" | ||
129 | |||
130 | targets += config_data.h | ||
131 | $(obj)/config_data.h: $(obj)/config_data.gz FORCE | ||
132 | $(call filechk,ikconfiggz) | ||
diff --git a/kernel/configs.c b/kernel/configs.c index 2df132b20217..b062425ccf8d 100644 --- a/kernel/configs.c +++ b/kernel/configs.c | |||
@@ -30,37 +30,35 @@ | |||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | 32 | ||
33 | /**************************************************/ | ||
34 | /* the actual current config file */ | ||
35 | |||
36 | /* | 33 | /* |
37 | * Define kernel_config_data and kernel_config_data_size, which contains the | 34 | * "IKCFG_ST" and "IKCFG_ED" are used to extract the config data from |
38 | * wrapped and compressed configuration file. The file is first compressed | 35 | * a binary kernel image or a module. See scripts/extract-ikconfig. |
39 | * with gzip and then bounded by two eight byte magic numbers to allow | ||
40 | * extraction from a binary kernel image: | ||
41 | * | ||
42 | * IKCFG_ST | ||
43 | * <image> | ||
44 | * IKCFG_ED | ||
45 | */ | 36 | */ |
46 | #define MAGIC_START "IKCFG_ST" | 37 | asm ( |
47 | #define MAGIC_END "IKCFG_ED" | 38 | " .pushsection .rodata, \"a\" \n" |
48 | #include "config_data.h" | 39 | " .ascii \"IKCFG_ST\" \n" |
49 | 40 | " .global kernel_config_data \n" | |
50 | 41 | "kernel_config_data: \n" | |
51 | #define MAGIC_SIZE (sizeof(MAGIC_START) - 1) | 42 | " .incbin \"kernel/config_data.gz\" \n" |
52 | #define kernel_config_data_size \ | 43 | " .global kernel_config_data_end \n" |
53 | (sizeof(kernel_config_data) - 1 - MAGIC_SIZE * 2) | 44 | "kernel_config_data_end: \n" |
45 | " .ascii \"IKCFG_ED\" \n" | ||
46 | " .popsection \n" | ||
47 | ); | ||
54 | 48 | ||
55 | #ifdef CONFIG_IKCONFIG_PROC | 49 | #ifdef CONFIG_IKCONFIG_PROC |
56 | 50 | ||
51 | extern char kernel_config_data; | ||
52 | extern char kernel_config_data_end; | ||
53 | |||
57 | static ssize_t | 54 | static ssize_t |
58 | ikconfig_read_current(struct file *file, char __user *buf, | 55 | ikconfig_read_current(struct file *file, char __user *buf, |
59 | size_t len, loff_t * offset) | 56 | size_t len, loff_t * offset) |
60 | { | 57 | { |
61 | return simple_read_from_buffer(buf, len, offset, | 58 | return simple_read_from_buffer(buf, len, offset, |
62 | kernel_config_data + MAGIC_SIZE, | 59 | &kernel_config_data, |
63 | kernel_config_data_size); | 60 | &kernel_config_data_end - |
61 | &kernel_config_data); | ||
64 | } | 62 | } |
65 | 63 | ||
66 | static const struct file_operations ikconfig_file_ops = { | 64 | static const struct file_operations ikconfig_file_ops = { |
@@ -79,7 +77,7 @@ static int __init ikconfig_init(void) | |||
79 | if (!entry) | 77 | if (!entry) |
80 | return -ENOMEM; | 78 | return -ENOMEM; |
81 | 79 | ||
82 | proc_set_size(entry, kernel_config_data_size); | 80 | proc_set_size(entry, &kernel_config_data_end - &kernel_config_data); |
83 | 81 | ||
84 | return 0; | 82 | return 0; |
85 | } | 83 | } |
diff --git a/kernel/fork.c b/kernel/fork.c index 77059b211608..874e48c410f8 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -77,7 +77,6 @@ | |||
77 | #include <linux/blkdev.h> | 77 | #include <linux/blkdev.h> |
78 | #include <linux/fs_struct.h> | 78 | #include <linux/fs_struct.h> |
79 | #include <linux/magic.h> | 79 | #include <linux/magic.h> |
80 | #include <linux/sched/mm.h> | ||
81 | #include <linux/perf_event.h> | 80 | #include <linux/perf_event.h> |
82 | #include <linux/posix-timers.h> | 81 | #include <linux/posix-timers.h> |
83 | #include <linux/user-return-notifier.h> | 82 | #include <linux/user-return-notifier.h> |
diff --git a/kernel/gcov/gcc_3_4.c b/kernel/gcov/gcc_3_4.c index 1e32e66c9563..2dddecbdbe6e 100644 --- a/kernel/gcov/gcc_3_4.c +++ b/kernel/gcov/gcc_3_4.c | |||
@@ -245,8 +245,7 @@ struct gcov_info *gcov_info_dup(struct gcov_info *info) | |||
245 | 245 | ||
246 | /* Duplicate gcov_info. */ | 246 | /* Duplicate gcov_info. */ |
247 | active = num_counter_active(info); | 247 | active = num_counter_active(info); |
248 | dup = kzalloc(sizeof(struct gcov_info) + | 248 | dup = kzalloc(struct_size(dup, counts, active), GFP_KERNEL); |
249 | sizeof(struct gcov_ctr_info) * active, GFP_KERNEL); | ||
250 | if (!dup) | 249 | if (!dup) |
251 | return NULL; | 250 | return NULL; |
252 | dup->version = info->version; | 251 | dup->version = info->version; |
@@ -364,8 +363,7 @@ struct gcov_iterator *gcov_iter_new(struct gcov_info *info) | |||
364 | { | 363 | { |
365 | struct gcov_iterator *iter; | 364 | struct gcov_iterator *iter; |
366 | 365 | ||
367 | iter = kzalloc(sizeof(struct gcov_iterator) + | 366 | iter = kzalloc(struct_size(iter, type_info, num_counter_active(info)), |
368 | num_counter_active(info) * sizeof(struct type_info), | ||
369 | GFP_KERNEL); | 367 | GFP_KERNEL); |
370 | if (iter) | 368 | if (iter) |
371 | iter->info = info; | 369 | iter->info = info; |
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 4a9191617076..f108a95882c6 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/utsname.h> | 19 | #include <linux/utsname.h> |
20 | #include <linux/sched/signal.h> | 20 | #include <linux/sched/signal.h> |
21 | #include <linux/sched/debug.h> | 21 | #include <linux/sched/debug.h> |
22 | #include <linux/sched/sysctl.h> | ||
22 | 23 | ||
23 | #include <trace/events/sched.h> | 24 | #include <trace/events/sched.h> |
24 | 25 | ||
@@ -126,7 +127,7 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) | |||
126 | if (sysctl_hung_task_warnings > 0) | 127 | if (sysctl_hung_task_warnings > 0) |
127 | sysctl_hung_task_warnings--; | 128 | sysctl_hung_task_warnings--; |
128 | pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n", | 129 | pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n", |
129 | t->comm, t->pid, timeout); | 130 | t->comm, t->pid, (jiffies - t->last_switch_time) / HZ); |
130 | pr_err(" %s %s %.*s\n", | 131 | pr_err(" %s %s %.*s\n", |
131 | print_tainted(), init_utsname()->release, | 132 | print_tainted(), init_utsname()->release, |
132 | (int)strcspn(init_utsname()->version, " "), | 133 | (int)strcspn(init_utsname()->version, " "), |
diff --git a/kernel/kcov.c b/kernel/kcov.c index c2277dbdbfb1..2ee38727844a 100644 --- a/kernel/kcov.c +++ b/kernel/kcov.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/debugfs.h> | 20 | #include <linux/debugfs.h> |
21 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
22 | #include <linux/kcov.h> | 22 | #include <linux/kcov.h> |
23 | #include <linux/refcount.h> | ||
23 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
24 | 25 | ||
25 | /* Number of 64-bit words written per one comparison: */ | 26 | /* Number of 64-bit words written per one comparison: */ |
@@ -44,7 +45,7 @@ struct kcov { | |||
44 | * - opened file descriptor | 45 | * - opened file descriptor |
45 | * - task with enabled coverage (we can't unwire it from another task) | 46 | * - task with enabled coverage (we can't unwire it from another task) |
46 | */ | 47 | */ |
47 | atomic_t refcount; | 48 | refcount_t refcount; |
48 | /* The lock protects mode, size, area and t. */ | 49 | /* The lock protects mode, size, area and t. */ |
49 | spinlock_t lock; | 50 | spinlock_t lock; |
50 | enum kcov_mode mode; | 51 | enum kcov_mode mode; |
@@ -228,12 +229,12 @@ EXPORT_SYMBOL(__sanitizer_cov_trace_switch); | |||
228 | 229 | ||
229 | static void kcov_get(struct kcov *kcov) | 230 | static void kcov_get(struct kcov *kcov) |
230 | { | 231 | { |
231 | atomic_inc(&kcov->refcount); | 232 | refcount_inc(&kcov->refcount); |
232 | } | 233 | } |
233 | 234 | ||
234 | static void kcov_put(struct kcov *kcov) | 235 | static void kcov_put(struct kcov *kcov) |
235 | { | 236 | { |
236 | if (atomic_dec_and_test(&kcov->refcount)) { | 237 | if (refcount_dec_and_test(&kcov->refcount)) { |
237 | vfree(kcov->area); | 238 | vfree(kcov->area); |
238 | kfree(kcov); | 239 | kfree(kcov); |
239 | } | 240 | } |
@@ -312,7 +313,7 @@ static int kcov_open(struct inode *inode, struct file *filep) | |||
312 | if (!kcov) | 313 | if (!kcov) |
313 | return -ENOMEM; | 314 | return -ENOMEM; |
314 | kcov->mode = KCOV_MODE_DISABLED; | 315 | kcov->mode = KCOV_MODE_DISABLED; |
315 | atomic_set(&kcov->refcount, 1); | 316 | refcount_set(&kcov->refcount, 1); |
316 | spin_lock_init(&kcov->lock); | 317 | spin_lock_init(&kcov->lock); |
317 | filep->private_data = kcov; | 318 | filep->private_data = kcov; |
318 | return nonseekable_open(inode, filep); | 319 | return nonseekable_open(inode, filep); |
@@ -444,10 +445,8 @@ static int __init kcov_init(void) | |||
444 | * there is no need to protect it against removal races. The | 445 | * there is no need to protect it against removal races. The |
445 | * use of debugfs_create_file_unsafe() is actually safe here. | 446 | * use of debugfs_create_file_unsafe() is actually safe here. |
446 | */ | 447 | */ |
447 | if (!debugfs_create_file_unsafe("kcov", 0600, NULL, NULL, &kcov_fops)) { | 448 | debugfs_create_file_unsafe("kcov", 0600, NULL, NULL, &kcov_fops); |
448 | pr_err("failed to create kcov in debugfs\n"); | 449 | |
449 | return -ENOMEM; | ||
450 | } | ||
451 | return 0; | 450 | return 0; |
452 | } | 451 | } |
453 | 452 | ||
diff --git a/kernel/module.c b/kernel/module.c index 2ad1b5239910..0b9aa8ab89f0 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -2719,11 +2719,7 @@ static void dynamic_debug_setup(struct module *mod, struct _ddebug *debug, unsig | |||
2719 | { | 2719 | { |
2720 | if (!debug) | 2720 | if (!debug) |
2721 | return; | 2721 | return; |
2722 | #ifdef CONFIG_DYNAMIC_DEBUG | 2722 | ddebug_add_module(debug, num, mod->name); |
2723 | if (ddebug_add_module(debug, num, mod->name)) | ||
2724 | pr_err("dynamic debug error adding module: %s\n", | ||
2725 | debug->modname); | ||
2726 | #endif | ||
2727 | } | 2723 | } |
2728 | 2724 | ||
2729 | static void dynamic_debug_remove(struct module *mod, struct _ddebug *debug) | 2725 | static void dynamic_debug_remove(struct module *mod, struct _ddebug *debug) |
diff --git a/kernel/panic.c b/kernel/panic.c index f121e6ba7e11..0ae0d7332f12 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -642,16 +642,14 @@ static int clear_warn_once_set(void *data, u64 val) | |||
642 | return 0; | 642 | return 0; |
643 | } | 643 | } |
644 | 644 | ||
645 | DEFINE_SIMPLE_ATTRIBUTE(clear_warn_once_fops, | 645 | DEFINE_DEBUGFS_ATTRIBUTE(clear_warn_once_fops, NULL, clear_warn_once_set, |
646 | NULL, | 646 | "%lld\n"); |
647 | clear_warn_once_set, | ||
648 | "%lld\n"); | ||
649 | 647 | ||
650 | static __init int register_warn_debugfs(void) | 648 | static __init int register_warn_debugfs(void) |
651 | { | 649 | { |
652 | /* Don't care about failure */ | 650 | /* Don't care about failure */ |
653 | debugfs_create_file("clear_warn_once", 0200, NULL, | 651 | debugfs_create_file_unsafe("clear_warn_once", 0200, NULL, NULL, |
654 | NULL, &clear_warn_once_fops); | 652 | &clear_warn_once_fops); |
655 | return 0; | 653 | return 0; |
656 | } | 654 | } |
657 | 655 | ||
diff --git a/kernel/sys.c b/kernel/sys.c index c5f875048aef..12df0e5434b8 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1747,6 +1747,7 @@ void getrusage(struct task_struct *p, int who, struct rusage *r) | |||
1747 | 1747 | ||
1748 | if (who == RUSAGE_CHILDREN) | 1748 | if (who == RUSAGE_CHILDREN) |
1749 | break; | 1749 | break; |
1750 | /* fall through */ | ||
1750 | 1751 | ||
1751 | case RUSAGE_SELF: | 1752 | case RUSAGE_SELF: |
1752 | thread_group_cputime_adjusted(p, &tgutime, &tgstime); | 1753 | thread_group_cputime_adjusted(p, &tgutime, &tgstime); |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 14f30b4a1b64..3fb1405f3f8c 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -67,6 +67,8 @@ | |||
67 | #include <linux/bpf.h> | 67 | #include <linux/bpf.h> |
68 | #include <linux/mount.h> | 68 | #include <linux/mount.h> |
69 | 69 | ||
70 | #include "../lib/kstrtox.h" | ||
71 | |||
70 | #include <linux/uaccess.h> | 72 | #include <linux/uaccess.h> |
71 | #include <asm/processor.h> | 73 | #include <asm/processor.h> |
72 | 74 | ||
@@ -127,6 +129,7 @@ static int __maybe_unused one = 1; | |||
127 | static int __maybe_unused two = 2; | 129 | static int __maybe_unused two = 2; |
128 | static int __maybe_unused four = 4; | 130 | static int __maybe_unused four = 4; |
129 | static unsigned long one_ul = 1; | 131 | static unsigned long one_ul = 1; |
132 | static unsigned long long_max = LONG_MAX; | ||
130 | static int one_hundred = 100; | 133 | static int one_hundred = 100; |
131 | static int one_thousand = 1000; | 134 | static int one_thousand = 1000; |
132 | #ifdef CONFIG_PRINTK | 135 | #ifdef CONFIG_PRINTK |
@@ -1747,6 +1750,8 @@ static struct ctl_table fs_table[] = { | |||
1747 | .maxlen = sizeof(files_stat.max_files), | 1750 | .maxlen = sizeof(files_stat.max_files), |
1748 | .mode = 0644, | 1751 | .mode = 0644, |
1749 | .proc_handler = proc_doulongvec_minmax, | 1752 | .proc_handler = proc_doulongvec_minmax, |
1753 | .extra1 = &zero, | ||
1754 | .extra2 = &long_max, | ||
1750 | }, | 1755 | }, |
1751 | { | 1756 | { |
1752 | .procname = "nr_open", | 1757 | .procname = "nr_open", |
@@ -2117,6 +2122,41 @@ static void proc_skip_char(char **buf, size_t *size, const char v) | |||
2117 | } | 2122 | } |
2118 | } | 2123 | } |
2119 | 2124 | ||
2125 | /** | ||
2126 | * strtoul_lenient - parse an ASCII formatted integer from a buffer and only | ||
2127 | * fail on overflow | ||
2128 | * | ||
2129 | * @cp: kernel buffer containing the string to parse | ||
2130 | * @endp: pointer to store the trailing characters | ||
2131 | * @base: the base to use | ||
2132 | * @res: where the parsed integer will be stored | ||
2133 | * | ||
2134 | * In case of success 0 is returned and @res will contain the parsed integer, | ||
2135 | * @endp will hold any trailing characters. | ||
2136 | * This function will fail the parse on overflow. If there wasn't an overflow | ||
2137 | * the function will defer the decision what characters count as invalid to the | ||
2138 | * caller. | ||
2139 | */ | ||
2140 | static int strtoul_lenient(const char *cp, char **endp, unsigned int base, | ||
2141 | unsigned long *res) | ||
2142 | { | ||
2143 | unsigned long long result; | ||
2144 | unsigned int rv; | ||
2145 | |||
2146 | cp = _parse_integer_fixup_radix(cp, &base); | ||
2147 | rv = _parse_integer(cp, base, &result); | ||
2148 | if ((rv & KSTRTOX_OVERFLOW) || (result != (unsigned long)result)) | ||
2149 | return -ERANGE; | ||
2150 | |||
2151 | cp += rv; | ||
2152 | |||
2153 | if (endp) | ||
2154 | *endp = (char *)cp; | ||
2155 | |||
2156 | *res = (unsigned long)result; | ||
2157 | return 0; | ||
2158 | } | ||
2159 | |||
2120 | #define TMPBUFLEN 22 | 2160 | #define TMPBUFLEN 22 |
2121 | /** | 2161 | /** |
2122 | * proc_get_long - reads an ASCII formatted integer from a user buffer | 2162 | * proc_get_long - reads an ASCII formatted integer from a user buffer |
@@ -2160,7 +2200,8 @@ static int proc_get_long(char **buf, size_t *size, | |||
2160 | if (!isdigit(*p)) | 2200 | if (!isdigit(*p)) |
2161 | return -EINVAL; | 2201 | return -EINVAL; |
2162 | 2202 | ||
2163 | *val = simple_strtoul(p, &p, 0); | 2203 | if (strtoul_lenient(p, &p, 0, val)) |
2204 | return -EINVAL; | ||
2164 | 2205 | ||
2165 | len = p - tmp; | 2206 | len = p - tmp; |
2166 | 2207 | ||
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 69bd8083930c..7abbeed13421 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -920,6 +920,16 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task) | |||
920 | * CONTEXT: | 920 | * CONTEXT: |
921 | * spin_lock_irq(rq->lock) | 921 | * spin_lock_irq(rq->lock) |
922 | * | 922 | * |
923 | * This function is called during schedule() when a kworker is going | ||
924 | * to sleep. It's used by psi to identify aggregation workers during | ||
925 | * dequeuing, to allow periodic aggregation to shut-off when that | ||
926 | * worker is the last task in the system or cgroup to go to sleep. | ||
927 | * | ||
928 | * As this function doesn't involve any workqueue-related locking, it | ||
929 | * only returns stable values when called from inside the scheduler's | ||
930 | * queuing and dequeuing paths, when @task, which must be a kworker, | ||
931 | * is guaranteed to not be processing any works. | ||
932 | * | ||
923 | * Return: | 933 | * Return: |
924 | * The last work function %current executed as a worker, NULL if it | 934 | * The last work function %current executed as a worker, NULL if it |
925 | * hasn't executed any work yet. | 935 | * hasn't executed any work yet. |
diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan index 98fa559ebd80..a2ae4a8e4fa6 100644 --- a/lib/Kconfig.ubsan +++ b/lib/Kconfig.ubsan | |||
@@ -27,15 +27,19 @@ config UBSAN_SANITIZE_ALL | |||
27 | Enabling this option will get kernel image size increased | 27 | Enabling this option will get kernel image size increased |
28 | significantly. | 28 | significantly. |
29 | 29 | ||
30 | config UBSAN_ALIGNMENT | 30 | config UBSAN_NO_ALIGNMENT |
31 | bool "Enable checking of pointers alignment" | 31 | bool "Disable checking of pointers alignment" |
32 | depends on UBSAN | 32 | depends on UBSAN |
33 | default y if !HAVE_EFFICIENT_UNALIGNED_ACCESS | 33 | default y if HAVE_EFFICIENT_UNALIGNED_ACCESS |
34 | help | 34 | help |
35 | This option enables detection of unaligned memory accesses. | 35 | This option disables the check of unaligned memory accesses. |
36 | Enabling this option on architectures that support unaligned | 36 | This option should be used when building allmodconfig. |
37 | Disabling this option on architectures that support unaligned | ||
37 | accesses may produce a lot of false positives. | 38 | accesses may produce a lot of false positives. |
38 | 39 | ||
40 | config UBSAN_ALIGNMENT | ||
41 | def_bool !UBSAN_NO_ALIGNMENT | ||
42 | |||
39 | config TEST_UBSAN | 43 | config TEST_UBSAN |
40 | tristate "Module for testing for undefined behavior detection" | 44 | tristate "Module for testing for undefined behavior detection" |
41 | depends on m && UBSAN | 45 | depends on m && UBSAN |
diff --git a/lib/assoc_array.c b/lib/assoc_array.c index 59875eb278ea..edc3c14af41d 100644 --- a/lib/assoc_array.c +++ b/lib/assoc_array.c | |||
@@ -1117,6 +1117,7 @@ struct assoc_array_edit *assoc_array_delete(struct assoc_array *array, | |||
1117 | index_key)) | 1117 | index_key)) |
1118 | goto found_leaf; | 1118 | goto found_leaf; |
1119 | } | 1119 | } |
1120 | /* fall through */ | ||
1120 | case assoc_array_walk_tree_empty: | 1121 | case assoc_array_walk_tree_empty: |
1121 | case assoc_array_walk_found_wrong_shortcut: | 1122 | case assoc_array_walk_found_wrong_shortcut: |
1122 | default: | 1123 | default: |
diff --git a/lib/div64.c b/lib/div64.c index 01c8602bb6ff..ee146bb4c558 100644 --- a/lib/div64.c +++ b/lib/div64.c | |||
@@ -109,7 +109,7 @@ u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) | |||
109 | quot = div_u64_rem(dividend, divisor, &rem32); | 109 | quot = div_u64_rem(dividend, divisor, &rem32); |
110 | *remainder = rem32; | 110 | *remainder = rem32; |
111 | } else { | 111 | } else { |
112 | int n = 1 + fls(high); | 112 | int n = fls(high); |
113 | quot = div_u64(dividend >> n, divisor >> n); | 113 | quot = div_u64(dividend >> n, divisor >> n); |
114 | 114 | ||
115 | if (quot != 0) | 115 | if (quot != 0) |
@@ -147,7 +147,7 @@ u64 div64_u64(u64 dividend, u64 divisor) | |||
147 | if (high == 0) { | 147 | if (high == 0) { |
148 | quot = div_u64(dividend, divisor); | 148 | quot = div_u64(dividend, divisor); |
149 | } else { | 149 | } else { |
150 | int n = 1 + fls(high); | 150 | int n = fls(high); |
151 | quot = div_u64(dividend >> n, divisor >> n); | 151 | quot = div_u64(dividend >> n, divisor >> n); |
152 | 152 | ||
153 | if (quot != 0) | 153 | if (quot != 0) |
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index dbf2b457e47e..7bdf98c37e91 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c | |||
@@ -847,17 +847,19 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, | |||
847 | const char *name) | 847 | const char *name) |
848 | { | 848 | { |
849 | struct ddebug_table *dt; | 849 | struct ddebug_table *dt; |
850 | const char *new_name; | ||
851 | 850 | ||
852 | dt = kzalloc(sizeof(*dt), GFP_KERNEL); | 851 | dt = kzalloc(sizeof(*dt), GFP_KERNEL); |
853 | if (dt == NULL) | 852 | if (dt == NULL) { |
854 | return -ENOMEM; | 853 | pr_err("error adding module: %s\n", name); |
855 | new_name = kstrdup_const(name, GFP_KERNEL); | ||
856 | if (new_name == NULL) { | ||
857 | kfree(dt); | ||
858 | return -ENOMEM; | 854 | return -ENOMEM; |
859 | } | 855 | } |
860 | dt->mod_name = new_name; | 856 | /* |
857 | * For built-in modules, name lives in .rodata and is | ||
858 | * immortal. For loaded modules, name points at the name[] | ||
859 | * member of struct module, which lives at least as long as | ||
860 | * this struct ddebug_table. | ||
861 | */ | ||
862 | dt->mod_name = name; | ||
861 | dt->num_ddebugs = n; | 863 | dt->num_ddebugs = n; |
862 | dt->ddebugs = tab; | 864 | dt->ddebugs = tab; |
863 | 865 | ||
@@ -868,7 +870,6 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, | |||
868 | vpr_info("%u debug prints in module %s\n", n, dt->mod_name); | 870 | vpr_info("%u debug prints in module %s\n", n, dt->mod_name); |
869 | return 0; | 871 | return 0; |
870 | } | 872 | } |
871 | EXPORT_SYMBOL_GPL(ddebug_add_module); | ||
872 | 873 | ||
873 | /* helper for ddebug_dyndbg_(boot|module)_param_cb */ | 874 | /* helper for ddebug_dyndbg_(boot|module)_param_cb */ |
874 | static int ddebug_dyndbg_param_cb(char *param, char *val, | 875 | static int ddebug_dyndbg_param_cb(char *param, char *val, |
@@ -913,7 +914,6 @@ int ddebug_dyndbg_module_param_cb(char *param, char *val, const char *module) | |||
913 | static void ddebug_table_free(struct ddebug_table *dt) | 914 | static void ddebug_table_free(struct ddebug_table *dt) |
914 | { | 915 | { |
915 | list_del_init(&dt->link); | 916 | list_del_init(&dt->link); |
916 | kfree_const(dt->mod_name); | ||
917 | kfree(dt); | 917 | kfree(dt); |
918 | } | 918 | } |
919 | 919 | ||
@@ -930,15 +930,15 @@ int ddebug_remove_module(const char *mod_name) | |||
930 | 930 | ||
931 | mutex_lock(&ddebug_lock); | 931 | mutex_lock(&ddebug_lock); |
932 | list_for_each_entry_safe(dt, nextdt, &ddebug_tables, link) { | 932 | list_for_each_entry_safe(dt, nextdt, &ddebug_tables, link) { |
933 | if (!strcmp(dt->mod_name, mod_name)) { | 933 | if (dt->mod_name == mod_name) { |
934 | ddebug_table_free(dt); | 934 | ddebug_table_free(dt); |
935 | ret = 0; | 935 | ret = 0; |
936 | break; | ||
936 | } | 937 | } |
937 | } | 938 | } |
938 | mutex_unlock(&ddebug_lock); | 939 | mutex_unlock(&ddebug_lock); |
939 | return ret; | 940 | return ret; |
940 | } | 941 | } |
941 | EXPORT_SYMBOL_GPL(ddebug_remove_module); | ||
942 | 942 | ||
943 | static void ddebug_remove_all_tables(void) | 943 | static void ddebug_remove_all_tables(void) |
944 | { | 944 | { |
diff --git a/lib/lzo/lzo1x_compress.c b/lib/lzo/lzo1x_compress.c index 236eb21167b5..4525fb094844 100644 --- a/lib/lzo/lzo1x_compress.c +++ b/lib/lzo/lzo1x_compress.c | |||
@@ -20,7 +20,8 @@ | |||
20 | static noinline size_t | 20 | static noinline size_t |
21 | lzo1x_1_do_compress(const unsigned char *in, size_t in_len, | 21 | lzo1x_1_do_compress(const unsigned char *in, size_t in_len, |
22 | unsigned char *out, size_t *out_len, | 22 | unsigned char *out, size_t *out_len, |
23 | size_t ti, void *wrkmem) | 23 | size_t ti, void *wrkmem, signed char *state_offset, |
24 | const unsigned char bitstream_version) | ||
24 | { | 25 | { |
25 | const unsigned char *ip; | 26 | const unsigned char *ip; |
26 | unsigned char *op; | 27 | unsigned char *op; |
@@ -35,27 +36,85 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len, | |||
35 | ip += ti < 4 ? 4 - ti : 0; | 36 | ip += ti < 4 ? 4 - ti : 0; |
36 | 37 | ||
37 | for (;;) { | 38 | for (;;) { |
38 | const unsigned char *m_pos; | 39 | const unsigned char *m_pos = NULL; |
39 | size_t t, m_len, m_off; | 40 | size_t t, m_len, m_off; |
40 | u32 dv; | 41 | u32 dv; |
42 | u32 run_length = 0; | ||
41 | literal: | 43 | literal: |
42 | ip += 1 + ((ip - ii) >> 5); | 44 | ip += 1 + ((ip - ii) >> 5); |
43 | next: | 45 | next: |
44 | if (unlikely(ip >= ip_end)) | 46 | if (unlikely(ip >= ip_end)) |
45 | break; | 47 | break; |
46 | dv = get_unaligned_le32(ip); | 48 | dv = get_unaligned_le32(ip); |
47 | t = ((dv * 0x1824429d) >> (32 - D_BITS)) & D_MASK; | 49 | |
48 | m_pos = in + dict[t]; | 50 | if (dv == 0 && bitstream_version) { |
49 | dict[t] = (lzo_dict_t) (ip - in); | 51 | const unsigned char *ir = ip + 4; |
50 | if (unlikely(dv != get_unaligned_le32(m_pos))) | 52 | const unsigned char *limit = ip_end |
51 | goto literal; | 53 | < (ip + MAX_ZERO_RUN_LENGTH + 1) |
54 | ? ip_end : ip + MAX_ZERO_RUN_LENGTH + 1; | ||
55 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && \ | ||
56 | defined(LZO_FAST_64BIT_MEMORY_ACCESS) | ||
57 | u64 dv64; | ||
58 | |||
59 | for (; (ir + 32) <= limit; ir += 32) { | ||
60 | dv64 = get_unaligned((u64 *)ir); | ||
61 | dv64 |= get_unaligned((u64 *)ir + 1); | ||
62 | dv64 |= get_unaligned((u64 *)ir + 2); | ||
63 | dv64 |= get_unaligned((u64 *)ir + 3); | ||
64 | if (dv64) | ||
65 | break; | ||
66 | } | ||
67 | for (; (ir + 8) <= limit; ir += 8) { | ||
68 | dv64 = get_unaligned((u64 *)ir); | ||
69 | if (dv64) { | ||
70 | # if defined(__LITTLE_ENDIAN) | ||
71 | ir += __builtin_ctzll(dv64) >> 3; | ||
72 | # elif defined(__BIG_ENDIAN) | ||
73 | ir += __builtin_clzll(dv64) >> 3; | ||
74 | # else | ||
75 | # error "missing endian definition" | ||
76 | # endif | ||
77 | break; | ||
78 | } | ||
79 | } | ||
80 | #else | ||
81 | while ((ir < (const unsigned char *) | ||
82 | ALIGN((uintptr_t)ir, 4)) && | ||
83 | (ir < limit) && (*ir == 0)) | ||
84 | ir++; | ||
85 | for (; (ir + 4) <= limit; ir += 4) { | ||
86 | dv = *((u32 *)ir); | ||
87 | if (dv) { | ||
88 | # if defined(__LITTLE_ENDIAN) | ||
89 | ir += __builtin_ctz(dv) >> 3; | ||
90 | # elif defined(__BIG_ENDIAN) | ||
91 | ir += __builtin_clz(dv) >> 3; | ||
92 | # else | ||
93 | # error "missing endian definition" | ||
94 | # endif | ||
95 | break; | ||
96 | } | ||
97 | } | ||
98 | #endif | ||
99 | while (likely(ir < limit) && unlikely(*ir == 0)) | ||
100 | ir++; | ||
101 | run_length = ir - ip; | ||
102 | if (run_length > MAX_ZERO_RUN_LENGTH) | ||
103 | run_length = MAX_ZERO_RUN_LENGTH; | ||
104 | } else { | ||
105 | t = ((dv * 0x1824429d) >> (32 - D_BITS)) & D_MASK; | ||
106 | m_pos = in + dict[t]; | ||
107 | dict[t] = (lzo_dict_t) (ip - in); | ||
108 | if (unlikely(dv != get_unaligned_le32(m_pos))) | ||
109 | goto literal; | ||
110 | } | ||
52 | 111 | ||
53 | ii -= ti; | 112 | ii -= ti; |
54 | ti = 0; | 113 | ti = 0; |
55 | t = ip - ii; | 114 | t = ip - ii; |
56 | if (t != 0) { | 115 | if (t != 0) { |
57 | if (t <= 3) { | 116 | if (t <= 3) { |
58 | op[-2] |= t; | 117 | op[*state_offset] |= t; |
59 | COPY4(op, ii); | 118 | COPY4(op, ii); |
60 | op += t; | 119 | op += t; |
61 | } else if (t <= 16) { | 120 | } else if (t <= 16) { |
@@ -88,6 +147,17 @@ next: | |||
88 | } | 147 | } |
89 | } | 148 | } |
90 | 149 | ||
150 | if (unlikely(run_length)) { | ||
151 | ip += run_length; | ||
152 | run_length -= MIN_ZERO_RUN_LENGTH; | ||
153 | put_unaligned_le32((run_length << 21) | 0xfffc18 | ||
154 | | (run_length & 0x7), op); | ||
155 | op += 4; | ||
156 | run_length = 0; | ||
157 | *state_offset = -3; | ||
158 | goto finished_writing_instruction; | ||
159 | } | ||
160 | |||
91 | m_len = 4; | 161 | m_len = 4; |
92 | { | 162 | { |
93 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && defined(LZO_USE_CTZ64) | 163 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && defined(LZO_USE_CTZ64) |
@@ -170,7 +240,6 @@ m_len_done: | |||
170 | 240 | ||
171 | m_off = ip - m_pos; | 241 | m_off = ip - m_pos; |
172 | ip += m_len; | 242 | ip += m_len; |
173 | ii = ip; | ||
174 | if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) { | 243 | if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) { |
175 | m_off -= 1; | 244 | m_off -= 1; |
176 | *op++ = (((m_len - 1) << 5) | ((m_off & 7) << 2)); | 245 | *op++ = (((m_len - 1) << 5) | ((m_off & 7) << 2)); |
@@ -207,29 +276,45 @@ m_len_done: | |||
207 | *op++ = (m_off << 2); | 276 | *op++ = (m_off << 2); |
208 | *op++ = (m_off >> 6); | 277 | *op++ = (m_off >> 6); |
209 | } | 278 | } |
279 | *state_offset = -2; | ||
280 | finished_writing_instruction: | ||
281 | ii = ip; | ||
210 | goto next; | 282 | goto next; |
211 | } | 283 | } |
212 | *out_len = op - out; | 284 | *out_len = op - out; |
213 | return in_end - (ii - ti); | 285 | return in_end - (ii - ti); |
214 | } | 286 | } |
215 | 287 | ||
216 | int lzo1x_1_compress(const unsigned char *in, size_t in_len, | 288 | int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len, |
217 | unsigned char *out, size_t *out_len, | 289 | unsigned char *out, size_t *out_len, |
218 | void *wrkmem) | 290 | void *wrkmem, const unsigned char bitstream_version) |
219 | { | 291 | { |
220 | const unsigned char *ip = in; | 292 | const unsigned char *ip = in; |
221 | unsigned char *op = out; | 293 | unsigned char *op = out; |
222 | size_t l = in_len; | 294 | size_t l = in_len; |
223 | size_t t = 0; | 295 | size_t t = 0; |
296 | signed char state_offset = -2; | ||
297 | unsigned int m4_max_offset; | ||
298 | |||
299 | // LZO v0 will never write 17 as first byte, | ||
300 | // so this is used to version the bitstream | ||
301 | if (bitstream_version > 0) { | ||
302 | *op++ = 17; | ||
303 | *op++ = bitstream_version; | ||
304 | m4_max_offset = M4_MAX_OFFSET_V1; | ||
305 | } else { | ||
306 | m4_max_offset = M4_MAX_OFFSET_V0; | ||
307 | } | ||
224 | 308 | ||
225 | while (l > 20) { | 309 | while (l > 20) { |
226 | size_t ll = l <= (M4_MAX_OFFSET + 1) ? l : (M4_MAX_OFFSET + 1); | 310 | size_t ll = l <= (m4_max_offset + 1) ? l : (m4_max_offset + 1); |
227 | uintptr_t ll_end = (uintptr_t) ip + ll; | 311 | uintptr_t ll_end = (uintptr_t) ip + ll; |
228 | if ((ll_end + ((t + ll) >> 5)) <= ll_end) | 312 | if ((ll_end + ((t + ll) >> 5)) <= ll_end) |
229 | break; | 313 | break; |
230 | BUILD_BUG_ON(D_SIZE * sizeof(lzo_dict_t) > LZO1X_1_MEM_COMPRESS); | 314 | BUILD_BUG_ON(D_SIZE * sizeof(lzo_dict_t) > LZO1X_1_MEM_COMPRESS); |
231 | memset(wrkmem, 0, D_SIZE * sizeof(lzo_dict_t)); | 315 | memset(wrkmem, 0, D_SIZE * sizeof(lzo_dict_t)); |
232 | t = lzo1x_1_do_compress(ip, ll, op, out_len, t, wrkmem); | 316 | t = lzo1x_1_do_compress(ip, ll, op, out_len, t, wrkmem, |
317 | &state_offset, bitstream_version); | ||
233 | ip += ll; | 318 | ip += ll; |
234 | op += *out_len; | 319 | op += *out_len; |
235 | l -= ll; | 320 | l -= ll; |
@@ -242,7 +327,7 @@ int lzo1x_1_compress(const unsigned char *in, size_t in_len, | |||
242 | if (op == out && t <= 238) { | 327 | if (op == out && t <= 238) { |
243 | *op++ = (17 + t); | 328 | *op++ = (17 + t); |
244 | } else if (t <= 3) { | 329 | } else if (t <= 3) { |
245 | op[-2] |= t; | 330 | op[state_offset] |= t; |
246 | } else if (t <= 18) { | 331 | } else if (t <= 18) { |
247 | *op++ = (t - 3); | 332 | *op++ = (t - 3); |
248 | } else { | 333 | } else { |
@@ -273,7 +358,24 @@ int lzo1x_1_compress(const unsigned char *in, size_t in_len, | |||
273 | *out_len = op - out; | 358 | *out_len = op - out; |
274 | return LZO_E_OK; | 359 | return LZO_E_OK; |
275 | } | 360 | } |
361 | |||
362 | int lzo1x_1_compress(const unsigned char *in, size_t in_len, | ||
363 | unsigned char *out, size_t *out_len, | ||
364 | void *wrkmem) | ||
365 | { | ||
366 | return lzogeneric1x_1_compress(in, in_len, out, out_len, wrkmem, 0); | ||
367 | } | ||
368 | |||
369 | int lzorle1x_1_compress(const unsigned char *in, size_t in_len, | ||
370 | unsigned char *out, size_t *out_len, | ||
371 | void *wrkmem) | ||
372 | { | ||
373 | return lzogeneric1x_1_compress(in, in_len, out, out_len, | ||
374 | wrkmem, LZO_VERSION); | ||
375 | } | ||
376 | |||
276 | EXPORT_SYMBOL_GPL(lzo1x_1_compress); | 377 | EXPORT_SYMBOL_GPL(lzo1x_1_compress); |
378 | EXPORT_SYMBOL_GPL(lzorle1x_1_compress); | ||
277 | 379 | ||
278 | MODULE_LICENSE("GPL"); | 380 | MODULE_LICENSE("GPL"); |
279 | MODULE_DESCRIPTION("LZO1X-1 Compressor"); | 381 | MODULE_DESCRIPTION("LZO1X-1 Compressor"); |
diff --git a/lib/lzo/lzo1x_decompress_safe.c b/lib/lzo/lzo1x_decompress_safe.c index a1c387f6afba..6d2600ea3b55 100644 --- a/lib/lzo/lzo1x_decompress_safe.c +++ b/lib/lzo/lzo1x_decompress_safe.c | |||
@@ -46,11 +46,23 @@ int lzo1x_decompress_safe(const unsigned char *in, size_t in_len, | |||
46 | const unsigned char * const ip_end = in + in_len; | 46 | const unsigned char * const ip_end = in + in_len; |
47 | unsigned char * const op_end = out + *out_len; | 47 | unsigned char * const op_end = out + *out_len; |
48 | 48 | ||
49 | unsigned char bitstream_version; | ||
50 | |||
49 | op = out; | 51 | op = out; |
50 | ip = in; | 52 | ip = in; |
51 | 53 | ||
52 | if (unlikely(in_len < 3)) | 54 | if (unlikely(in_len < 3)) |
53 | goto input_overrun; | 55 | goto input_overrun; |
56 | |||
57 | if (likely(*ip == 17)) { | ||
58 | bitstream_version = ip[1]; | ||
59 | ip += 2; | ||
60 | if (unlikely(in_len < 5)) | ||
61 | goto input_overrun; | ||
62 | } else { | ||
63 | bitstream_version = 0; | ||
64 | } | ||
65 | |||
54 | if (*ip > 17) { | 66 | if (*ip > 17) { |
55 | t = *ip++ - 17; | 67 | t = *ip++ - 17; |
56 | if (t < 4) { | 68 | if (t < 4) { |
@@ -154,32 +166,49 @@ copy_literal_run: | |||
154 | m_pos -= next >> 2; | 166 | m_pos -= next >> 2; |
155 | next &= 3; | 167 | next &= 3; |
156 | } else { | 168 | } else { |
157 | m_pos = op; | 169 | NEED_IP(2); |
158 | m_pos -= (t & 8) << 11; | 170 | next = get_unaligned_le16(ip); |
159 | t = (t & 7) + (3 - 1); | 171 | if (((next & 0xfffc) == 0xfffc) && |
160 | if (unlikely(t == 2)) { | 172 | ((t & 0xf8) == 0x18) && |
161 | size_t offset; | 173 | likely(bitstream_version)) { |
162 | const unsigned char *ip_last = ip; | 174 | NEED_IP(3); |
175 | t &= 7; | ||
176 | t |= ip[2] << 3; | ||
177 | t += MIN_ZERO_RUN_LENGTH; | ||
178 | NEED_OP(t); | ||
179 | memset(op, 0, t); | ||
180 | op += t; | ||
181 | next &= 3; | ||
182 | ip += 3; | ||
183 | goto match_next; | ||
184 | } else { | ||
185 | m_pos = op; | ||
186 | m_pos -= (t & 8) << 11; | ||
187 | t = (t & 7) + (3 - 1); | ||
188 | if (unlikely(t == 2)) { | ||
189 | size_t offset; | ||
190 | const unsigned char *ip_last = ip; | ||
163 | 191 | ||
164 | while (unlikely(*ip == 0)) { | 192 | while (unlikely(*ip == 0)) { |
165 | ip++; | 193 | ip++; |
166 | NEED_IP(1); | 194 | NEED_IP(1); |
167 | } | 195 | } |
168 | offset = ip - ip_last; | 196 | offset = ip - ip_last; |
169 | if (unlikely(offset > MAX_255_COUNT)) | 197 | if (unlikely(offset > MAX_255_COUNT)) |
170 | return LZO_E_ERROR; | 198 | return LZO_E_ERROR; |
171 | 199 | ||
172 | offset = (offset << 8) - offset; | 200 | offset = (offset << 8) - offset; |
173 | t += offset + 7 + *ip++; | 201 | t += offset + 7 + *ip++; |
174 | NEED_IP(2); | 202 | NEED_IP(2); |
203 | next = get_unaligned_le16(ip); | ||
204 | } | ||
205 | ip += 2; | ||
206 | m_pos -= next >> 2; | ||
207 | next &= 3; | ||
208 | if (m_pos == op) | ||
209 | goto eof_found; | ||
210 | m_pos -= 0x4000; | ||
175 | } | 211 | } |
176 | next = get_unaligned_le16(ip); | ||
177 | ip += 2; | ||
178 | m_pos -= next >> 2; | ||
179 | next &= 3; | ||
180 | if (m_pos == op) | ||
181 | goto eof_found; | ||
182 | m_pos -= 0x4000; | ||
183 | } | 212 | } |
184 | TEST_LB(m_pos); | 213 | TEST_LB(m_pos); |
185 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) | 214 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) |
diff --git a/lib/lzo/lzodefs.h b/lib/lzo/lzodefs.h index 4edefd2f540c..b60851fcf6ce 100644 --- a/lib/lzo/lzodefs.h +++ b/lib/lzo/lzodefs.h | |||
@@ -13,9 +13,15 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | 15 | ||
16 | /* Version | ||
17 | * 0: original lzo version | ||
18 | * 1: lzo with support for RLE | ||
19 | */ | ||
20 | #define LZO_VERSION 1 | ||
21 | |||
16 | #define COPY4(dst, src) \ | 22 | #define COPY4(dst, src) \ |
17 | put_unaligned(get_unaligned((const u32 *)(src)), (u32 *)(dst)) | 23 | put_unaligned(get_unaligned((const u32 *)(src)), (u32 *)(dst)) |
18 | #if defined(__x86_64__) | 24 | #if defined(CONFIG_X86_64) || defined(CONFIG_ARM64) |
19 | #define COPY8(dst, src) \ | 25 | #define COPY8(dst, src) \ |
20 | put_unaligned(get_unaligned((const u64 *)(src)), (u64 *)(dst)) | 26 | put_unaligned(get_unaligned((const u64 *)(src)), (u64 *)(dst)) |
21 | #else | 27 | #else |
@@ -25,19 +31,21 @@ | |||
25 | 31 | ||
26 | #if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) | 32 | #if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) |
27 | #error "conflicting endian definitions" | 33 | #error "conflicting endian definitions" |
28 | #elif defined(__x86_64__) | 34 | #elif defined(CONFIG_X86_64) || defined(CONFIG_ARM64) |
29 | #define LZO_USE_CTZ64 1 | 35 | #define LZO_USE_CTZ64 1 |
30 | #define LZO_USE_CTZ32 1 | 36 | #define LZO_USE_CTZ32 1 |
31 | #elif defined(__i386__) || defined(__powerpc__) | 37 | #define LZO_FAST_64BIT_MEMORY_ACCESS |
38 | #elif defined(CONFIG_X86) || defined(CONFIG_PPC) | ||
32 | #define LZO_USE_CTZ32 1 | 39 | #define LZO_USE_CTZ32 1 |
33 | #elif defined(__arm__) && (__LINUX_ARM_ARCH__ >= 5) | 40 | #elif defined(CONFIG_ARM) && (__LINUX_ARM_ARCH__ >= 5) |
34 | #define LZO_USE_CTZ32 1 | 41 | #define LZO_USE_CTZ32 1 |
35 | #endif | 42 | #endif |
36 | 43 | ||
37 | #define M1_MAX_OFFSET 0x0400 | 44 | #define M1_MAX_OFFSET 0x0400 |
38 | #define M2_MAX_OFFSET 0x0800 | 45 | #define M2_MAX_OFFSET 0x0800 |
39 | #define M3_MAX_OFFSET 0x4000 | 46 | #define M3_MAX_OFFSET 0x4000 |
40 | #define M4_MAX_OFFSET 0xbfff | 47 | #define M4_MAX_OFFSET_V0 0xbfff |
48 | #define M4_MAX_OFFSET_V1 0xbffe | ||
41 | 49 | ||
42 | #define M1_MIN_LEN 2 | 50 | #define M1_MIN_LEN 2 |
43 | #define M1_MAX_LEN 2 | 51 | #define M1_MAX_LEN 2 |
@@ -53,6 +61,9 @@ | |||
53 | #define M3_MARKER 32 | 61 | #define M3_MARKER 32 |
54 | #define M4_MARKER 16 | 62 | #define M4_MARKER 16 |
55 | 63 | ||
64 | #define MIN_ZERO_RUN_LENGTH 4 | ||
65 | #define MAX_ZERO_RUN_LENGTH (2047 + MIN_ZERO_RUN_LENGTH) | ||
66 | |||
56 | #define lzo_dict_t unsigned short | 67 | #define lzo_dict_t unsigned short |
57 | #define D_BITS 13 | 68 | #define D_BITS 13 |
58 | #define D_SIZE (1u << D_BITS) | 69 | #define D_SIZE (1u << D_BITS) |
diff --git a/lib/test_firmware.c b/lib/test_firmware.c index 7cab9a9869ac..7222093ee00b 100644 --- a/lib/test_firmware.c +++ b/lib/test_firmware.c | |||
@@ -631,11 +631,6 @@ static ssize_t trigger_batched_requests_store(struct device *dev, | |||
631 | 631 | ||
632 | for (i = 0; i < test_fw_config->num_requests; i++) { | 632 | for (i = 0; i < test_fw_config->num_requests; i++) { |
633 | req = &test_fw_config->reqs[i]; | 633 | req = &test_fw_config->reqs[i]; |
634 | if (!req) { | ||
635 | WARN_ON(1); | ||
636 | rc = -ENOMEM; | ||
637 | goto out_bail; | ||
638 | } | ||
639 | req->fw = NULL; | 634 | req->fw = NULL; |
640 | req->idx = i; | 635 | req->idx = i; |
641 | req->name = test_fw_config->name; | 636 | req->name = test_fw_config->name; |
@@ -737,10 +732,6 @@ ssize_t trigger_batched_requests_async_store(struct device *dev, | |||
737 | 732 | ||
738 | for (i = 0; i < test_fw_config->num_requests; i++) { | 733 | for (i = 0; i < test_fw_config->num_requests; i++) { |
739 | req = &test_fw_config->reqs[i]; | 734 | req = &test_fw_config->reqs[i]; |
740 | if (!req) { | ||
741 | WARN_ON(1); | ||
742 | goto out_bail; | ||
743 | } | ||
744 | req->name = test_fw_config->name; | 735 | req->name = test_fw_config->name; |
745 | req->fw = NULL; | 736 | req->fw = NULL; |
746 | req->idx = i; | 737 | req->idx = i; |
diff --git a/lib/test_ubsan.c b/lib/test_ubsan.c index 280f4979d00e..9ea10adf7a66 100644 --- a/lib/test_ubsan.c +++ b/lib/test_ubsan.c | |||
@@ -42,14 +42,6 @@ static void test_ubsan_divrem_overflow(void) | |||
42 | val /= val2; | 42 | val /= val2; |
43 | } | 43 | } |
44 | 44 | ||
45 | static void test_ubsan_vla_bound_not_positive(void) | ||
46 | { | ||
47 | volatile int size = -1; | ||
48 | char buf[size]; | ||
49 | |||
50 | (void)buf; | ||
51 | } | ||
52 | |||
53 | static void test_ubsan_shift_out_of_bounds(void) | 45 | static void test_ubsan_shift_out_of_bounds(void) |
54 | { | 46 | { |
55 | volatile int val = -1; | 47 | volatile int val = -1; |
@@ -61,7 +53,7 @@ static void test_ubsan_shift_out_of_bounds(void) | |||
61 | static void test_ubsan_out_of_bounds(void) | 53 | static void test_ubsan_out_of_bounds(void) |
62 | { | 54 | { |
63 | volatile int i = 4, j = 5; | 55 | volatile int i = 4, j = 5; |
64 | volatile int arr[i]; | 56 | volatile int arr[4]; |
65 | 57 | ||
66 | arr[j] = i; | 58 | arr[j] = i; |
67 | } | 59 | } |
@@ -113,7 +105,6 @@ static const test_ubsan_fp test_ubsan_array[] = { | |||
113 | test_ubsan_mul_overflow, | 105 | test_ubsan_mul_overflow, |
114 | test_ubsan_negate_overflow, | 106 | test_ubsan_negate_overflow, |
115 | test_ubsan_divrem_overflow, | 107 | test_ubsan_divrem_overflow, |
116 | test_ubsan_vla_bound_not_positive, | ||
117 | test_ubsan_shift_out_of_bounds, | 108 | test_ubsan_shift_out_of_bounds, |
118 | test_ubsan_out_of_bounds, | 109 | test_ubsan_out_of_bounds, |
119 | test_ubsan_load_invalid_value, | 110 | test_ubsan_load_invalid_value, |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 3add92329bae..30b00de4f321 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <stdarg.h> | 19 | #include <stdarg.h> |
20 | #include <linux/build_bug.h> | ||
20 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
21 | #include <linux/clk-provider.h> | 22 | #include <linux/clk-provider.h> |
22 | #include <linux/module.h> /* for KSYM_SYMBOL_LEN */ | 23 | #include <linux/module.h> /* for KSYM_SYMBOL_LEN */ |
@@ -405,6 +406,8 @@ struct printf_spec { | |||
405 | unsigned int base:8; /* number base, 8, 10 or 16 only */ | 406 | unsigned int base:8; /* number base, 8, 10 or 16 only */ |
406 | signed int precision:16; /* # of digits/chars */ | 407 | signed int precision:16; /* # of digits/chars */ |
407 | } __packed; | 408 | } __packed; |
409 | static_assert(sizeof(struct printf_spec) == 8); | ||
410 | |||
408 | #define FIELD_WIDTH_MAX ((1 << 23) - 1) | 411 | #define FIELD_WIDTH_MAX ((1 << 23) - 1) |
409 | #define PRECISION_MAX ((1 << 15) - 1) | 412 | #define PRECISION_MAX ((1 << 15) - 1) |
410 | 413 | ||
@@ -422,8 +425,6 @@ char *number(char *buf, char *end, unsigned long long num, | |||
422 | int field_width = spec.field_width; | 425 | int field_width = spec.field_width; |
423 | int precision = spec.precision; | 426 | int precision = spec.precision; |
424 | 427 | ||
425 | BUILD_BUG_ON(sizeof(struct printf_spec) != 8); | ||
426 | |||
427 | /* locase = 0 or 0x20. ORing digits or letters with 'locase' | 428 | /* locase = 0 or 0x20. ORing digits or letters with 'locase' |
428 | * produces same digits or (maybe lowercased) letters */ | 429 | * produces same digits or (maybe lowercased) letters */ |
429 | locase = (spec.flags & SMALL); | 430 | locase = (spec.flags & SMALL); |
diff --git a/samples/mic/mpssd/mpssd.h b/samples/mic/mpssd/mpssd.h index 8bd64944aacc..82d3b519f0e7 100644 --- a/samples/mic/mpssd/mpssd.h +++ b/samples/mic/mpssd/mpssd.h | |||
@@ -37,21 +37,18 @@ | |||
37 | #include <sys/types.h> | 37 | #include <sys/types.h> |
38 | #include <sys/socket.h> | 38 | #include <sys/socket.h> |
39 | #include <sys/stat.h> | 39 | #include <sys/stat.h> |
40 | #include <sys/types.h> | ||
41 | #include <sys/mman.h> | 40 | #include <sys/mman.h> |
42 | #include <sys/utsname.h> | 41 | #include <sys/utsname.h> |
43 | #include <sys/wait.h> | 42 | #include <sys/wait.h> |
44 | #include <netinet/in.h> | 43 | #include <netinet/in.h> |
45 | #include <arpa/inet.h> | 44 | #include <arpa/inet.h> |
46 | #include <netdb.h> | 45 | #include <netdb.h> |
47 | #include <pthread.h> | ||
48 | #include <signal.h> | 46 | #include <signal.h> |
49 | #include <limits.h> | 47 | #include <limits.h> |
50 | #include <syslog.h> | 48 | #include <syslog.h> |
51 | #include <getopt.h> | 49 | #include <getopt.h> |
52 | #include <net/if.h> | 50 | #include <net/if.h> |
53 | #include <linux/if_tun.h> | 51 | #include <linux/if_tun.h> |
54 | #include <linux/if_tun.h> | ||
55 | #include <linux/virtio_ids.h> | 52 | #include <linux/virtio_ids.h> |
56 | 53 | ||
57 | #define MICSYSFSDIR "/sys/class/mic" | 54 | #define MICSYSFSDIR "/sys/class/mic" |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b737ca9d7204..8d8d26b5cbbd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -61,7 +61,7 @@ my $codespellfile = "/usr/share/codespell/dictionary.txt"; | |||
61 | my $conststructsfile = "$D/const_structs.checkpatch"; | 61 | my $conststructsfile = "$D/const_structs.checkpatch"; |
62 | my $typedefsfile = ""; | 62 | my $typedefsfile = ""; |
63 | my $color = "auto"; | 63 | my $color = "auto"; |
64 | my $allow_c99_comments = 1; | 64 | my $allow_c99_comments = 1; # Can be overridden by --ignore C99_COMMENT_TOLERANCE |
65 | 65 | ||
66 | sub help { | 66 | sub help { |
67 | my ($exitcode) = @_; | 67 | my ($exitcode) = @_; |
@@ -466,6 +466,16 @@ our $logFunctions = qr{(?x: | |||
466 | seq_vprintf|seq_printf|seq_puts | 466 | seq_vprintf|seq_printf|seq_puts |
467 | )}; | 467 | )}; |
468 | 468 | ||
469 | our $allocFunctions = qr{(?x: | ||
470 | (?:(?:devm_)? | ||
471 | (?:kv|k|v)[czm]alloc(?:_node|_array)? | | ||
472 | kstrdup(?:_const)? | | ||
473 | kmemdup(?:_nul)?) | | ||
474 | (?:\w+)?alloc_skb(?:ip_align)? | | ||
475 | # dev_alloc_skb/netdev_alloc_skb, et al | ||
476 | dma_alloc_coherent | ||
477 | )}; | ||
478 | |||
469 | our $signature_tags = qr{(?xi: | 479 | our $signature_tags = qr{(?xi: |
470 | Signed-off-by:| | 480 | Signed-off-by:| |
471 | Co-developed-by:| | 481 | Co-developed-by:| |
@@ -1011,6 +1021,7 @@ if ($git) { | |||
1011 | } | 1021 | } |
1012 | 1022 | ||
1013 | my $vname; | 1023 | my $vname; |
1024 | $allow_c99_comments = !defined $ignore_type{"C99_COMMENT_TOLERANCE"}; | ||
1014 | for my $filename (@ARGV) { | 1025 | for my $filename (@ARGV) { |
1015 | my $FILE; | 1026 | my $FILE; |
1016 | if ($git) { | 1027 | if ($git) { |
@@ -3037,6 +3048,14 @@ sub process { | |||
3037 | $comment = '..'; | 3048 | $comment = '..'; |
3038 | } | 3049 | } |
3039 | 3050 | ||
3051 | # check SPDX comment style for .[chsS] files | ||
3052 | if ($realfile =~ /\.[chsS]$/ && | ||
3053 | $rawline =~ /SPDX-License-Identifier:/ && | ||
3054 | $rawline !~ /^\+\s*\Q$comment\E\s*/) { | ||
3055 | WARN("SPDX_LICENSE_TAG", | ||
3056 | "Improper SPDX comment style for '$realfile', please use '$comment' instead\n" . $herecurr); | ||
3057 | } | ||
3058 | |||
3040 | if ($comment !~ /^$/ && | 3059 | if ($comment !~ /^$/ && |
3041 | $rawline !~ /^\+\Q$comment\E SPDX-License-Identifier: /) { | 3060 | $rawline !~ /^\+\Q$comment\E SPDX-License-Identifier: /) { |
3042 | WARN("SPDX_LICENSE_TAG", | 3061 | WARN("SPDX_LICENSE_TAG", |
@@ -3054,6 +3073,14 @@ sub process { | |||
3054 | # check we are in a valid source file if not then ignore this hunk | 3073 | # check we are in a valid source file if not then ignore this hunk |
3055 | next if ($realfile !~ /\.(h|c|s|S|sh|dtsi|dts)$/); | 3074 | next if ($realfile !~ /\.(h|c|s|S|sh|dtsi|dts)$/); |
3056 | 3075 | ||
3076 | # check for using SPDX-License-Identifier on the wrong line number | ||
3077 | if ($realline != $checklicenseline && | ||
3078 | $rawline =~ /\bSPDX-License-Identifier:/ && | ||
3079 | substr($line, @-, @+ - @-) eq "$;" x (@+ - @-)) { | ||
3080 | WARN("SPDX_LICENSE_TAG", | ||
3081 | "Misplaced SPDX-License-Identifier tag - use line $checklicenseline instead\n" . $herecurr); | ||
3082 | } | ||
3083 | |||
3057 | # line length limit (with some exclusions) | 3084 | # line length limit (with some exclusions) |
3058 | # | 3085 | # |
3059 | # There are a few types of lines that may extend beyond $max_line_length: | 3086 | # There are a few types of lines that may extend beyond $max_line_length: |
@@ -5545,7 +5572,8 @@ sub process { | |||
5545 | my ($s, $c) = ctx_statement_block($linenr - 3, $realcnt, 0); | 5572 | my ($s, $c) = ctx_statement_block($linenr - 3, $realcnt, 0); |
5546 | # print("line: <$line>\nprevline: <$prevline>\ns: <$s>\nc: <$c>\n\n\n"); | 5573 | # print("line: <$line>\nprevline: <$prevline>\ns: <$s>\nc: <$c>\n\n\n"); |
5547 | 5574 | ||
5548 | if ($s =~ /(?:^|\n)[ \+]\s*(?:$Type\s*)?\Q$testval\E\s*=\s*(?:\([^\)]*\)\s*)?\s*(?:devm_)?(?:[kv][czm]alloc(?:_node|_array)?\b|kstrdup|kmemdup|(?:dev_)?alloc_skb)/) { | 5575 | if ($s =~ /(?:^|\n)[ \+]\s*(?:$Type\s*)?\Q$testval\E\s*=\s*(?:\([^\)]*\)\s*)?\s*$allocFunctions\s*\(/ && |
5576 | $s !~ /\b__GFP_NOWARN\b/ ) { | ||
5549 | WARN("OOM_MESSAGE", | 5577 | WARN("OOM_MESSAGE", |
5550 | "Possible unnecessary 'out of memory' message\n" . $hereprev); | 5578 | "Possible unnecessary 'out of memory' message\n" . $hereprev); |
5551 | } | 5579 | } |
@@ -6196,8 +6224,8 @@ sub process { | |||
6196 | } | 6224 | } |
6197 | } | 6225 | } |
6198 | 6226 | ||
6199 | # check for pointless casting of kmalloc return | 6227 | # check for pointless casting of alloc functions |
6200 | if ($line =~ /\*\s*\)\s*[kv][czm]alloc(_node){0,1}\b/) { | 6228 | if ($line =~ /\*\s*\)\s*$allocFunctions\b/) { |
6201 | WARN("UNNECESSARY_CASTS", | 6229 | WARN("UNNECESSARY_CASTS", |
6202 | "unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr); | 6230 | "unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr); |
6203 | } | 6231 | } |
@@ -6205,7 +6233,7 @@ sub process { | |||
6205 | # alloc style | 6233 | # alloc style |
6206 | # p = alloc(sizeof(struct foo), ...) should be p = alloc(sizeof(*p), ...) | 6234 | # p = alloc(sizeof(struct foo), ...) should be p = alloc(sizeof(*p), ...) |
6207 | if ($perl_version_ok && | 6235 | if ($perl_version_ok && |
6208 | $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*([kv][mz]alloc(?:_node)?)\s*\(\s*(sizeof\s*\(\s*struct\s+$Lval\s*\))/) { | 6236 | $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k|v)[mz]alloc(?:_node)?)\s*\(\s*(sizeof\s*\(\s*struct\s+$Lval\s*\))/) { |
6209 | CHK("ALLOC_SIZEOF_STRUCT", | 6237 | CHK("ALLOC_SIZEOF_STRUCT", |
6210 | "Prefer $3(sizeof(*$1)...) over $3($4...)\n" . $herecurr); | 6238 | "Prefer $3(sizeof(*$1)...) over $3($4...)\n" . $herecurr); |
6211 | } | 6239 | } |
diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in index 7aad82406422..d3319a80788a 100644 --- a/scripts/gdb/linux/constants.py.in +++ b/scripts/gdb/linux/constants.py.in | |||
@@ -37,12 +37,12 @@ | |||
37 | import gdb | 37 | import gdb |
38 | 38 | ||
39 | /* linux/fs.h */ | 39 | /* linux/fs.h */ |
40 | LX_VALUE(MS_RDONLY) | 40 | LX_VALUE(SB_RDONLY) |
41 | LX_VALUE(MS_SYNCHRONOUS) | 41 | LX_VALUE(SB_SYNCHRONOUS) |
42 | LX_VALUE(MS_MANDLOCK) | 42 | LX_VALUE(SB_MANDLOCK) |
43 | LX_VALUE(MS_DIRSYNC) | 43 | LX_VALUE(SB_DIRSYNC) |
44 | LX_VALUE(MS_NOATIME) | 44 | LX_VALUE(SB_NOATIME) |
45 | LX_VALUE(MS_NODIRATIME) | 45 | LX_VALUE(SB_NODIRATIME) |
46 | 46 | ||
47 | /* linux/mount.h */ | 47 | /* linux/mount.h */ |
48 | LX_VALUE(MNT_NOSUID) | 48 | LX_VALUE(MNT_NOSUID) |
diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 0aebd7565b03..2f01a958eb22 100644 --- a/scripts/gdb/linux/proc.py +++ b/scripts/gdb/linux/proc.py | |||
@@ -114,11 +114,11 @@ def info_opts(lst, opt): | |||
114 | return opts | 114 | return opts |
115 | 115 | ||
116 | 116 | ||
117 | FS_INFO = {constants.LX_MS_SYNCHRONOUS: ",sync", | 117 | FS_INFO = {constants.LX_SB_SYNCHRONOUS: ",sync", |
118 | constants.LX_MS_MANDLOCK: ",mand", | 118 | constants.LX_SB_MANDLOCK: ",mand", |
119 | constants.LX_MS_DIRSYNC: ",dirsync", | 119 | constants.LX_SB_DIRSYNC: ",dirsync", |
120 | constants.LX_MS_NOATIME: ",noatime", | 120 | constants.LX_SB_NOATIME: ",noatime", |
121 | constants.LX_MS_NODIRATIME: ",nodiratime"} | 121 | constants.LX_SB_NODIRATIME: ",nodiratime"} |
122 | 122 | ||
123 | MNT_INFO = {constants.LX_MNT_NOSUID: ",nosuid", | 123 | MNT_INFO = {constants.LX_MNT_NOSUID: ",nosuid", |
124 | constants.LX_MNT_NODEV: ",nodev", | 124 | constants.LX_MNT_NODEV: ",nodev", |
@@ -184,7 +184,7 @@ values of that process namespace""" | |||
184 | fstype = superblock['s_type']['name'].string() | 184 | fstype = superblock['s_type']['name'].string() |
185 | s_flags = int(superblock['s_flags']) | 185 | s_flags = int(superblock['s_flags']) |
186 | m_flags = int(vfs['mnt']['mnt_flags']) | 186 | m_flags = int(vfs['mnt']['mnt_flags']) |
187 | rd = "ro" if (s_flags & constants.LX_MS_RDONLY) else "rw" | 187 | rd = "ro" if (s_flags & constants.LX_SB_RDONLY) else "rw" |
188 | 188 | ||
189 | gdb.write( | 189 | gdb.write( |
190 | "{} {} {} {}{}{} 0 0\n" | 190 | "{} {} {} {}{}{} 0 0\n" |
diff --git a/scripts/spelling.txt b/scripts/spelling.txt index 517d0c3f83df..86b87332b9e5 100644 --- a/scripts/spelling.txt +++ b/scripts/spelling.txt | |||
@@ -10,6 +10,8 @@ | |||
10 | abandonning||abandoning | 10 | abandonning||abandoning |
11 | abigious||ambiguous | 11 | abigious||ambiguous |
12 | abitrate||arbitrate | 12 | abitrate||arbitrate |
13 | abnornally||abnormally | ||
14 | abnrormal||abnormal | ||
13 | abord||abort | 15 | abord||abort |
14 | aboslute||absolute | 16 | aboslute||absolute |
15 | abov||above | 17 | abov||above |
@@ -107,6 +109,7 @@ ambigious||ambiguous | |||
107 | amoung||among | 109 | amoung||among |
108 | amout||amount | 110 | amout||amount |
109 | amplifer||amplifier | 111 | amplifer||amplifier |
112 | amplifyer||amplifier | ||
110 | an union||a union | 113 | an union||a union |
111 | an user||a user | 114 | an user||a user |
112 | an userspace||a userspace | 115 | an userspace||a userspace |
@@ -145,6 +148,7 @@ artillary||artillery | |||
145 | asign||assign | 148 | asign||assign |
146 | asser||assert | 149 | asser||assert |
147 | assertation||assertion | 150 | assertation||assertion |
151 | assertting||asserting | ||
148 | assiged||assigned | 152 | assiged||assigned |
149 | assigment||assignment | 153 | assigment||assignment |
150 | assigments||assignments | 154 | assigments||assignments |
@@ -168,6 +172,8 @@ attachement||attachment | |||
168 | attched||attached | 172 | attched||attached |
169 | attemps||attempts | 173 | attemps||attempts |
170 | attemping||attempting | 174 | attemping||attempting |
175 | attepmpt||attempt | ||
176 | attnetion||attention | ||
171 | attruibutes||attributes | 177 | attruibutes||attributes |
172 | authentification||authentication | 178 | authentification||authentication |
173 | automaticaly||automatically | 179 | automaticaly||automatically |
@@ -217,6 +223,7 @@ boardcast||broadcast | |||
217 | borad||board | 223 | borad||board |
218 | boundry||boundary | 224 | boundry||boundary |
219 | brievely||briefly | 225 | brievely||briefly |
226 | broadcase||broadcast | ||
220 | broadcat||broadcast | 227 | broadcat||broadcast |
221 | bufufer||buffer | 228 | bufufer||buffer |
222 | cacluated||calculated | 229 | cacluated||calculated |
@@ -234,6 +241,7 @@ cancle||cancel | |||
234 | capabilites||capabilities | 241 | capabilites||capabilities |
235 | capabilty||capability | 242 | capabilty||capability |
236 | capabitilies||capabilities | 243 | capabitilies||capabilities |
244 | capablity||capability | ||
237 | capatibilities||capabilities | 245 | capatibilities||capabilities |
238 | capapbilities||capabilities | 246 | capapbilities||capabilities |
239 | caputure||capture | 247 | caputure||capture |
@@ -274,6 +282,7 @@ clared||cleared | |||
274 | closeing||closing | 282 | closeing||closing |
275 | clustred||clustered | 283 | clustred||clustered |
276 | coexistance||coexistence | 284 | coexistance||coexistence |
285 | colescing||coalescing | ||
277 | collapsable||collapsible | 286 | collapsable||collapsible |
278 | colorfull||colorful | 287 | colorfull||colorful |
279 | comand||command | 288 | comand||command |
@@ -290,6 +299,7 @@ comsumer||consumer | |||
290 | comsuming||consuming | 299 | comsuming||consuming |
291 | compability||compatibility | 300 | compability||compatibility |
292 | compaibility||compatibility | 301 | compaibility||compatibility |
302 | comparsion||comparison | ||
293 | compatability||compatibility | 303 | compatability||compatibility |
294 | compatable||compatible | 304 | compatable||compatible |
295 | compatibiliy||compatibility | 305 | compatibiliy||compatibility |
@@ -303,6 +313,7 @@ completly||completely | |||
303 | complient||compliant | 313 | complient||compliant |
304 | componnents||components | 314 | componnents||components |
305 | compoment||component | 315 | compoment||component |
316 | comppatible||compatible | ||
306 | compres||compress | 317 | compres||compress |
307 | compresion||compression | 318 | compresion||compression |
308 | comression||compression | 319 | comression||compression |
@@ -368,6 +379,8 @@ decsribed||described | |||
368 | decription||description | 379 | decription||description |
369 | dectected||detected | 380 | dectected||detected |
370 | defailt||default | 381 | defailt||default |
382 | deferal||deferral | ||
383 | deffered||deferred | ||
371 | defferred||deferred | 384 | defferred||deferred |
372 | definate||definite | 385 | definate||definite |
373 | definately||definitely | 386 | definately||definitely |
@@ -400,6 +413,7 @@ descritptor||descriptor | |||
400 | desctiptor||descriptor | 413 | desctiptor||descriptor |
401 | desriptor||descriptor | 414 | desriptor||descriptor |
402 | desriptors||descriptors | 415 | desriptors||descriptors |
416 | desination||destination | ||
403 | destionation||destination | 417 | destionation||destination |
404 | destoried||destroyed | 418 | destoried||destroyed |
405 | destory||destroy | 419 | destory||destroy |
@@ -426,7 +440,9 @@ diffrent||different | |||
426 | differenciate||differentiate | 440 | differenciate||differentiate |
427 | diffrentiate||differentiate | 441 | diffrentiate||differentiate |
428 | difinition||definition | 442 | difinition||definition |
443 | dimention||dimension | ||
429 | dimesions||dimensions | 444 | dimesions||dimensions |
445 | dispalying||displaying | ||
430 | diplay||display | 446 | diplay||display |
431 | directon||direction | 447 | directon||direction |
432 | direectly||directly | 448 | direectly||directly |
@@ -442,6 +458,7 @@ disbled||disabled | |||
442 | disconnet||disconnect | 458 | disconnet||disconnect |
443 | discontinous||discontinuous | 459 | discontinous||discontinuous |
444 | disharge||discharge | 460 | disharge||discharge |
461 | disnabled||disabled | ||
445 | dispertion||dispersion | 462 | dispertion||dispersion |
446 | dissapears||disappears | 463 | dissapears||disappears |
447 | distiction||distinction | 464 | distiction||distinction |
@@ -456,6 +473,7 @@ dorp||drop | |||
456 | dosen||doesn | 473 | dosen||doesn |
457 | downlad||download | 474 | downlad||download |
458 | downlads||downloads | 475 | downlads||downloads |
476 | droped||dropped | ||
459 | druing||during | 477 | druing||during |
460 | dynmaic||dynamic | 478 | dynmaic||dynamic |
461 | eanable||enable | 479 | eanable||enable |
@@ -471,6 +489,7 @@ elementry||elementary | |||
471 | eletronic||electronic | 489 | eletronic||electronic |
472 | embeded||embedded | 490 | embeded||embedded |
473 | enabledi||enabled | 491 | enabledi||enabled |
492 | enble||enable | ||
474 | enchanced||enhanced | 493 | enchanced||enhanced |
475 | encorporating||incorporating | 494 | encorporating||incorporating |
476 | encrupted||encrypted | 495 | encrupted||encrypted |
@@ -479,6 +498,9 @@ encryptio||encryption | |||
479 | endianess||endianness | 498 | endianess||endianness |
480 | enhaced||enhanced | 499 | enhaced||enhanced |
481 | enlightnment||enlightenment | 500 | enlightnment||enlightenment |
501 | enqueing||enqueuing | ||
502 | entires||entries | ||
503 | entites||entities | ||
482 | entrys||entries | 504 | entrys||entries |
483 | enocded||encoded | 505 | enocded||encoded |
484 | enterily||entirely | 506 | enterily||entirely |
@@ -498,6 +520,8 @@ etsbalishment||establishment | |||
498 | excecutable||executable | 520 | excecutable||executable |
499 | exceded||exceeded | 521 | exceded||exceeded |
500 | excellant||excellent | 522 | excellant||excellent |
523 | execeeded||exceeded | ||
524 | execeeds||exceeds | ||
501 | exeed||exceed | 525 | exeed||exceed |
502 | existance||existence | 526 | existance||existence |
503 | existant||existent | 527 | existant||existent |
@@ -506,6 +530,7 @@ exlcude||exclude | |||
506 | exlcusive||exclusive | 530 | exlcusive||exclusive |
507 | exmaple||example | 531 | exmaple||example |
508 | expecially||especially | 532 | expecially||especially |
533 | experies||expires | ||
509 | explicite||explicit | 534 | explicite||explicit |
510 | explicitely||explicitly | 535 | explicitely||explicitly |
511 | explict||explicit | 536 | explict||explicit |
@@ -521,6 +546,7 @@ extracter||extractor | |||
521 | faield||failed | 546 | faield||failed |
522 | falied||failed | 547 | falied||failed |
523 | faild||failed | 548 | faild||failed |
549 | failded||failed | ||
524 | failer||failure | 550 | failer||failure |
525 | faill||fail | 551 | faill||fail |
526 | failied||failed | 552 | failied||failed |
@@ -540,6 +566,7 @@ fetaure||feature | |||
540 | fetaures||features | 566 | fetaures||features |
541 | fileystem||filesystem | 567 | fileystem||filesystem |
542 | fimware||firmware | 568 | fimware||firmware |
569 | firmare||firmware | ||
543 | firware||firmware | 570 | firware||firmware |
544 | finanize||finalize | 571 | finanize||finalize |
545 | findn||find | 572 | findn||find |
@@ -574,6 +601,7 @@ funtions||functions | |||
574 | furthur||further | 601 | furthur||further |
575 | futhermore||furthermore | 602 | futhermore||furthermore |
576 | futrue||future | 603 | futrue||future |
604 | gauage||gauge | ||
577 | gaurenteed||guaranteed | 605 | gaurenteed||guaranteed |
578 | generiously||generously | 606 | generiously||generously |
579 | genereate||generate | 607 | genereate||generate |
@@ -645,6 +673,7 @@ independed||independent | |||
645 | indiate||indicate | 673 | indiate||indicate |
646 | indicat||indicate | 674 | indicat||indicate |
647 | inexpect||inexpected | 675 | inexpect||inexpected |
676 | inferface||interface | ||
648 | infomation||information | 677 | infomation||information |
649 | informatiom||information | 678 | informatiom||information |
650 | informations||information | 679 | informations||information |
@@ -662,14 +691,17 @@ initialiazation||initialization | |||
662 | initializiation||initialization | 691 | initializiation||initialization |
663 | initialze||initialize | 692 | initialze||initialize |
664 | initialzed||initialized | 693 | initialzed||initialized |
694 | initialzing||initializing | ||
665 | initilization||initialization | 695 | initilization||initialization |
666 | initilize||initialize | 696 | initilize||initialize |
667 | inofficial||unofficial | 697 | inofficial||unofficial |
668 | inrerface||interface | 698 | inrerface||interface |
669 | insititute||institute | 699 | insititute||institute |
700 | instace||instance | ||
670 | instal||install | 701 | instal||install |
671 | instanciate||instantiate | 702 | instanciate||instantiate |
672 | instanciated||instantiated | 703 | instanciated||instantiated |
704 | insufficent||insufficient | ||
673 | inteface||interface | 705 | inteface||interface |
674 | integreated||integrated | 706 | integreated||integrated |
675 | integrety||integrity | 707 | integrety||integrity |
@@ -684,6 +716,8 @@ intermittant||intermittent | |||
684 | internel||internal | 716 | internel||internal |
685 | interoprability||interoperability | 717 | interoprability||interoperability |
686 | interuupt||interrupt | 718 | interuupt||interrupt |
719 | interupt||interrupt | ||
720 | interupts||interrupts | ||
687 | interrface||interface | 721 | interrface||interface |
688 | interrrupt||interrupt | 722 | interrrupt||interrupt |
689 | interrup||interrupt | 723 | interrup||interrupt |
@@ -699,11 +733,14 @@ intialization||initialization | |||
699 | intialized||initialized | 733 | intialized||initialized |
700 | intialize||initialize | 734 | intialize||initialize |
701 | intregral||integral | 735 | intregral||integral |
736 | intrerrupt||interrupt | ||
702 | intrrupt||interrupt | 737 | intrrupt||interrupt |
703 | intterrupt||interrupt | 738 | intterrupt||interrupt |
704 | intuative||intuitive | 739 | intuative||intuitive |
705 | inavlid||invalid | 740 | inavlid||invalid |
706 | invaid||invalid | 741 | invaid||invalid |
742 | invaild||invalid | ||
743 | invailid||invalid | ||
707 | invald||invalid | 744 | invald||invalid |
708 | invalde||invalid | 745 | invalde||invalid |
709 | invalide||invalid | 746 | invalide||invalid |
@@ -712,6 +749,7 @@ invalud||invalid | |||
712 | invididual||individual | 749 | invididual||individual |
713 | invokation||invocation | 750 | invokation||invocation |
714 | invokations||invocations | 751 | invokations||invocations |
752 | ireelevant||irrelevant | ||
715 | irrelevent||irrelevant | 753 | irrelevent||irrelevant |
716 | isnt||isn't | 754 | isnt||isn't |
717 | isssue||issue | 755 | isssue||issue |
@@ -747,6 +785,7 @@ loobpack||loopback | |||
747 | loosing||losing | 785 | loosing||losing |
748 | losted||lost | 786 | losted||lost |
749 | machinary||machinery | 787 | machinary||machinery |
788 | maibox||mailbox | ||
750 | maintainance||maintenance | 789 | maintainance||maintenance |
751 | maintainence||maintenance | 790 | maintainence||maintenance |
752 | maintan||maintain | 791 | maintan||maintain |
@@ -758,14 +797,19 @@ managable||manageable | |||
758 | managment||management | 797 | managment||management |
759 | mangement||management | 798 | mangement||management |
760 | manoeuvering||maneuvering | 799 | manoeuvering||maneuvering |
800 | manufaucturing||manufacturing | ||
761 | mappping||mapping | 801 | mappping||mapping |
762 | matchs||matches | 802 | matchs||matches |
763 | mathimatical||mathematical | 803 | mathimatical||mathematical |
764 | mathimatic||mathematic | 804 | mathimatic||mathematic |
765 | mathimatics||mathematics | 805 | mathimatics||mathematics |
806 | maximium||maximum | ||
766 | maxium||maximum | 807 | maxium||maximum |
767 | mechamism||mechanism | 808 | mechamism||mechanism |
768 | meetign||meeting | 809 | meetign||meeting |
810 | memeory||memory | ||
811 | memmber||member | ||
812 | memoery||memory | ||
769 | ment||meant | 813 | ment||meant |
770 | mergable||mergeable | 814 | mergable||mergeable |
771 | mesage||message | 815 | mesage||message |
@@ -779,6 +823,7 @@ migrateable||migratable | |||
779 | milliseonds||milliseconds | 823 | milliseonds||milliseconds |
780 | minium||minimum | 824 | minium||minimum |
781 | minimam||minimum | 825 | minimam||minimum |
826 | miniumum||minimum | ||
782 | minumum||minimum | 827 | minumum||minimum |
783 | misalinged||misaligned | 828 | misalinged||misaligned |
784 | miscelleneous||miscellaneous | 829 | miscelleneous||miscellaneous |
@@ -839,6 +884,7 @@ occurence||occurrence | |||
839 | occure||occurred | 884 | occure||occurred |
840 | occured||occurred | 885 | occured||occurred |
841 | occuring||occurring | 886 | occuring||occurring |
887 | offser||offset | ||
842 | offet||offset | 888 | offet||offset |
843 | offloded||offloaded | 889 | offloded||offloaded |
844 | omited||omitted | 890 | omited||omitted |
@@ -855,6 +901,7 @@ optmizations||optimizations | |||
855 | orientatied||orientated | 901 | orientatied||orientated |
856 | orientied||oriented | 902 | orientied||oriented |
857 | orignal||original | 903 | orignal||original |
904 | originial||original | ||
858 | otherise||otherwise | 905 | otherise||otherwise |
859 | ouput||output | 906 | ouput||output |
860 | oustanding||outstanding | 907 | oustanding||outstanding |
@@ -874,6 +921,7 @@ packege||package | |||
874 | packge||package | 921 | packge||package |
875 | packtes||packets | 922 | packtes||packets |
876 | pakage||package | 923 | pakage||package |
924 | paket||packet | ||
877 | pallette||palette | 925 | pallette||palette |
878 | paln||plan | 926 | paln||plan |
879 | paramameters||parameters | 927 | paramameters||parameters |
@@ -886,6 +934,8 @@ paramters||parameters | |||
886 | parmaters||parameters | 934 | parmaters||parameters |
887 | particuarly||particularly | 935 | particuarly||particularly |
888 | particularily||particularly | 936 | particularily||particularly |
937 | partion||partition | ||
938 | partions||partitions | ||
889 | partiton||partition | 939 | partiton||partition |
890 | pased||passed | 940 | pased||passed |
891 | passin||passing | 941 | passin||passing |
@@ -897,10 +947,12 @@ peice||piece | |||
897 | pendantic||pedantic | 947 | pendantic||pedantic |
898 | peprocessor||preprocessor | 948 | peprocessor||preprocessor |
899 | perfoming||performing | 949 | perfoming||performing |
950 | peripherial||peripheral | ||
900 | permissons||permissions | 951 | permissons||permissions |
901 | peroid||period | 952 | peroid||period |
902 | persistance||persistence | 953 | persistance||persistence |
903 | persistant||persistent | 954 | persistant||persistent |
955 | phoneticly||phonetically | ||
904 | plalform||platform | 956 | plalform||platform |
905 | platfoem||platform | 957 | platfoem||platform |
906 | platfrom||platform | 958 | platfrom||platform |
@@ -915,6 +967,7 @@ posible||possible | |||
915 | positon||position | 967 | positon||position |
916 | possibilites||possibilities | 968 | possibilites||possibilities |
917 | powerfull||powerful | 969 | powerfull||powerful |
970 | pramater||parameter | ||
918 | preamle||preamble | 971 | preamle||preamble |
919 | preample||preamble | 972 | preample||preamble |
920 | preapre||prepare | 973 | preapre||prepare |
@@ -976,6 +1029,7 @@ psudo||pseudo | |||
976 | psuedo||pseudo | 1029 | psuedo||pseudo |
977 | psychadelic||psychedelic | 1030 | psychadelic||psychedelic |
978 | pwoer||power | 1031 | pwoer||power |
1032 | queing||queuing | ||
979 | quering||querying | 1033 | quering||querying |
980 | randomally||randomly | 1034 | randomally||randomly |
981 | raoming||roaming | 1035 | raoming||roaming |
@@ -1004,6 +1058,7 @@ refering||referring | |||
1004 | refernces||references | 1058 | refernces||references |
1005 | refernnce||reference | 1059 | refernnce||reference |
1006 | refrence||reference | 1060 | refrence||reference |
1061 | registed||registered | ||
1007 | registerd||registered | 1062 | registerd||registered |
1008 | registeration||registration | 1063 | registeration||registration |
1009 | registeresd||registered | 1064 | registeresd||registered |
@@ -1018,6 +1073,7 @@ regulamentations||regulations | |||
1018 | reigstration||registration | 1073 | reigstration||registration |
1019 | releated||related | 1074 | releated||related |
1020 | relevent||relevant | 1075 | relevent||relevant |
1076 | reloade||reload | ||
1021 | remoote||remote | 1077 | remoote||remote |
1022 | remore||remote | 1078 | remore||remote |
1023 | removeable||removable | 1079 | removeable||removable |
@@ -1036,19 +1092,23 @@ requried||required | |||
1036 | requst||request | 1092 | requst||request |
1037 | reregisteration||reregistration | 1093 | reregisteration||reregistration |
1038 | reseting||resetting | 1094 | reseting||resetting |
1095 | reseved||reserved | ||
1039 | reseverd||reserved | 1096 | reseverd||reserved |
1040 | resizeable||resizable | 1097 | resizeable||resizable |
1041 | resouce||resource | 1098 | resouce||resource |
1042 | resouces||resources | 1099 | resouces||resources |
1043 | resoures||resources | 1100 | resoures||resources |
1044 | responce||response | 1101 | responce||response |
1102 | resrouce||resource | ||
1045 | ressizes||resizes | 1103 | ressizes||resizes |
1046 | ressource||resource | 1104 | ressource||resource |
1047 | ressources||resources | 1105 | ressources||resources |
1048 | restesting||retesting | 1106 | restesting||retesting |
1107 | resumbmitting||resubmitting | ||
1049 | retransmited||retransmitted | 1108 | retransmited||retransmitted |
1050 | retreived||retrieved | 1109 | retreived||retrieved |
1051 | retreive||retrieve | 1110 | retreive||retrieve |
1111 | retreiving||retrieving | ||
1052 | retrive||retrieve | 1112 | retrive||retrieve |
1053 | retuned||returned | 1113 | retuned||returned |
1054 | reudce||reduce | 1114 | reudce||reduce |
@@ -1120,6 +1180,7 @@ sleeped||slept | |||
1120 | softwares||software | 1180 | softwares||software |
1121 | speach||speech | 1181 | speach||speech |
1122 | specfic||specific | 1182 | specfic||specific |
1183 | specfield||specified | ||
1123 | speciefied||specified | 1184 | speciefied||specified |
1124 | specifc||specific | 1185 | specifc||specific |
1125 | specifed||specified | 1186 | specifed||specified |
@@ -1142,7 +1203,10 @@ staion||station | |||
1142 | standardss||standards | 1203 | standardss||standards |
1143 | standartization||standardization | 1204 | standartization||standardization |
1144 | standart||standard | 1205 | standart||standard |
1206 | standy||standby | ||
1207 | stardard||standard | ||
1145 | staticly||statically | 1208 | staticly||statically |
1209 | statuss||status | ||
1146 | stoped||stopped | 1210 | stoped||stopped |
1147 | stoping||stopping | 1211 | stoping||stopping |
1148 | stoppped||stopped | 1212 | stoppped||stopped |
@@ -1227,12 +1291,14 @@ tipically||typically | |||
1227 | timeing||timing | 1291 | timeing||timing |
1228 | timout||timeout | 1292 | timout||timeout |
1229 | tmis||this | 1293 | tmis||this |
1294 | toogle||toggle | ||
1230 | torerable||tolerable | 1295 | torerable||tolerable |
1231 | traking||tracking | 1296 | traking||tracking |
1232 | tramsmitted||transmitted | 1297 | tramsmitted||transmitted |
1233 | tramsmit||transmit | 1298 | tramsmit||transmit |
1234 | tranasction||transaction | 1299 | tranasction||transaction |
1235 | tranfer||transfer | 1300 | tranfer||transfer |
1301 | transcevier||transceiver | ||
1236 | transciever||transceiver | 1302 | transciever||transceiver |
1237 | transferd||transferred | 1303 | transferd||transferred |
1238 | transfered||transferred | 1304 | transfered||transferred |
@@ -1267,6 +1333,7 @@ unfortunatelly||unfortunately | |||
1267 | unifiy||unify | 1333 | unifiy||unify |
1268 | uniterrupted||uninterrupted | 1334 | uniterrupted||uninterrupted |
1269 | unintialized||uninitialized | 1335 | unintialized||uninitialized |
1336 | unitialized||uninitialized | ||
1270 | unkmown||unknown | 1337 | unkmown||unknown |
1271 | unknonw||unknown | 1338 | unknonw||unknown |
1272 | unknow||unknown | 1339 | unknow||unknown |
@@ -1291,7 +1358,9 @@ unsuccessfull||unsuccessful | |||
1291 | unsuported||unsupported | 1358 | unsuported||unsupported |
1292 | untill||until | 1359 | untill||until |
1293 | unuseful||useless | 1360 | unuseful||useless |
1361 | unvalid||invalid | ||
1294 | upate||update | 1362 | upate||update |
1363 | upsupported||unsupported | ||
1295 | usefule||useful | 1364 | usefule||useful |
1296 | usefull||useful | 1365 | usefull||useful |
1297 | usege||usage | 1366 | usege||usage |