Skip to content

Commit

Permalink
sync mm-stable with mm-hotfixes-stable to pick up depended-upon changes
Browse files Browse the repository at this point in the history
  • Loading branch information
akpm00 committed Dec 20, 2023
2 parents d9d9bd9 + 1803d0c commit a721aea
Show file tree
Hide file tree
Showing 44 changed files with 245 additions and 190 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ Muna Sinada <[email protected]> <[email protected]>
Murali Nalajala <[email protected]> <[email protected]>
Mythri P K <[email protected]>
Nadia Yvette Chambers <[email protected]> William Lee Irwin III <[email protected]>
Naoya Horiguchi <[email protected]> <[email protected]>
Nathan Chancellor <[email protected]> <[email protected]>
Neeraj Upadhyay <[email protected]> <[email protected]>
Neil Armstrong <[email protected]> <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o

obj-$(CONFIG_RELOCATABLE) += relocate.o

obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o

obj-$(CONFIG_UNWINDER_GUESS) += unwind_guess.o
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/include/asm/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#ifndef _ASM_M68K_KEXEC_H
#define _ASM_M68K_KEXEC_H

#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE

/* Maximum physical address we can use pages from */
#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
Expand All @@ -25,6 +25,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs,

#endif /* __ASSEMBLY__ */

#endif /* CONFIG_KEXEC */
#endif /* CONFIG_KEXEC_CORE */

#endif /* _ASM_M68K_KEXEC_H */
2 changes: 1 addition & 1 deletion arch/m68k/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ obj-$(CONFIG_PCI) += pcibios.o

obj-$(CONFIG_M68K_NONCOHERENT_DMA) += dma.o

obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_BOOTINFO_PROC) += bootinfo_proc.o
obj-$(CONFIG_UBOOT) += uboot.o

Expand Down
4 changes: 2 additions & 2 deletions arch/mips/cavium-octeon/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static const struct plat_smp_ops octeon_smp_ops = {
.cpu_disable = octeon_cpu_disable,
.cpu_die = octeon_cpu_die,
#endif
#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
.kexec_nonboot_cpu = kexec_nonboot_cpu_jump,
#endif
};
Expand Down Expand Up @@ -502,7 +502,7 @@ static const struct plat_smp_ops octeon_78xx_smp_ops = {
.cpu_disable = octeon_cpu_disable,
.cpu_die = octeon_cpu_die,
#endif
#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
.kexec_nonboot_cpu = kexec_nonboot_cpu_jump,
#endif
};
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/include/asm/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
prepare_frametrace(newregs);
}

#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
struct kimage;
extern unsigned long kexec_args[4];
extern int (*_machine_kexec_prepare)(struct kimage *);
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/include/asm/smp-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct plat_smp_ops {
void (*cpu_die)(unsigned int cpu);
void (*cleanup_dead_cpu)(unsigned cpu);
#endif
#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
void (*kexec_nonboot_cpu)(void);
#endif
};
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static inline void __cpu_die(unsigned int cpu)
extern void __noreturn play_dead(void);
#endif

#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
static inline void kexec_nonboot_cpu(void)
{
extern const struct plat_smp_ops *mp_ops; /* private */
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ obj-$(CONFIG_GPIO_TXX9) += gpio_txx9.o

obj-$(CONFIG_RELOCATABLE) += relocate.o

obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o
obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o crash.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_EARLY_PRINTK_8250) += early_printk_8250.o
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/kernel/smp-bmips.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ const struct plat_smp_ops bmips43xx_smp_ops = {
.cpu_disable = bmips_cpu_disable,
.cpu_die = bmips_cpu_die,
#endif
#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
.kexec_nonboot_cpu = kexec_nonboot_cpu_jump,
#endif
};
Expand All @@ -451,7 +451,7 @@ const struct plat_smp_ops bmips5000_smp_ops = {
.cpu_disable = bmips_cpu_disable,
.cpu_die = bmips_cpu_die,
#endif
#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
.kexec_nonboot_cpu = kexec_nonboot_cpu_jump,
#endif
};
Expand Down
10 changes: 5 additions & 5 deletions arch/mips/kernel/smp-cps.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ static void cps_smp_finish(void)
local_irq_enable();
}

#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_KEXEC)
#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_KEXEC_CORE)

