Skip to content

Commit

Permalink
Merge tag 'v6.1.116' into 6.1-main
Browse files Browse the repository at this point in the history
This is the 6.1.116 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmcuLcsACgkQONu9yGCS
# aT5jkw/+MWzkJZXvqvXpi86tk2HM2t296nmZzuYGj7FTS+BbxhXKo/fdW+bW/mmT
# Q9xKeGClN3qg9BQdqIDlLLkLhx/NmdZyMomfev1Q4Uth5Wi2fzyKNoovmgbHDMa4
# E8+vlEuyt52fUTKLEfhGhu8dwsAVxRr702XVmlc+gPusLA1R3ZYs2ECUm8XGPO3f
# lX1WDZ/xNE4J+6ChdqtVyuvRWoSpMngjAKOWoko5LZiXlWJF13OHb4yomL/elAHg
# WbbrW7Cj5ClZqNFXq3rrZDyjB7MYDL507ZqGBfCLR/qhVFK50Vn7JcNEqYLepi+k
# THnjQ2yOQ6DHBj+0Q86YpFiFtcMeZsbFR1h4hHmH/I5dKlj98MedWsupJO1AU0L6
# bp7WDGLpOKVRCKHOkUb+jFtflcO7o1aYFTjqMhcU89IH3dUxqTnI0DqMwexUhjQM
# 2ynD/YziiyuAeGNwUSMfj88x3GnBDBIZS0X1b1V8+sCMuaaTwqMSmBwBq0aiO2xX
# u7ccUJacSvr3iD7XjaV51mDPzcEGZIjzekpeW188ndZ3DIFBlaih9ow84k7jeB2E
# IFZilbW6vnt8EAdL7uBSRa5DA3/82K8/fbdMmNEt9cS6hzicyEFpTmp8t1B9AsVZ
# 4s88hm2xBO1THAG8OA3vnWHQBHcJxJ/eE99+YKDBwrI9XeAIMPg=
# =oI8J
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Nov  8 16:27:07 2024 CET
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
  • Loading branch information
frank-w committed Dec 6, 2024
2 parents eb8db29 + d7039b8 commit 60a0c7e
Show file tree
Hide file tree
Showing 138 changed files with 1,421 additions and 995 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 1
SUBLEVEL = 115
SUBLEVEL = 116
EXTRAVERSION =
NAME = Curry Ramen

Expand Down
2 changes: 0 additions & 2 deletions arch/alpha/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })

#define kern_addr_valid(addr) (1)

#define pte_ERROR(e) \
printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
#define pmd_ERROR(e) \
Expand Down
2 changes: 0 additions & 2 deletions arch/arc/include/asm/pgtable-bits-arcv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })

#define kern_addr_valid(addr) (1)

#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#include <asm/hugepage.h>
#endif
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/include/asm/pgtable-nommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#define pgd_none(pgd) (0)
#define pgd_bad(pgd) (0)
#define pgd_clear(pgdp)
#define kern_addr_valid(addr) (1)
/* FIXME */
/*
* PMD_SHIFT determines the size of the area a second-level page table can map
* PGDIR_SHIFT determines what a third-level page table entry can map
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
*/
#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > __SWP_TYPE_BITS)

/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
/* FIXME: this is not correct */
#define kern_addr_valid(addr) (1)

/*
* We provide our own arch_get_unmapped_area to cope with VIPT caches.
*/
Expand Down
2 changes: 0 additions & 2 deletions arch/arm64/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,6 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
*/
#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > __SWP_TYPE_BITS)

extern int kern_addr_valid(unsigned long addr);

#ifdef CONFIG_ARM64_MTE

#define __HAVE_ARCH_PREPARE_TO_SWAP
Expand Down
47 changes: 0 additions & 47 deletions arch/arm64/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,53 +875,6 @@ void __init paging_init(void)
create_idmap();
}

