Skip to content

Commit

Permalink
Merge tag 'mm-nonmm-stable-2024-01-09-10-33' of git://git.kernel.org/…
Browse files Browse the repository at this point in the history
…pub/scm/linux/kernel/git/akpm/mm

Pull non-MM updates from Andrew Morton:
 "Quite a lot of kexec work this time around. Many singleton patches in
  many places. The notable patch series are:

   - nilfs2 folio conversion from Matthew Wilcox in 'nilfs2: Folio
     conversions for file paths'.

   - Additional nilfs2 folio conversion from Ryusuke Konishi in 'nilfs2:
     Folio conversions for directory paths'.

   - IA64 remnant removal in Heiko Carstens's 'Remove unused code after
     IA-64 removal'.

   - Arnd Bergmann has enabled the -Wmissing-prototypes warning
     everywhere in 'Treewide: enable -Wmissing-prototypes'. This had
     some followup fixes:

      - Nathan Chancellor has cleaned up the hexagon build in the series
        'hexagon: Fix up instances of -Wmissing-prototypes'.

      - Nathan also addressed some s390 warnings in 's390: A couple of
        fixes for -Wmissing-prototypes'.

      - Arnd Bergmann addresses the same warnings for MIPS in his series
        'mips: address -Wmissing-prototypes warnings'.

   - Baoquan He has made kexec_file operate in a top-down-fitting manner
     similar to kexec_load in the series 'kexec_file: Load kernel at top
     of system RAM if required'

   - Baoquan He has also added the self-explanatory 'kexec_file: print
     out debugging message if required'.

   - Some checkstack maintenance work from Tiezhu Yang in the series
     'Modify some code about checkstack'.

   - Douglas Anderson has disentangled the watchdog code's logging when
     multiple reports are occurring simultaneously. The series is
     'watchdog: Better handling of concurrent lockups'.

   - Yuntao Wang has contributed some maintenance work on the crash code
     in 'crash: Some cleanups and fixes'"

* tag 'mm-nonmm-stable-2024-01-09-10-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (157 commits)
  crash_core: fix and simplify the logic of crash_exclude_mem_range()
  x86/crash: use SZ_1M macro instead of hardcoded value
  x86/crash: remove the unused image parameter from prepare_elf_headers()
  kdump: remove redundant DEFAULT_CRASH_KERNEL_LOW_SIZE
  scripts/decode_stacktrace.sh: strip unexpected CR from lines
  watchdog: if panicking and we dumped everything, don't re-enable dumping
  watchdog/hardlockup: use printk_cpu_sync_get_irqsave() to serialize reporting
  watchdog/softlockup: use printk_cpu_sync_get_irqsave() to serialize reporting
  watchdog/hardlockup: adopt softlockup logic avoiding double-dumps
  kexec_core: fix the assignment to kimage->control_page
  x86/kexec: fix incorrect end address passed to kernel_ident_mapping_init()
  lib/trace_readwrite.c:: replace asm-generic/io with linux/io
  nilfs2: cpfile: fix some kernel-doc warnings
  stacktrace: fix kernel-doc typo
  scripts/checkstack.pl: fix no space expression between sp and offset
  x86/kexec: fix incorrect argument passed to kexec_dprintk()
  x86/kexec: use pr_err() instead of kexec_dprintk() when an error occurs
  nilfs2: add missing set_freezable() for freezable kthread
  kernel: relay: remove relay_file_splice_read dead code, doesn't work
  docs: submit-checklist: remove all of "make namespacecheck"
  ...
  • Loading branch information
torvalds committed Jan 9, 2024
2 parents fb46e22 + 6dff315 commit 9f2a635
Show file tree
Hide file tree
Showing 159 changed files with 1,108 additions and 1,155 deletions.
3 changes: 3 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ N: Ohad Ben Cohen
E: ohad@wizery.com
D: Remote Processor (remoteproc) subsystem
D: Remote Processor Messaging (rpmsg) subsystem
D: Hardware spinlock (hwspinlock) subsystem
D: OMAP hwspinlock driver
D: OMAP remoteproc driver

N: Krzysztof Benedyczak
E: golbi@mat.uni.torun.pl
Expand Down
2 changes: 1 addition & 1 deletion Documentation/driver-api/surface_aggregator/ssh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Note that the standard disclaimer for this subsystem also applies to this
document: All of this has been reverse-engineered and may thus be erroneous
and/or incomplete.

All CRCs used in the following are two-byte ``crc_ccitt_false(0xffff, ...)``.
All CRCs used in the following are two-byte ``crc_itu_t(0xffff, ...)``.
All multi-byte values are little-endian, there is no implicit padding between
values.