enum cpu_death {
CPU_DEATH_HALT,
Expand Down Expand Up @@ -429,7 +429,7 @@ static void cps_shutdown_this_cpu(enum cpu_death death)
}
}

#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE

static void cps_kexec_nonboot_cpu(void)
{
Expand All @@ -439,9 +439,9 @@ static void cps_kexec_nonboot_cpu(void)
cps_shutdown_this_cpu(CPU_DEATH_POWER);
}

#endif /* CONFIG_KEXEC */
#endif /* CONFIG_KEXEC_CORE */

#endif /* CONFIG_HOTPLUG_CPU || CONFIG_KEXEC */
#endif /* CONFIG_HOTPLUG_CPU || CONFIG_KEXEC_CORE */

#ifdef CONFIG_HOTPLUG_CPU

Expand Down Expand Up @@ -610,7 +610,7 @@ static const struct plat_smp_ops cps_smp_ops = {
.cpu_die = cps_cpu_die,
.cleanup_dead_cpu = cps_cleanup_dead_cpu,
#endif
#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
.kexec_nonboot_cpu = cps_kexec_nonboot_cpu,
#endif
};
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/loongson64/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void loongson_halt(void)
}
}

#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE

/* 0X80000000~0X80200000 is safe */
#define MAX_ARGS 64
Expand Down Expand Up @@ -158,7 +158,7 @@ static int __init mips_reboot_setup(void)
_machine_halt = loongson_halt;
pm_power_off = loongson_poweroff;

#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
kexec_argv = kmalloc(KEXEC_ARGV_SIZE, GFP_KERNEL);
if (WARN_ON(!kexec_argv))
return -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/loongson64/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ const struct plat_smp_ops loongson3_smp_ops = {
.cpu_disable = loongson3_cpu_disable,
.cpu_die = loongson3_cpu_die,
#endif
#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
.kexec_nonboot_cpu = kexec_nonboot_cpu_jump,
#endif
};
4 changes: 2 additions & 2 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,10 @@ config ARCH_SUPPORTS_KEXEC
def_bool PPC_BOOK3S || PPC_E500 || (44x && !SMP)

config ARCH_SUPPORTS_KEXEC_FILE
def_bool PPC64 && CRYPTO=y && CRYPTO_SHA256=y
def_bool PPC64

config ARCH_SUPPORTS_KEXEC_PURGATORY
def_bool KEXEC_FILE
def_bool y

config ARCH_SELECTS_KEXEC_FILE
def_bool y
Expand Down
8 changes: 3 additions & 5 deletions arch/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -685,15 +685,15 @@ config RISCV_BOOT_SPINWAIT
If unsure what to do here, say N.

config ARCH_SUPPORTS_KEXEC
def_bool MMU
def_bool y

config ARCH_SELECTS_KEXEC
def_bool y
depends on KEXEC
select HOTPLUG_CPU if SMP

config ARCH_SUPPORTS_KEXEC_FILE
def_bool 64BIT && MMU
def_bool 64BIT

config ARCH_SELECTS_KEXEC_FILE
def_bool y
Expand All @@ -702,9 +702,7 @@ config ARCH_SELECTS_KEXEC_FILE
select KEXEC_ELF

config ARCH_SUPPORTS_KEXEC_PURGATORY
def_bool KEXEC_FILE
depends on CRYPTO=y
depends on CRYPTO_SHA256=y
def_bool ARCH_SUPPORTS_KEXEC_FILE

config ARCH_SUPPORTS_CRASH_DUMP
def_bool y
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
#define PAGE_KERNEL __pgprot(0)
#define swapper_pg_dir NULL
#define TASK_SIZE 0xffffffffUL
#define VMALLOC_START 0
#define VMALLOC_START _AC(0, UL)
#define VMALLOC_END TASK_SIZE

#endif /* !CONFIG_MMU */
Expand Down
4 changes: 3 additions & 1 deletion arch/riscv/kernel/crash_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@