/*
* Check whether a kernel address is valid (derived from arch/x86/).
*/
int kern_addr_valid(unsigned long addr)
{
pgd_t *pgdp;
p4d_t *p4dp;
pud_t *pudp, pud;
pmd_t *pmdp, pmd;
pte_t *ptep, pte;

addr = arch_kasan_reset_tag(addr);
if ((((long)addr) >> VA_BITS) != -1UL)
return 0;

pgdp = pgd_offset_k(addr);
if (pgd_none(READ_ONCE(*pgdp)))
return 0;

p4dp = p4d_offset(pgdp, addr);
if (p4d_none(READ_ONCE(*p4dp)))
return 0;

pudp = pud_offset(p4dp, addr);
pud = READ_ONCE(*pudp);
if (pud_none(pud))
return 0;

if (pud_sect(pud))
return pfn_valid(pud_pfn(pud));

pmdp = pmd_offset(pudp, addr);
pmd = READ_ONCE(*pmdp);
if (pmd_none(pmd))
return 0;

if (pmd_sect(pmd))
return pfn_valid(pmd_pfn(pmd));

ptep = pte_offset_kernel(pmdp, addr);
pte = READ_ONCE(*ptep);
if (pte_none(pte))
return 0;

return pfn_valid(pte_pfn(pte));
}

#ifdef CONFIG_MEMORY_HOTPLUG
static void free_hotplug_page_range(struct page *page, size_t size,
struct vmem_altmap *altmap)
Expand Down
3 changes: 1 addition & 2 deletions arch/arm64/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ void __kernel_map_pages(struct page *page, int numpages, int enable)

/*
* This function is used to determine if a linear map page has been marked as
* not-valid. Walk the page table and check the PTE_VALID bit. This is based
* on kern_addr_valid(), which almost does what we need.
* not-valid. Walk the page table and check the PTE_VALID bit.
*
* Because this is only called on the kernel linear map, p?d_sect() implies
* p?d_present(). When debug_pagealloc is enabled, sections mappings are
Expand Down
3 changes: 0 additions & 3 deletions arch/csky/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,6 @@ extern void paging_init(void);
void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
pte_t *pte);

/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
#define kern_addr_valid(addr) (1)

#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
remap_pfn_range(vma, vaddr, pfn, size, prot)

Expand Down
7 changes: 0 additions & 7 deletions arch/hexagon/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,6 @@ static inline void clear_page(void *page)

#define page_to_virt(page) __va(page_to_phys(page))

/*
* For port to Hexagon Virtual Machine, MAYBE we check for attempts
* to reference reserved HVM space, but in any case, the VM will be
* protected.
*/
#define kern_addr_valid(addr) (1)

#include <asm/mem-layout.h>
#include <asm-generic/memory_model.h>
/* XXX Todo: implement assembly-optimized version of getorder. */
Expand Down
16 changes: 0 additions & 16 deletions arch/ia64/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,22 +181,6 @@ ia64_phys_addr_valid (unsigned long addr)
return (addr & (local_cpu_data->unimpl_pa_mask)) == 0;
}

/*
* kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel
* memory. For the return value to be meaningful, ADDR must be >=
* PAGE_OFFSET. This operation can be relatively expensive (e.g.,
* require a hash-, or multi-level tree-lookup or something of that
* sort) but it guarantees to return TRUE only if accessing the page
* at that address does not cause an error. Note that there may be
* addresses for which kern_addr_valid() returns FALSE even though an
* access would not cause an error (e.g., this is typically true for
* memory mapped I/O regions.
*
* XXX Need to implement this for IA-64.
*/
#define kern_addr_valid(addr) (1)


