Skip to content

Commit 7856a56

Browse files
committed
Merge tag 'mm-nonmm-stable-2024-09-21-07-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM updates from Andrew Morton: "Many singleton patches - please see the various changelogs for details. Quite a lot of nilfs2 work this time around. Notable patch series in this pull request are: - "mul_u64_u64_div_u64: new implementation" by Nicolas Pitre, with assistance from Uwe Kleine-König. Reimplement mul_u64_u64_div_u64() to provide (much) more accurate results. The current implementation was causing Uwe some issues in the PWM drivers. - "xz: Updates to license, filters, and compression options" from Lasse Collin. Miscellaneous maintenance and kinor feature work to the xz decompressor. - "Fix some GDB command error and add some GDB commands" from Kuan-Ying Lee. Fixes and enhancements to the gdb scripts. - "treewide: add missing MODULE_DESCRIPTION() macros" from Jeff Johnson. Adds lots of MODULE_DESCRIPTIONs, thus fixing lots of warnings about this. - "nilfs2: add support for some common ioctls" from Ryusuke Konishi. Adds various commonly-available ioctls to nilfs2. - "This series fixes a number of formatting issues in kernel doc comments" from Ryusuke Konishi does that. - "nilfs2: prevent unexpected ENOENT propagation" from Ryusuke Konishi. Fix issues where -ENOENT was being unintentionally and inappropriately returned to userspace. - "nilfs2: assorted cleanups" from Huang Xiaojia. - "nilfs2: fix potential issues with empty b-tree nodes" from Ryusuke Konishi fixes some issues which can occur on corrupted nilfs2 filesystems. - "scripts/decode_stacktrace.sh: improve error reporting and usability" from Luca Ceresoli does those things" * tag 'mm-nonmm-stable-2024-09-21-07-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (103 commits) list: test: increase coverage of list_test_list_replace*() list: test: fix tests for list_cut_position() proc: use __auto_type more treewide: correct the typo 'retun' ocfs2: cleanup return value and mlog in ocfs2_global_read_info() nilfs2: remove duplicate 'unlikely()' usage nilfs2: fix potential oob read in nilfs_btree_check_delete() nilfs2: determine empty node blocks as corrupted nilfs2: fix potential null-ptr-deref in nilfs_btree_insert() user_namespace: use kmemdup_array() instead of kmemdup() for multiple allocation tools/mm: rm thp_swap_allocator_test when make clean squashfs: fix percpu address space issues in decompressor_multi_percpu.c lib: glob.c: added null check for character class nilfs2: refactor nilfs_segctor_thread() nilfs2: use kthread_create and kthread_stop for the log writer thread nilfs2: remove sc_timer_task nilfs2: do not repair reserved inode bitmap in nilfs_new_inode() nilfs2: eliminate the shared counter and spinlock for i_generation nilfs2: separate inode type information from i_state field nilfs2: use the BITS_PER_LONG macro ...
2 parents 617a814 + 5e06e08 commit 7856a56

File tree

123 files changed

+1682
-858
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1682
-858
lines changed

Documentation/ABI/testing/sysfs-devices-memory

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ What: /sys/devices/system/memory/crash_hotplug
115115
Date: Aug 2023
116116
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
117117
Description:
118-
(RO) indicates whether or not the kernel directly supports
119-
modifying the crash elfcorehdr for memory hot un/plug and/or
120-
on/offline changes.
118+
(RO) indicates whether or not the kernel updates relevant kexec
119+
segments on memory hot un/plug and/or on/offline events, avoiding the
120+
need to reload kdump kernel.

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,9 +704,9 @@ What: /sys/devices/system/cpu/crash_hotplug
704704
Date: Aug 2023
705705
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
706706
Description:
707-
(RO) indicates whether or not the kernel directly supports
708-
modifying the crash elfcorehdr for CPU hot un/plug and/or
709-
on/offline changes.
707+
(RO) indicates whether or not the kernel updates relevant kexec
708+
segments on memory hot un/plug and/or on/offline events, avoiding the
709+
need to reload kdump kernel.
710710

711711
What: /sys/devices/system/cpu/enabled
712712
Date: Nov 2022

Documentation/admin-guide/mm/memory-hotplug.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,9 @@ The following files are currently defined:
294294
``crash_hotplug`` read-only: when changes to the system memory map
295295
occur due to hot un/plug of memory, this file contains
296296
'1' if the kernel updates the kdump capture kernel memory
297-
map itself (via elfcorehdr), or '0' if userspace must update
298-
the kdump capture kernel memory map.
297+
map itself (via elfcorehdr and other relevant kexec
298+
segments), or '0' if userspace must update the kdump
299+
capture kernel memory map.
299300