void arch_crash_save_vmcoreinfo(void)
{
VMCOREINFO_NUMBER(VA_BITS);
VMCOREINFO_NUMBER(phys_ram_base);

vmcoreinfo_append_str("NUMBER(PAGE_OFFSET)=0x%lx\n", PAGE_OFFSET);
vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
#ifdef CONFIG_MMU
VMCOREINFO_NUMBER(VA_BITS);
vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START);
vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END);
#ifdef CONFIG_64BIT
vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR);
vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
#endif
#endif
vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
vmcoreinfo_append_str("NUMBER(va_kernel_pa_offset)=0x%lx\n",
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ config ARCH_SUPPORTS_KEXEC
def_bool y

config ARCH_SUPPORTS_KEXEC_FILE
def_bool CRYPTO && CRYPTO_SHA256 && CRYPTO_SHA256_S390
def_bool y

config ARCH_SUPPORTS_KEXEC_SIG
def_bool MODULE_SIG_FORMAT

config ARCH_SUPPORTS_KEXEC_PURGATORY
def_bool KEXEC_FILE
def_bool y

config ARCH_SUPPORTS_CRASH_DUMP
def_bool y
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/include/asm/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/* The native architecture */
#define KEXEC_ARCH KEXEC_ARCH_SH

#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
/* arch/sh/kernel/machine_kexec.c */
void reserve_crashkernel(void);

Expand Down Expand Up @@ -67,6 +67,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
}
#else
static inline void reserve_crashkernel(void) { }
#endif /* CONFIG_KEXEC */
#endif /* CONFIG_KEXEC_CORE */

#endif /* __ASM_SH_KEXEC_H */
2 changes: 1 addition & 1 deletion arch/sh/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o
obj-$(CONFIG_KGDB) += kgdb.o
obj-$(CONFIG_MODULES) += sh_ksyms_32.o module.o
obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct machine_ops machine_ops = {
.shutdown = native_machine_shutdown,
.restart = native_machine_restart,
.halt = native_machine_halt,
#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
.crash_shutdown = native_machine_crash_shutdown,
#endif
};
Expand All @@ -88,7 +88,7 @@ void machine_halt(void)
machine_ops.halt();
}

#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
void machine_crash_shutdown(struct pt_regs *regs)
{
machine_ops.crash_shutdown(regs);
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
request_resource(res, &code_resource);
request_resource(res, &data_resource);
request_resource(res, &bss_resource);
#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
request_resource(res, &crashk_res);
#endif

Expand Down
4 changes: 2 additions & 2 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2072,15 +2072,15 @@ config ARCH_SUPPORTS_KEXEC
def_bool y

config ARCH_SUPPORTS_KEXEC_FILE
def_bool X86_64 && CRYPTO && CRYPTO_SHA256
def_bool X86_64

config ARCH_SELECTS_KEXEC_FILE
def_bool y
depends on KEXEC_FILE
select HAVE_IMA_KEXEC if IMA

config ARCH_SUPPORTS_KEXEC_PURGATORY
def_bool KEXEC_FILE
def_bool y

config ARCH_SUPPORTS_KEXEC_SIG
def_bool y
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/boot/compressed/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static unsigned long get_cmdline_acpi_rsdp(void)
{
unsigned long addr = 0;

#ifdef CONFIG_KEXEC
#ifdef CONFIG_KEXEC_CORE
char val[MAX_ADDR_LEN] = { };
int ret;

Expand Down
2 changes: 2 additions & 0 deletions include/linux/damon.h
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@ struct damon_ctx {
* update
*/
unsigned long next_ops_update_sis;
/* for waiting until the execution of the kdamond_fn is started */
struct completion kdamond_started;

/* public: */
struct task_struct *kdamond;
Expand Down
8 changes: 4 additions & 4 deletions include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,8 @@ static inline bool vma_is_anonymous(struct vm_area_struct *vma)
*/
static inline bool vma_is_initial_heap(const struct vm_area_struct *vma)
{
return vma->vm_start <= vma->vm_mm->brk &&
vma->vm_end >= vma->vm_mm->start_brk;
return vma->vm_start < vma->vm_mm->brk &&
vma->vm_end > vma->vm_mm->start_brk;
}

/*
Expand All @@ -901,8 +901,8 @@ static inline bool vma_is_initial_stack(const struct vm_area_struct *vma)
* its "stack". It's not even well-defined for programs written
* languages like Go.
*/
return vma->vm_start <= vma->vm_mm->start_stack &&
vma->vm_end >= vma->vm_mm->start_stack;
return vma->vm_start <= vma->vm_mm->start_stack &&
vma->vm_end >= vma->vm_mm->start_stack;
}

static inline bool vma_is_temporary_stack(struct vm_area_struct *vma)
Expand Down
Loading

0 comments on commit a721aea

Please sign in to comment.