Skip to content

Commit

Permalink
Merge branch 'akpm' (patches from Andrew)
Browse files Browse the repository at this point in the history
Merge yet more updates from Andrew Morton:

 - Almost all of the rest of MM (memcg, slab-generic, slab, pagealloc,
   gup, hugetlb, pagemap, memremap)

 - Various other things (hfs, ocfs2, kmod, misc, seqfile)

* akpm: (34 commits)
  ipc/util.c: sysvipc_find_ipc() should increase position index
  kernel/gcov/fs.c: gcov_seq_next() should increase position index
  fs/seq_file.c: seq_read(): add info message about buggy .next functions
  drivers/dma/tegra20-apb-dma.c: fix platform_get_irq.cocci warnings
  change email address for Pali Rohár
  selftests: kmod: test disabling module autoloading
  selftests: kmod: fix handling test numbers above 9
  docs: admin-guide: document the kernel.modprobe sysctl
  fs/filesystems.c: downgrade user-reachable WARN_ONCE() to pr_warn_once()
  kmod: make request_module() return an error when autoloading is disabled
  mm/memremap: set caching mode for PCI P2PDMA memory to WC
  mm/memory_hotplug: add pgprot_t to mhp_params
  powerpc/mm: thread pgprot_t through create_section_mapping()
  x86/mm: introduce __set_memory_prot()
  x86/mm: thread pgprot_t through init_memory_mapping()
  mm/memory_hotplug: rename mhp_restrictions to mhp_params
  mm/memory_hotplug: drop the flags field from struct mhp_restrictions
  mm/special: create generic fallbacks for pte_special() and pte_mkspecial()
  mm/vma: introduce VM_ACCESS_FLAGS
  mm/vma: define a default value for VM_DATA_DEFAULT_FLAGS
  ...
  • Loading branch information
torvalds committed Apr 11, 2020
2 parents ca6151a + 89163f9 commit 5b8b9d0
Show file tree
Hide file tree
Showing 130 changed files with 706 additions and 366 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Oleksij Rempel <[email protected]> <[email protected]>
Oleksij Rempel <[email protected]> <[email protected]>
Oleksij Rempel <[email protected]> <[email protected]>
Oleksij Rempel <[email protected]> <[email protected]>
Pali Rohár <[email protected]> <[email protected]>
Paolo 'Blaisorblade' Giarrusso <[email protected]>
Patrick Mochel <[email protected]>
Paul Burton <[email protected]> <[email protected]>
Expand Down
8 changes: 4 additions & 4 deletions Documentation/ABI/testing/sysfs-platform-dell-laptop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ What: /sys/class/leds/dell::kbd_backlight/als_enabled
Date: December 2014
KernelVersion: 3.19
Contact: Gabriele Mazzotta <[email protected]>,
Pali Rohár <pali[email protected]>
Pali Rohár <pali@kernel.org>
Description:
This file allows to control the automatic keyboard
illumination mode on some systems that have an ambient
Expand All @@ -13,7 +13,7 @@ What: /sys/class/leds/dell::kbd_backlight/als_setting
Date: December 2014
KernelVersion: 3.19
Contact: Gabriele Mazzotta <[email protected]>,
Pali Rohár <pali[email protected]>
Pali Rohár <pali@kernel.org>
Description:
This file allows to specifiy the on/off threshold value,
as reported by the ambient light sensor.
Expand All @@ -22,7 +22,7 @@ What: /sys/class/leds/dell::kbd_backlight/start_triggers
Date: December 2014
KernelVersion: 3.19
Contact: Gabriele Mazzotta <[email protected]>,
Pali Rohár <pali[email protected]>
Pali Rohár <pali@kernel.org>
Description:
This file allows to control the input triggers that
turn on the keyboard backlight illumination that is
Expand All @@ -45,7 +45,7 @@ What: /sys/class/leds/dell::kbd_backlight/stop_timeout
Date: December 2014
KernelVersion: 3.19
Contact: Gabriele Mazzotta <[email protected]>,
Pali Rohár <pali[email protected]>
Pali Rohár <pali@kernel.org>
Description:
This file allows to specify the interval after which the
keyboard illumination is disabled because of inactivity.
Expand Down
8 changes: 8 additions & 0 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,14 @@
hpet_mmap= [X86, HPET_MMAP] Allow userspace to mmap HPET
registers. Default set by CONFIG_HPET_MMAP_DEFAULT.