300301
Availability depends on the CONFIG_MEMORY_HOTPLUG kernel
301302
configuration option.

Documentation/core-api/cpu_hotplug.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,9 @@ can process the event further.
737737

738738
When changes to the CPUs in the system occur, the sysfs file
739739
/sys/devices/system/cpu/crash_hotplug contains '1' if the kernel
740-
updates the kdump capture kernel list of CPUs itself (via elfcorehdr),
741-
or '0' if userspace must update the kdump capture kernel list of CPUs.
740+
updates the kdump capture kernel list of CPUs itself (via elfcorehdr and
741+
other relevant kexec segment), or '0' if userspace must update the kdump
742+
capture kernel list of CPUs.
742743

743744
The availability depends on the CONFIG_HOTPLUG_CPU kernel configuration
744745
option.
@@ -750,8 +751,9 @@ file can be used in a udev rule as follows:
750751
SUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end"
751752

752753
For a CPU hot un/plug event, if the architecture supports kernel updates
753-
of the elfcorehdr (which contains the list of CPUs), then the rule skips
754-
the unload-then-reload of the kdump capture kernel.
754+
of the elfcorehdr (which contains the list of CPUs) and other relevant
755+
kexec segments, then the rule skips the unload-then-reload of the kdump
756+
capture kernel.
755757

756758
Kernel Inline Documentations Reference
757759
======================================

Documentation/staging/xz.rst

Lines changed: 64 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. SPDX-License-Identifier: 0BSD
2+
13
============================
24
XZ data compression in Linux
35
============================
@@ -6,62 +8,55 @@ Introduction
68
============
79

810
XZ is a general purpose data compression format with high compression
9-
ratio and relatively fast decompression. The primary compression
10-
algorithm (filter) is LZMA2. Additional filters can be used to improve
11-
compression ratio even further. E.g. Branch/Call/Jump (BCJ) filters
12-
improve compression ratio of executable data.
13-
14-
The XZ decompressor in Linux is called XZ Embedded. It supports
15-
the LZMA2 filter and optionally also BCJ filters. CRC32 is supported
16-
for integrity checking. The home page of XZ Embedded is at
17-
<https://tukaani.org/xz/embedded.html>, where you can find the
18-
latest version and also information about using the code outside
19-
the Linux kernel.
20-
21-
For userspace, XZ Utils provide a zlib-like compression library
22-
and a gzip-like command line tool. XZ Utils can be downloaded from
23-
<https://tukaani.org/xz/>.
11+
ratio. The XZ decompressor in Linux is called XZ Embedded. It supports
12+
the LZMA2 filter and optionally also Branch/Call/Jump (BCJ) filters
13+
for executable code. CRC32 is supported for integrity checking.
14+
15+
See the `XZ Embedded`_ home page for the latest version which includes
16+
a few optional extra features that aren't required in the Linux kernel
17+
and information about using the code outside the Linux kernel.
18+
19+
For userspace, `XZ Utils`_ provide a zlib-like compression library
20+
and a gzip-like command line tool.
21+
22+
.. _XZ Embedded: https://tukaani.org/xz/embedded.html
23+
.. _XZ Utils: https://tukaani.org/xz/
2424

2525
XZ related components in the kernel
2626
===================================
2727

2828
The xz_dec module provides XZ decompressor with single-call (buffer
29-
to buffer) and multi-call (stateful) APIs. The usage of the xz_dec
30-
module is documented in include/linux/xz.h.
31-
32-
The xz_dec_test module is for testing xz_dec. xz_dec_test is not
33-
useful unless you are hacking the XZ decompressor. xz_dec_test
34-
allocates a char device major dynamically to which one can write
35-
.xz files from userspace. The decompressed output is thrown away.
36-
Keep an eye on dmesg to see diagnostics printed by xz_dec_test.
37-
See the xz_dec_test source code for the details.
29+
to buffer) and multi-call (stateful) APIs in include/linux/xz.h.
3830

3931
For decompressing the kernel image, initramfs, and initrd, there
4032
is a wrapper function in lib/decompress_unxz.c. Its API is the
4133
same as in other decompress_*.c files, which is defined in
4234
include/linux/decompress/generic.h.
4335

44-
scripts/xz_wrap.sh is a wrapper for the xz command line tool found
45-
from XZ Utils. The wrapper sets compression options to values suitable
46-
for compressing the kernel image.
36+
For kernel makefiles, three commands are provided for use with
37+
``$(call if_changed)``. They require the xz tool from XZ Utils.
38+
39+
- ``$(call if_changed,xzkern)`` is for compressing the kernel image.
40+
It runs the script scripts/xz_wrap.sh which uses arch-optimized
41+
options and a big LZMA2 dictionary.
42+
43+
- ``$(call if_changed,xzkern_with_size)`` is like ``xzkern`` above but
44+
this also appends a four-byte trailer containing the uncompressed size
45+
of the file. The trailer is needed by the boot code on some archs.
4746