Expand Down
60 changes: 60 additions & 0 deletions Documentation/filesystems/squashfs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,66 @@ obtained from this site also.
The squashfs-tools development tree is now located on kernel.org
git://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git

2.1 Mount options
-----------------
=================== =========================================================
errors=%s Specify whether squashfs errors trigger a kernel panic
or not

========== =============================================
continue errors don't trigger a panic (default)
panic trigger a panic when errors are encountered,
similar to several other filesystems (e.g.
btrfs, ext4, f2fs, GFS2, jfs, ntfs, ubifs)

This allows a kernel dump to be saved,
useful for analyzing and debugging the
corruption.
========== =============================================
threads=%s Select the decompression mode or the number of threads

If SQUASHFS_CHOICE_DECOMP_BY_MOUNT is set:

========== =============================================
single use single-threaded decompression (default)

Only one block (data or metadata) can be
decompressed at any one time. This limits
CPU and memory usage to a minimum, but it
also gives poor performance on parallel I/O
workloads when using multiple CPU machines
due to waiting on decompressor availability.
multi use up to two parallel decompressors per core

If you have a parallel I/O workload and your
system has enough memory, using this option
may improve overall I/O performance. It
dynamically allocates decompressors on a
demand basis.
percpu use a maximum of one decompressor per core

It uses percpu variables to ensure
decompression is load-balanced across the
cores.
1|2|3|... configure the number of threads used for
decompression

The upper limit is num_online_cpus() * 2.
========== =============================================

If SQUASHFS_CHOICE_DECOMP_BY_MOUNT is **not** set and
SQUASHFS_DECOMP_MULTI, SQUASHFS_MOUNT_DECOMP_THREADS are
both set:

========== =============================================
2|3|... configure the number of threads used for
decompression

The upper limit is num_online_cpus() * 2.
========== =============================================

=================== =========================================================

3. Squashfs Filesystem Design
-----------------------------

Expand Down
4 changes: 2 additions & 2 deletions Documentation/translations/ja_JP/SubmitChecklist
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Linux カーネルパッチ投稿者向けチェックリスト

9: sparseを利用してちゃんとしたコードチェックをしてください。

10: 'make checkstack' と 'make namespacecheck' を利用し、問題が発見されたら
修正してください。'make checkstack' は明示的に問題を示しませんが、どれか
10: 'make checkstack' を利用し、問題が発見されたら修正してください。
'make checkstack' は明示的に問題を示しませんが、どれか
1つの関数が512バイトより大きいスタックを使っていれば、修正すべき候補と
なります。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ Linux内核补丁提交检查单
9) 通过 sparse 清查。
(参见 Documentation/translations/zh_CN/dev-tools/sparse.rst )

10) 使用 ``make checkstack`` 和 ``make namespacecheck`` 并修复他们发现的任何
问题。
10) 使用 ``make checkstack`` 并修复他们发现的任何问题。

.. note::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ Linux內核補丁提交檢查單
9) 通過 sparse 清查。
(參見 Documentation/translations/zh_CN/dev-tools/sparse.rst )

10) 使用 ``make checkstack`` 和 ``make namespacecheck`` 並修復他們發現的任何
問題。
10) 使用 ``make checkstack`` 並修復他們發現的任何問題。

.. note::

Expand Down
4 changes: 1 addition & 3 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -9283,7 +9283,6 @@ F: drivers/char/hw_random/
F: include/linux/hw_random.h

HARDWARE SPINLOCK CORE
M: Ohad Ben-Cohen <ohad@wizery.com>
M: Bjorn Andersson <andersson@kernel.org>
R: Baolin Wang <baolin.wang7@gmail.com>
L: linux-remoteproc@vger.kernel.org
Expand Down Expand Up @@ -15715,9 +15714,8 @@ F: Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml
F: drivers/gpio/gpio-omap.c

OMAP HARDWARE SPINLOCK SUPPORT
M: Ohad Ben-Cohen <ohad@wizery.com>
L: linux-omap@vger.kernel.org
S: Maintained
S: Orphan
F: drivers/hwspinlock/omap_hwspinlock.c