hugetlb_cma= [HW] The size of a cma area used for allocation
of gigantic hugepages.
Format: nn[KMGTPE]

Reserve a cma area of given size and allocate gigantic
hugepages using the cma allocator. If enabled, the
boot-time allocation of gigantic hugepages is skipped.

hugepages= [HW,X86-32,IA-64] HugeTLB pages to allocate at boot.
hugepagesz= [HW,IA-64,PPC,X86-64] The size of the HugeTLB pages.
On x86-64 and powerpc, this option can be specified
Expand Down
21 changes: 21 additions & 0 deletions Documentation/admin-guide/sysctl/kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,27 @@ Notes:
successful IPC object allocation. If an IPC object allocation syscall
fails, it is undefined if the value remains unmodified or is reset to -1.

modprobe:
=========

The path to the usermode helper for autoloading kernel modules, by
default "/sbin/modprobe". This binary is executed when the kernel
requests a module. For example, if userspace passes an unknown
filesystem type to mount(), then the kernel will automatically request
the corresponding filesystem module by executing this usermode helper.
This usermode helper should insert the needed module into the kernel.

This sysctl only affects module autoloading. It has no effect on the
ability to explicitly insert modules.

If this sysctl is set to the empty string, then module autoloading is
completely disabled. The kernel will not try to execute a usermode
helper at all, nor will it call the kernel_module_request LSM hook.

If CONFIG_STATIC_USERMODEHELPER=y is set in the kernel configuration,
then the configured static usermode helper overrides this sysctl,
except that the empty string is still accepted to completely disable
module autoloading as described above.

nmi_watchdog
============
Expand Down
16 changes: 8 additions & 8 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ L: [email protected]
F: arch/alpha/

ALPS PS/2 TOUCHPAD DRIVER
R: Pali Rohár <pali[email protected]>
R: Pali Rohár <pali@kernel.org>
F: drivers/input/mouse/alps.*

ALTERA I2C CONTROLLER DRIVER
Expand Down Expand Up @@ -4774,23 +4774,23 @@ F: drivers/net/fddi/defza.*

DELL LAPTOP DRIVER
M: Matthew Garrett <[email protected]>
M: Pali Rohár <pali[email protected]>
M: Pali Rohár <pali@kernel.org>
L: [email protected]
S: Maintained
F: drivers/platform/x86/dell-laptop.c

DELL LAPTOP FREEFALL DRIVER
M: Pali Rohár <pali[email protected]>
M: Pali Rohár <pali@kernel.org>
S: Maintained
F: drivers/platform/x86/dell-smo8800.c

DELL LAPTOP RBTN DRIVER
M: Pali Rohár <pali[email protected]>
M: Pali Rohár <pali@kernel.org>
S: Maintained
F: drivers/platform/x86/dell-rbtn.*

DELL LAPTOP SMM DRIVER
M: Pali Rohár <pali[email protected]>
M: Pali Rohár <pali@kernel.org>
S: Maintained
F: drivers/hwmon/dell-smm-hwmon.c
F: include/uapi/linux/i8k.h
Expand All @@ -4802,7 +4802,7 @@ S: Maintained
F: drivers/platform/x86/dell_rbu.c

DELL SMBIOS DRIVER
M: Pali Rohár <pali[email protected]>
M: Pali Rohár <pali@kernel.org>
M: Mario Limonciello <[email protected]>
L: [email protected]
S: Maintained
Expand Down Expand Up @@ -4835,7 +4835,7 @@ F: drivers/platform/x86/dell-wmi-descriptor.c

DELL WMI NOTIFICATIONS DRIVER
M: Matthew Garrett <[email protected]>
M: Pali Rohár <pali[email protected]>
M: Pali Rohár <pali@kernel.org>
S: Maintained
F: drivers/platform/x86/dell-wmi.c