48-
For kernel makefiles, two commands are provided for use with
49-
$(call if_needed). The kernel image should be compressed with
50-
$(call if_needed,xzkern) which will use a BCJ filter and a big LZMA2
51-
dictionary. It will also append a four-byte trailer containing the
52-
uncompressed size of the file, which is needed by the boot code.
53-
Other things should be compressed with $(call if_needed,xzmisc)
54-
which will use no BCJ filter and 1 MiB LZMA2 dictionary.
47+
- Other things can be compressed with ``$(call if_needed,xzmisc)``
48+
which will use no BCJ filter and 1 MiB LZMA2 dictionary.
5549

5650
Notes on compression options
5751
============================
5852

59-
Since the XZ Embedded supports only streams with no integrity check or
60-
CRC32, make sure that you don't use some other integrity check type
61-
when encoding files that are supposed to be decoded by the kernel. With
62-
liblzma, you need to use either LZMA_CHECK_NONE or LZMA_CHECK_CRC32
63-
when encoding. With the xz command line tool, use --check=none or
64-
--check=crc32.
53+
Since the XZ Embedded supports only streams with CRC32 or no integrity
54+
check, make sure that you don't use some other integrity check type
55+
when encoding files that are supposed to be decoded by the kernel.
56+
With liblzma from XZ Utils, you need to use either ``LZMA_CHECK_CRC32``
57+
or ``LZMA_CHECK_NONE`` when encoding. With the ``xz`` command line tool,
58+
use ``--check=crc32`` or ``--check=none`` to override the default
59+
``--check=crc64``.
6560

6661
Using CRC32 is strongly recommended unless there is some other layer
6762
which will verify the integrity of the uncompressed data anyway.
@@ -71,57 +66,33 @@ by the decoder; you can only change the integrity check type (or
7166
disable it) for the actual uncompressed data.
7267

7368
In userspace, LZMA2 is typically used with dictionary sizes of several
74-
megabytes. The decoder needs to have the dictionary in RAM, thus big
75-
dictionaries cannot be used for files that are intended to be decoded
76-
by the kernel. 1 MiB is probably the maximum reasonable dictionary
77-
size for in-kernel use (maybe more is OK for initramfs). The presets
78-
in XZ Utils may not be optimal when creating files for the kernel,
79-
so don't hesitate to use custom settings. Example::
80-
81-
xz --check=crc32 --lzma2=dict=512KiB inputfile
82-
83-
An exception to above dictionary size limitation is when the decoder
84-
is used in single-call mode. Decompressing the kernel itself is an
85-
example of this situation. In single-call mode, the memory usage
86-
doesn't depend on the dictionary size, and it is perfectly fine to
87-
use a big dictionary: for maximum compression, the dictionary should
88-
be at least as big as the uncompressed data itself.
89-
90-
Future plans
91-
============
69+
megabytes. The decoder needs to have the dictionary in RAM:
70+
71+
- In multi-call mode the dictionary is allocated as part of the
72+
decoder state. The reasonable maximum dictionary size for in-kernel
73+
use will depend on the target hardware: a few megabytes is fine for
74+
desktop systems while 64 KiB to 1 MiB might be more appropriate on
75+
some embedded systems.
76+
77+
- In single-call mode the output buffer is used as the dictionary
78+
buffer. That is, the size of the dictionary doesn't affect the
79+
decompressor memory usage at all. Only the base data structures
80+
are allocated which take a little less than 30 KiB of memory.
81+
For the best compression, the dictionary should be at least
82+
as big as the uncompressed data. A notable example of single-call
83+
mode is decompressing the kernel itself (except on PowerPC).
84+
85+
The compression presets in XZ Utils may not be optimal when creating
86+
files for the kernel, so don't hesitate to use custom settings to,
87+
for example, set the dictionary size. Also, xz may produce a smaller
88+
file in single-threaded mode so setting that explicitly is recommended.
89+
Example::
90+
91+
xz --threads=1 --check=crc32 --lzma2=dict=512KiB inputfile
92+
93+
xz_dec API
94+
==========
95+
96+
This is available with ``#include <linux/xz.h>``.
9297