/*
* Now come the defines and routines to manage and access the three-level
* page table.
Expand Down
2 changes: 0 additions & 2 deletions arch/loongarch/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,6 @@ static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
__update_tlb(vma, address, (pte_t *)pmdp);
}

#define kern_addr_valid(addr) (1)

static inline unsigned long pmd_pfn(pmd_t pmd)
{
return (pmd_val(pmd) & _PFN_MASK) >> _PFN_SHIFT;
Expand Down
28 changes: 27 additions & 1 deletion arch/loongarch/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ static struct page *vdso_pages[] = { NULL };
struct vdso_data *vdso_data = generic_vdso_data.data;
struct vdso_pcpu_data *vdso_pdata = loongarch_vdso_data.vdata.pdata;

static struct page *find_timens_vvar_page(struct vm_area_struct *vma);

static int vdso_mremap(const struct vm_special_mapping *sm, struct vm_area_struct *new_vma)
{
current->mm->context.vdso = (void *)(new_vma->vm_start);
Expand Down Expand Up @@ -139,13 +141,37 @@ int vdso_join_timens(struct task_struct *task, struct time_namespace *ns)

mmap_read_lock(mm);
for_each_vma(vmi, vma) {
unsigned long size = vma->vm_end - vma->vm_start;

if (vma_is_special_mapping(vma, &vdso_info.data_mapping))
zap_vma_pages(vma);
zap_page_range(vma, vma->vm_start, size);
}
mmap_read_unlock(mm);

return 0;
}

static struct page *find_timens_vvar_page(struct vm_area_struct *vma)
{
if (likely(vma->vm_mm == current->mm))
return current->nsproxy->time_ns->vvar_page;

/*
* VM_PFNMAP | VM_IO protect .fault() handler from being called
* through interfaces like /proc/$pid/mem or
* process_vm_{readv,writev}() as long as there's no .access()
* in special_mapping_vmops.
* For more details check_vma_flags() and __access_remote_vm()
*/
WARN(1, "vvar_page accessed remotely");

return NULL;
}
#else
static struct page *find_timens_vvar_page(struct vm_area_struct *vma)
{
return NULL;
}
#endif

static unsigned long vdso_base(void)
Expand Down
2 changes: 0 additions & 2 deletions arch/m68k/include/asm/pgtable_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,

#endif /* !__ASSEMBLY__ */

#define kern_addr_valid(addr) (1)

/* MMU-specific headers */

#ifdef CONFIG_SUN3
Expand Down
1 change: 0 additions & 1 deletion arch/m68k/include/asm/pgtable_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#define pgd_none(pgd) (0)
#define pgd_bad(pgd) (0)
#define pgd_clear(pgdp)
#define kern_addr_valid(addr) (1)
#define pmd_offset(a, b) ((void *)0)

#define PAGE_NONE __pgprot(0)
Expand Down
3 changes: 0 additions & 3 deletions arch/microblaze/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,6 @@ extern unsigned long iopa(unsigned long addr);
#define IOMAP_NOCACHE_NONSER 2
#define IOMAP_NO_COPYBACK 3

/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
#define kern_addr_valid(addr) (1)

void do_page_fault(struct pt_regs *regs, unsigned long address,
unsigned long error_code);

Expand Down
2 changes: 0 additions & 2 deletions arch/mips/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,6 @@ static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
__update_tlb(vma, address, pte);
}

#define kern_addr_valid(addr) (1)

/*
* Allow physical addresses to be fixed up to help 36-bit peripherals.
*/
Expand Down
2 changes: 0 additions & 2 deletions arch/nios2/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
#define __swp_entry_to_pte(swp) ((pte_t) { (swp).val })
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })

#define kern_addr_valid(addr) (1)

extern void __init paging_init(void);
extern void __init mmu_init(void);

Expand Down
2 changes: 0 additions & 2 deletions arch/openrisc/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })

#define kern_addr_valid(addr) (1)

typedef pte_t *pte_addr_t;

#endif /* __ASSEMBLY__ */
Expand Down
15 changes: 0 additions & 15 deletions arch/parisc/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@
#include <asm/processor.h>
#include <asm/cache.h>

/*
* kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel
* memory. For the return value to be meaningful, ADDR must be >=
* PAGE_OFFSET. This operation can be relatively expensive (e.g.,
* require a hash-, or multi-level tree-lookup or something of that
* sort) but it guarantees to return TRUE only if accessing the page
* at that address does not cause an error. Note that there may be
* addresses for which kern_addr_valid() returns FALSE even though an
* access would not cause an error (e.g., this is typically true for
* memory mapped I/O regions.
*
* XXX Need to implement this for parisc.
*/
#define kern_addr_valid(addr) (1)

/* This is for the serialization of PxTLB broadcasts. At least on the N class
* systems, only one PxTLB inter processor broadcast can be active at any one
* time on the Merced bus. */
Expand Down
7 changes: 0 additions & 7 deletions arch/powerpc/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ void poking_init(void);
extern unsigned long ioremap_bot;
extern const pgprot_t protection_map[16];