Expand Down Expand Up @@ -11950,7 +11950,7 @@ F: drivers/media/i2c/et8ek8
F: drivers/media/i2c/ad5820.c

NOKIA N900 POWER SUPPLY DRIVERS
R: Pali Rohár <pali[email protected]>
R: Pali Rohár <pali@kernel.org>
F: include/linux/power/bq2415x_charger.h
F: include/linux/power/bq27xxx_battery.h
F: drivers/power/supply/bq2415x_charger.c
Expand Down
3 changes: 0 additions & 3 deletions arch/alpha/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ typedef struct page *pgtable_t;
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
#endif /* CONFIG_DISCONTIGMEM */

#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)

#include <asm-generic/memory_model.h>
#include <asm-generic/getorder.h>

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 @@ -268,15 +268,13 @@ extern inline void pud_clear(pud_t * pudp) { pud_val(*pudp) = 0; }
extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); }
extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
extern inline int pte_special(pte_t pte) { return 0; }

extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; }
extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~(__DIRTY_BITS); return pte; }
extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~(__ACCESS_BITS); return pte; }
extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_FOW; return pte; }
extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= __DIRTY_BITS; return pte; }
extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; return pte; }
extern inline pte_t pte_mkspecial(pte_t pte) { return pte; }

#define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address))

Expand Down
2 changes: 1 addition & 1 deletion arch/arc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ typedef pte_t * pgtable_t;
#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))

/* Default Permissions for stack/heaps pages (Non Executable) */
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC

#define WANT_PAGE_VIRTUAL 1

Expand Down
4 changes: 1 addition & 3 deletions arch/arm/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ extern int pfn_valid(unsigned long);

#endif /* !__ASSEMBLY__ */

#define VM_DATA_DEFAULT_FLAGS \
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC

#include <asm-generic/getorder.h>

Expand Down
2 changes: 0 additions & 2 deletions arch/arm/include/asm/pgtable-2level.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
#define pmd_addr_end(addr,end) (end)

#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext)
#define pte_special(pte) (0)
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }

/*
* We don't have huge page support for short descriptors, for the moment
Expand Down
15 changes: 2 additions & 13 deletions arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,19 +243,8 @@ static inline void __sync_icache_dcache(pte_t pteval)
extern void __sync_icache_dcache(pte_t pteval);
#endif

static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval)
{
unsigned long ext = 0;

if (addr < TASK_SIZE && pte_valid_user(pteval)) {
if (!pte_special(pteval))
__sync_icache_dcache(pteval);
ext |= PTE_EXT_NG;
}

set_pte_ext(ptep, pteval, ext);
}
void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval);

static inline pte_t clear_pte_bit(pte_t pte, pgprot_t prot)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/omap-secure.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (C) 2011 Texas Instruments, Inc.
* Santosh Shilimkar <[email protected]>
* Copyright (C) 2012 Ivaylo Dimitrov <[email protected]>
* Copyright (C) 2013 Pali Rohár <pali[email protected]>
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
*/

#include <linux/arm-smccc.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/omap-secure.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (C) 2011 Texas Instruments, Inc.
* Santosh Shilimkar <[email protected]>
* Copyright (C) 2012 Ivaylo Dimitrov <[email protected]>
* Copyright (C) 2013 Pali Rohár <pali[email protected]>
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
*/
#ifndef OMAP_ARCH_OMAP_SECURE_H
#define OMAP_ARCH_OMAP_SECURE_H
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/omap-smc.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Written by Santosh Shilimkar <[email protected]>
*
* Copyright (C) 2012 Ivaylo Dimitrov <[email protected]>
* Copyright (C) 2013 Pali Rohár <pali[email protected]>
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
*/

#include <linux/linkage.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
*/
static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
{
unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
unsigned int mask = VM_ACCESS_FLAGS;

if ((fsr & FSR_WRITE) && !(fsr & FSR_CM))
mask = VM_WRITE;
Expand Down
14 changes: 14 additions & 0 deletions arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1646,3 +1646,17 @@ void __init early_mm_init(const struct machine_desc *mdesc)
build_mem_type_table();
early_paging_init(mdesc);
}