93-
Creating a limited XZ encoder may be considered if people think it is
94-
useful. LZMA2 is slower to compress than e.g. Deflate or LZO even at
95-
the fastest settings, so it isn't clear if LZMA2 encoder is wanted
96-
into the kernel.
97-
98-
Support for limited random-access reading is planned for the
99-
decompression code. I don't know if it could have any use in the
100-
kernel, but I know that it would be useful in some embedded projects
101-
outside the Linux kernel.
102-
103-
Conformance to the .xz file format specification
104-
================================================
105-
106-
There are a couple of corner cases where things have been simplified
107-
at expense of detecting errors as early as possible. These should not
108-
matter in practice all, since they don't cause security issues. But
109-
it is good to know this if testing the code e.g. with the test files
110-
from XZ Utils.
111-
112-
Reporting bugs
113-
==============
114-
115-
Before reporting a bug, please check that it's not fixed already
116-
at upstream. See <https://tukaani.org/xz/embedded.html> to get the
117-
latest code.
118-
119-
Report bugs to <lasse.collin@tukaani.org> or visit #tukaani on
120-
Freenode and talk to Larhzu. I don't actively read LKML or other
121-
kernel-related mailing lists, so if there's something I should know,
122-
you should email to me personally or use IRC.
123-
124-
Don't bother Igor Pavlov with questions about the XZ implementation
125-
in the kernel or about XZ Utils. While these two implementations
126-
include essential code that is directly based on Igor Pavlov's code,
127-
these implementations aren't maintained nor supported by him.
98+
.. kernel-doc:: include/linux/xz.h

LICENSES/deprecated/0BSD

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Valid-License-Identifier: 0BSD
2+
SPDX-URL: https://spdx.org/licenses/0BSD.html
3+
Usage-Guide:
4+
To use the BSD Zero Clause License put the following SPDX tag/value
5+
pair into a comment according to the placement guidelines in the
6+
licensing rules documentation:
7+
SPDX-License-Identifier: 0BSD
8+
License-Text:
9+
10+
BSD Zero Clause License
11+
12+
Copyright (c) <year> <copyright holders>
13+
14+
Permission to use, copy, modify, and/or distribute this software for any
15+
purpose with or without fee is hereby granted.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
18+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
19+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20+
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
22+
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
23+
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

MAINTAINERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8612,6 +8612,7 @@ M: Akinobu Mita <akinobu.mita@gmail.com>
86128612
S: Supported
86138613
F: Documentation/fault-injection/
86148614
F: lib/fault-inject.c
8615+
F: tools/testing/fault-injection/
86158616

86168617
FBTFT Framebuffer drivers
86178618
L: dri-devel@lists.freedesktop.org
@@ -25459,6 +25460,19 @@ S: Maintained
2545925460
F: drivers/spi/spi-xtensa-xtfpga.c
2546025461
F: sound/soc/xtensa/xtfpga-i2s.c
2546125462

25463+
XZ EMBEDDED
25464+
M: Lasse Collin <lasse.collin@tukaani.org>
25465+
S: Maintained
25466+
W: https://tukaani.org/xz/embedded.html
25467+
B: https://github.com/tukaani-project/xz-embedded/issues
25468+
C: irc://irc.libera.chat/tukaani
25469+
F: Documentation/staging/xz.rst
25470+
F: include/linux/decompress/unxz.h
25471+
F: include/linux/xz.h
25472+
F: lib/decompress_unxz.c
25473+
F: lib/xz/
25474+
F: scripts/xz_wrap.sh
25475+
2546225476
YAM DRIVER FOR AX.25
2546325477
M: Jean-Paul Roubelat <jpr@f6fbb.org>
2546425478
L: linux-hams@vger.kernel.org

arch/arm/lib/xor-neon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/raid/xor.h>
99
#include <linux/module.h>
1010

11+
MODULE_DESCRIPTION("NEON accelerated XOR implementation");
1112
MODULE_LICENSE("GPL");
1213

1314
#ifndef __ARM_NEON__

arch/arm/mach-omap2/omap-mpuss-lowpower.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
333333
omap_pm_ops.scu_prepare(cpu, power_state);
334334

335335
/*
336-
* CPU never retuns back if targeted power state is OFF mode.
336+
* CPU never returns back if targeted power state is OFF mode.
337337
* CPU ONLINE follows normal CPU ONLINE ptah via
338338
* omap4_secondary_startup().
339339
*/

arch/arm64/boot/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
1818

1919
targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo \
20-
Image.zst image.fit
20+
Image.zst Image.xz image.fit
2121

2222
$(obj)/Image: vmlinux FORCE
2323
$(call if_changed,objcopy)
@@ -40,6 +40,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
4040
$(obj)/Image.zst: $(obj)/Image FORCE
4141
$(call if_changed,zstd)
4242

43+
$(obj)/Image.xz: $(obj)/Image FORCE
44+
$(call if_changed,xzkern)
45+
4346
$(obj)/image.fit: $(obj)/Image $(obj)/dts/dtbs-list FORCE
4447
$(call if_changed,fit)
4548

0 commit comments

Comments
 (0)