OMAP HS MMC SUPPORT
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,8 @@ help:
echo ' (default: $(INSTALL_HDR_PATH))'; \
echo ''
@echo 'Static analysers:'
@echo ' checkstack - Generate a list of stack hogs'
@echo ' checkstack - Generate a list of stack hogs and consider all functions'
@echo ' with a stack size larger than MINSTACKSIZE (default: 100)'
@echo ' versioncheck - Sanity check on version.h usage'
@echo ' includecheck - Check for duplicate included header files'
@echo ' export_report - List the usages of all exported symbols'
Expand Down Expand Up @@ -2016,9 +2017,10 @@ CHECKSTACK_ARCH := $(SUBARCH)
else
CHECKSTACK_ARCH := $(ARCH)
endif
MINSTACKSIZE ?= 100
checkstack:
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
$(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
$(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH) $(MINSTACKSIZE)

kernelrelease:
@$(filechk_kernel.release)
Expand Down
13 changes: 0 additions & 13 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,8 @@ config ARCH_HAS_DMA_CLEAR_UNCACHED
config ARCH_HAS_CPU_FINALIZE_INIT
bool

# Select if arch init_task must go in the __init_task_data section
config ARCH_TASK_STRUCT_ON_STACK
bool

# Select if arch has its private alloc_task_struct() function
config ARCH_TASK_STRUCT_ALLOCATOR
bool

config HAVE_ARCH_THREAD_STRUCT_WHITELIST
bool
depends on !ARCH_TASK_STRUCT_ALLOCATOR
help
An architecture should select this to provide hardened usercopy
knowledge about what region of the thread_struct should be
Expand All @@ -320,10 +311,6 @@ config HAVE_ARCH_THREAD_STRUCT_WHITELIST
should be implemented. Without this, the entire thread_struct
field in task_struct will be left whitelisted.

# Select if arch has its private alloc_thread_stack() function
config ARCH_THREAD_STACK_ALLOCATOR
bool

# Select if arch wants to size task_struct dynamically via arch_task_struct_size:
config ARCH_WANTS_DYNAMIC_TASK_STRUCT
bool
Expand Down
1 change: 0 additions & 1 deletion arch/alpha/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#

asflags-y := $(KBUILD_CFLAGS)
ccflags-y := -Werror

# Many of these routines have implementations tuned for ev6.
# Choose them iff we're targeting ev6 specifically.
Expand Down
2 changes: 0 additions & 2 deletions arch/alpha/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
# Makefile for the linux alpha-specific parts of the memory manager.
#

ccflags-y := -Werror

obj-y := init.o fault.o
6 changes: 3 additions & 3 deletions arch/arm64/kernel/kexec_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ static void *image_load(struct kimage *image,
kernel_segment->memsz -= text_offset;
image->start = kernel_segment->mem;

pr_debug("Loaded kernel at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
kernel_segment->mem, kbuf.bufsz,
kernel_segment->memsz);
kexec_dprintk("Loaded kernel at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
kernel_segment->mem, kbuf.bufsz,
kernel_segment->memsz);

return NULL;
}
Expand Down
26 changes: 6 additions & 20 deletions arch/arm64/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,12 @@
static void _kexec_image_info(const char *func, int line,
const struct kimage *kimage)
{
unsigned long i;

pr_debug("%s:%d:\n", func, line);
pr_debug(" kexec kimage info:\n");
pr_debug(" type: %d\n", kimage->type);
pr_debug(" start: %lx\n", kimage->start);
pr_debug(" head: %lx\n", kimage->head);
pr_debug(" nr_segments: %lu\n", kimage->nr_segments);
pr_debug(" dtb_mem: %pa\n", &kimage->arch.dtb_mem);
pr_debug(" kern_reloc: %pa\n", &kimage->arch.kern_reloc);
pr_debug(" el2_vectors: %pa\n", &kimage->arch.el2_vectors);

for (i = 0; i < kimage->nr_segments; i++) {
pr_debug(" segment[%lu]: %016lx - %016lx, 0x%lx bytes, %lu pages\n",
i,
kimage->segment[i].mem,
kimage->segment[i].mem + kimage->segment[i].memsz,
kimage->segment[i].memsz,
kimage->segment[i].memsz / PAGE_SIZE);
}
kexec_dprintk("%s:%d:\n", func, line);
kexec_dprintk(" kexec kimage info:\n");
kexec_dprintk(" type: %d\n", kimage->type);
kexec_dprintk(" head: %lx\n", kimage->head);
kexec_dprintk(" kern_reloc: %pa\n", &kimage->arch.kern_reloc);
kexec_dprintk(" el2_vectors: %pa\n", &kimage->arch.el2_vectors);
}

void machine_kexec_cleanup(struct kimage *kimage)
Expand Down
12 changes: 6 additions & 6 deletions arch/arm64/kernel/machine_kexec_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ int load_other_segments(struct kimage *image,
image->elf_load_addr = kbuf.mem;
image->elf_headers_sz = headers_sz;

pr_debug("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
image->elf_load_addr, kbuf.bufsz, kbuf.memsz);
kexec_dprintk("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
image->elf_load_addr, kbuf.bufsz, kbuf.memsz);
}

/* load initrd */
Expand All @@ -148,8 +148,8 @@ int load_other_segments(struct kimage *image,
goto out_err;
initrd_load_addr = kbuf.mem;

pr_debug("Loaded initrd at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
initrd_load_addr, kbuf.bufsz, kbuf.memsz);
kexec_dprintk("Loaded initrd at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
initrd_load_addr, kbuf.bufsz, kbuf.memsz);
}

/* load dtb */
Expand Down Expand Up @@ -179,8 +179,8 @@ int load_other_segments(struct kimage *image,
image->arch.dtb = dtb;
image->arch.dtb_mem = kbuf.mem;

pr_debug("Loaded dtb at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
kbuf.mem, kbuf.bufsz, kbuf.memsz);
kexec_dprintk("Loaded dtb at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
kbuf.mem, kbuf.bufsz, kbuf.memsz);

return 0;

Expand Down
3 changes: 3 additions & 0 deletions arch/hexagon/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@

#include <asm-generic/irq.h>

struct pt_regs;
void arch_do_IRQ(struct pt_regs *);

#endif
2 changes: 2 additions & 0 deletions arch/hexagon/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
*/

#include <linux/cpu.h>
#include <linux/sched.h>
#include <linux/sched/debug.h>
#include <linux/sched/task.h>
Expand Down Expand Up @@ -152,6 +153,7 @@ unsigned long __get_wchan(struct task_struct *p)
* Returns 0 if there's no need to re-check for more work.
*/

int do_work_pending(struct pt_regs *regs, u32 thread_info_flags);
int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)
{
if (!(thread_info_flags & _TIF_WORK_MASK)) {
Expand Down
1 change: 1 addition & 0 deletions arch/hexagon/kernel/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
*/

#include <linux/reboot.h>
#include <linux/smp.h>
#include <asm/hexagon_vm.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/hexagon/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void do_signal(struct pt_regs *regs)
* Architecture-specific wrappers for signal-related system calls
*/

asmlinkage int sys_rt_sigreturn(void)
SYSCALL_DEFINE0(rt_sigreturn)
{
struct pt_regs *regs = current_pt_regs();
struct rt_sigframe __user *frame;
Expand Down
4 changes: 2 additions & 2 deletions arch/hexagon/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void smp_vm_unmask_irq(void *info)
* Specifically, first arg is irq, second is the irq_desc.
*/

irqreturn_t handle_ipi(int irq, void *desc)
static irqreturn_t handle_ipi(int irq, void *desc)
{
int cpu = smp_processor_id();
struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
Expand Down Expand Up @@ -124,7 +124,7 @@ void __init smp_prepare_boot_cpu(void)
* to point to current thread info
*/

void start_secondary(void)
static void start_secondary(void)
{
unsigned long thread_ptr;
unsigned int cpu, irq;
Expand Down
4 changes: 3 additions & 1 deletion arch/hexagon/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#include <linux/of_irq.h>
#include <linux/module.h>

#include <asm/delay.h>
#include <asm/hexagon_vm.h>
#include <asm/time.h>

#define TIMER_ENABLE BIT(0)

Expand Down Expand Up @@ -160,7 +162,7 @@ static irqreturn_t timer_interrupt(int irq, void *devid)
* This runs just before the delay loop is calibrated, and
* is used for delay calibration.
*/
void __init time_init_deferred(void)
static void __init time_init_deferred(void)
{
struct resource *resource = NULL;
struct clock_event_device *ce_dev = &hexagon_clockevent_dev;
Expand Down
11 changes: 4 additions & 7 deletions arch/hexagon/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ static void cache_error(struct pt_regs *regs)
/*
* General exception handler
*/
void do_genex(struct pt_regs *regs);
void do_genex(struct pt_regs *regs)
{
/*
Expand Down Expand Up @@ -331,13 +332,7 @@ void do_genex(struct pt_regs *regs)
}
}

/* Indirect system call dispatch */
long sys_syscall(void)
{
printk(KERN_ERR "sys_syscall invoked!\n");
return -ENOSYS;
}

void do_trap0(struct pt_regs *regs);
void do_trap0(struct pt_regs *regs)
{
syscall_fn syscall;
Expand Down Expand Up @@ -415,6 +410,7 @@ void do_trap0(struct pt_regs *regs)
/*
* Machine check exception handler
*/
void do_machcheck(struct pt_regs *regs);
void do_machcheck(struct pt_regs *regs)
{
/* Halt and catch fire */
Expand All @@ -425,6 +421,7 @@ void do_machcheck(struct pt_regs *regs)
* Treat this like the old 0xdb trap.
*/

void do_debug_exception(struct pt_regs *regs);
void do_debug_exception(struct pt_regs *regs)
{
regs->hvmer.vmest &= ~HVM_VMEST_CAUSE_MSK;
Expand Down
Loading

0 comments on commit 9f2a635

Please sign in to comment.