/*
* kern_addr_valid is intended to indicate whether an address is a valid
* kernel address. Most 32-bit archs define it as always true (like this)
* but most 64-bit archs actually perform a test. What should we do here?
*/
#define kern_addr_valid(addr) (1)

#ifndef CONFIG_TRANSPARENT_HUGEPAGE
#define pmd_large(pmd) 0
#endif
Expand Down
2 changes: 0 additions & 2 deletions arch/riscv/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,6 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,

#endif /* !CONFIG_MMU */

#define kern_addr_valid(addr) (1) /* FIXME */

extern char _start[];
extern void *_dtb_early_va;
extern uintptr_t _dtb_early_pa;
Expand Down
2 changes: 0 additions & 2 deletions arch/riscv/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (C) 2017 SiFive
*/

#define GENERATING_ASM_OFFSETS

#include <linux/kbuild.h>
#include <linux/mm.h>
#include <linux/sched.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/kernel/cpu-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void __cpu_die(unsigned int cpu)
if (cpu_ops[cpu]->cpu_is_stopped)
ret = cpu_ops[cpu]->cpu_is_stopped(cpu);
if (ret)
pr_warn("CPU%d may not have stopped: %d\n", cpu, ret);
pr_warn("CPU%u may not have stopped: %d\n", cpu, ret);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/kernel/efi-header.S
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extra_header_fields:
.long efi_header_end - _start // SizeOfHeaders
.long 0 // CheckSum
.short IMAGE_SUBSYSTEM_EFI_APPLICATION // Subsystem
.short 0 // DllCharacteristics
.short IMAGE_DLL_CHARACTERISTICS_NX_COMPAT // DllCharacteristics
.quad 0 // SizeOfStackReserve
.quad 0 // SizeOfStackCommit
.quad 0 // SizeOfHeapReserve
Expand Down
2 changes: 0 additions & 2 deletions arch/riscv/kernel/traps_misaligned.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@
#define REG_PTR(insn, pos, regs) \
(ulong *)((ulong)(regs) + REG_OFFSET(insn, pos))

#define GET_RM(insn) (((insn) >> 12) & 7)

#define GET_RS1(insn, regs) (*REG_PTR(insn, SH_RS1, regs))
#define GET_RS2(insn, regs) (*REG_PTR(insn, SH_RS2, regs))
#define GET_RS1S(insn, regs) (*REG_PTR(RVC_RS1S(insn), 0, regs))
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/kernel/vdso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o

ccflags-y := -fno-stack-protector
ccflags-y += -DDISABLE_BRANCH_PROFILING
ccflags-y += -fno-builtin

ifneq ($(c-gettimeofday-y),)
CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)
Expand Down
2 changes: 2 additions & 0 deletions arch/s390/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
#include <asm/pci_io.h>

#define xlate_dev_mem_ptr xlate_dev_mem_ptr
#define kc_xlate_dev_mem_ptr xlate_dev_mem_ptr
void *xlate_dev_mem_ptr(phys_addr_t phys);
#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
#define kc_unxlate_dev_mem_ptr unxlate_dev_mem_ptr
void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);

#define IO_SPACE_LIMIT 0
Expand Down
2 changes: 0 additions & 2 deletions arch/s390/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -1776,8 +1776,6 @@ static inline swp_entry_t __swp_entry(unsigned long type, unsigned long offset)
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })

#define kern_addr_valid(addr) (1)

extern int vmem_add_mapping(unsigned long start, unsigned long size);
extern void vmem_remove_mapping(unsigned long start, unsigned long size);
extern int __vmem_map_4k_page(unsigned long addr, unsigned long phys, pgprot_t prot, bool alloc);
Expand Down
2 changes: 0 additions & 2 deletions arch/sh/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ static inline unsigned long phys_addr_mask(void)

typedef pte_t *pte_addr_t;

#define kern_addr_valid(addr) (1)

#define pte_pfn(x) ((unsigned long)(((x).pte_low >> PAGE_SHIFT)))

struct vm_area_struct;
Expand Down
Loading

0 comments on commit 60a0c7e

Please sign in to comment.