void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval)
{
unsigned long ext = 0;

if (addr < TASK_SIZE && pte_valid_user(pteval)) {
if (!pte_special(pteval))
__sync_icache_dcache(pteval);
ext |= PTE_EXT_NG;
}

set_pte_ext(ptep, pteval, ext);
}
4 changes: 1 addition & 3 deletions arch/arm64/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ extern int pfn_valid(unsigned long);

#endif /* !__ASSEMBLY__ */

#define VM_DATA_DEFAULT_FLAGS \
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC

#include <asm-generic/getorder.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
const struct fault_info *inf;
struct mm_struct *mm = current->mm;
vm_fault_t fault, major = 0;
unsigned long vm_flags = VM_READ | VM_WRITE | VM_EXEC;
unsigned long vm_flags = VM_ACCESS_FLAGS;
unsigned int mm_flags = FAULT_FLAG_DEFAULT;

if (kprobe_page_fault(regs, esr))
Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/mm.h>
#include <linux/kexec.h>
#include <linux/crash_dump.h>
#include <linux/hugetlb.h>

#include <asm/boot.h>
#include <asm/fixmap.h>
Expand Down Expand Up @@ -457,6 +458,11 @@ void __init arm64_memblock_init(void)
high_memory = __va(memblock_end_of_DRAM() - 1) + 1;

dma_contiguous_reserve(arm64_dma32_phys_limit);

#ifdef CONFIG_ARM64_4K_PAGES
hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT);
#endif

}

void __init bootmem_init(void)
Expand Down
7 changes: 4 additions & 3 deletions arch/arm64/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,20 +1374,21 @@ static void __remove_pgd_mapping(pgd_t *pgdir, unsigned long start, u64 size)
}

int arch_add_memory(int nid, u64 start, u64 size,
struct mhp_restrictions *restrictions)
struct mhp_params *params)
{
int ret, flags = 0;

if (rodata_full || debug_pagealloc_enabled())
flags = NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS;

__create_pgd_mapping(swapper_pg_dir, start, __phys_to_virt(start),
size, PAGE_KERNEL, __pgd_pgtable_alloc, flags);
size, params->pgprot, __pgd_pgtable_alloc,
flags);

memblock_clear_nomap(start, size);

ret = __add_pages(nid, start >> PAGE_SHIFT, size >> PAGE_SHIFT,
restrictions);
params);
if (ret)
__remove_pgd_mapping(swapper_pg_dir,
__phys_to_virt(start), size);
Expand Down
5 changes: 1 addition & 4 deletions arch/c6x/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#ifndef _ASM_C6X_PAGE_H
#define _ASM_C6X_PAGE_H

#define VM_DATA_DEFAULT_FLAGS \
(VM_READ | VM_WRITE | \
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC

#include <asm-generic/page.h>

Expand Down
3 changes: 0 additions & 3 deletions arch/csky/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ extern unsigned long va_pa_offset;
PHYS_OFFSET_OFFSET)
#define virt_to_page(x) (mem_map + MAP_NR(x))

#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)

#define pfn_to_kaddr(x) __va(PFN_PHYS(x))

#include <asm-generic/memory_model.h>
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 @@ -110,9 +110,6 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
extern void load_pgd(unsigned long pg_dir);
extern pte_t invalid_pte_table[PTRS_PER_PTE];

static inline int pte_special(pte_t pte) { return 0; }
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }

static inline void set_pte(pte_t *p, pte_t pte)
{
*p = pte;
Expand Down
2 changes: 0 additions & 2 deletions arch/h8300/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include <linux/types.h>

#define MAP_NR(addr) (((uintptr_t)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)

#ifndef __ASSEMBLY__
extern unsigned long rom_length;
Expand Down
3 changes: 1 addition & 2 deletions arch/hexagon/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ struct page;
#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(__pa(kaddr)))

/* Default vm area behavior is non-executable. */
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC

#define pfn_valid(pfn) ((pfn) < max_mapnr)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
Expand Down
Loading

0 comments on commit 5b8b9d0

Please sign in to comment.