Skip to content

Commit c4cf498

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: "155 patches. Subsystems affected by this patch series: mm (dax, debug, thp, readahead, page-poison, util, memory-hotplug, zram, cleanups), misc, core-kernel, get_maintainer, MAINTAINERS, lib, bitops, checkpatch, binfmt, ramfs, autofs, nilfs, rapidio, panic, relay, kgdb, ubsan, romfs, and fault-injection" * emailed patches from Andrew Morton <[email protected]>: (155 commits) lib, uaccess: add failure injection to usercopy functions lib, include/linux: add usercopy failure capability ROMFS: support inode blocks calculation ubsan: introduce CONFIG_UBSAN_LOCAL_BOUNDS for Clang sched.h: drop in_ubsan field when UBSAN is in trap mode scripts/gdb/tasks: add headers and improve spacing format scripts/gdb/proc: add struct mount & struct super_block addr in lx-mounts command kernel/relay.c: drop unneeded initialization panic: dump registers on panic_on_warn rapidio: fix the missed put_device() for rio_mport_add_riodev rapidio: fix error handling path nilfs2: fix some kernel-doc warnings for nilfs2 autofs: harden ioctl table ramfs: fix nommu mmap with gaps in the page cache mm: remove the now-unnecessary mmget_still_valid() hack mm/gup: take mmap_lock in get_dump_page() binfmt_elf, binfmt_elf_fdpic: use a VMA list snapshot coredump: rework elf/elf_fdpic vma_dump_size() into common helper coredump: refactor page range dumping into common helper coredump: let dump_emit() bail out on short writes ...
2 parents 9ff9b0d + 4d0e9df commit c4cf498

File tree

161 files changed

+2390
-1724
lines changed

Some content is hidden

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

161 files changed

+2390
-1724
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ James Ketrenos <jketreno@io.(none)>
133133
134134
135135
136+
136137
137138
138139

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,7 @@
13431343
current integrity status.
13441344

13451345
failslab=
1346+
fail_usercopy=
13461347
fail_page_alloc=
13471348
fail_make_request=[KNL]
13481349
General fault injection mechanism.

Documentation/core-api/xarray.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -475,13 +475,15 @@ or iterations will move the index to the first index in the range.
475475
Each entry will only be returned once, no matter how many indices it
476476
occupies.
477477

478-
Using xas_next() or xas_prev() with a multi-index xa_state
479-
is not supported. Using either of these functions on a multi-index entry
480-
will reveal sibling entries; these should be skipped over by the caller.
481-
482-
Storing ``NULL`` into any index of a multi-index entry will set the entry
483-
at every index to ``NULL`` and dissolve the tie. Splitting a multi-index
484-
entry into entries occupying smaller ranges is not yet supported.
478+
Using xas_next() or xas_prev() with a multi-index xa_state is not
479+
supported. Using either of these functions on a multi-index entry will
480+
reveal sibling entries; these should be skipped over by the caller.
481+
482+
Storing ``NULL`` into any index of a multi-index entry will set the
483+
entry at every index to ``NULL`` and dissolve the tie. A multi-index
484+
entry can be split into entries occupying smaller ranges by calling
485+
xas_split_alloc() without the xa_lock held, followed by taking the lock
486+
and calling xas_split().
485487

486488
Functions and structures
487489
========================

Documentation/fault-injection/fault-injection.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Available fault injection capabilities
1616

1717
injects page allocation failures. (alloc_pages(), get_free_pages(), ...)
1818

19+
- fail_usercopy
20+
21+
injects failures in user memory access functions. (copy_from_user(), get_user(), ...)
22+
1923
- fail_futex
2024

2125
injects futex deadlock and uaddr fault errors.
@@ -177,6 +181,7 @@ use the boot option::
177181

178182
failslab=
179183
fail_page_alloc=
184+
fail_usercopy=
180185
fail_make_request=
181186
fail_futex=
182187
mmc_core.fail_request=<interval>,<probability>,<space>,<times>
@@ -222,7 +227,7 @@ How to add new fault injection capability
222227

223228
- debugfs entries
224229

225-
failslab, fail_page_alloc, and fail_make_request use this way.
230+
failslab, fail_page_alloc, fail_usercopy, and fail_make_request use this way.
226231
Helper functions:
227232

228233
fault_create_debugfs_attr(name, parent, attr);

MAINTAINERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9715,7 +9715,7 @@ F: security/keys/encrypted-keys/
97159715

97169716
KEYS-TRUSTED
97179717
M: James Bottomley <[email protected]>
9718-
M: Jarkko Sakkinen <jarkko[email protected]>
9718+
M: Jarkko Sakkinen <jarkko@kernel.org>
97199719
M: Mimi Zohar <[email protected]>
97209720
97219721
@@ -9727,7 +9727,7 @@ F: security/keys/trusted-keys/
97279727

97289728
KEYS/KEYRINGS
97299729
M: David Howells <[email protected]>
9730-
M: Jarkko Sakkinen <jarkko[email protected]>
9730+
M: Jarkko Sakkinen <jarkko@kernel.org>
97319731
97329732
S: Maintained
97339733
F: Documentation/security/keys/core.rst
@@ -17717,7 +17717,7 @@ F: drivers/platform/x86/toshiba-wmi.c
1771717717

1771817718
TPM DEVICE DRIVER
1771917719
M: Peter Huewe <[email protected]>
17720-
M: Jarkko Sakkinen <jarkko[email protected]>
17720+
M: Jarkko Sakkinen <jarkko@kernel.org>
1772117721
R: Jason Gunthorpe <[email protected]>
1772217722
1772317723
S: Maintained

arch/ia64/mm/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ virtual_memmap_init(u64 start, u64 end, void *arg)
537537
if (map_start < map_end)
538538
memmap_init_zone((unsigned long)(map_end - map_start),
539539
args->nid, args->zone, page_to_pfn(map_start),
540-
MEMINIT_EARLY, NULL);
540+
MEMINIT_EARLY, NULL, MIGRATE_MOVABLE);
541541
return 0;
542542
}
543543

@@ -547,7 +547,7 @@ memmap_init (unsigned long size, int nid, unsigned long zone,
547547
{
548548
if (!vmem_map) {
549549
memmap_init_zone(size, nid, zone, start_pfn,
550-
MEMINIT_EARLY, NULL);
550+
MEMINIT_EARLY, NULL, MIGRATE_MOVABLE);
551551
} else {
552552
struct page *start;
553553
struct memmap_init_callback_data args;

arch/powerpc/include/asm/book3s/64/pgtable.h

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
615615
VM_BUG_ON(pfn >> (64 - PAGE_SHIFT));
616616
VM_BUG_ON((pfn << PAGE_SHIFT) & ~PTE_RPN_MASK);
617617

618-
return __pte(((pte_basic_t)pfn << PAGE_SHIFT) | pgprot_val(pgprot));
618+
return __pte(((pte_basic_t)pfn << PAGE_SHIFT) | pgprot_val(pgprot) | _PAGE_PTE);
619619
}
620620

621621
static inline unsigned long pte_pfn(pte_t pte)
@@ -651,11 +651,6 @@ static inline pte_t pte_mkexec(pte_t pte)
651651
return __pte_raw(pte_raw(pte) | cpu_to_be64(_PAGE_EXEC));
652652
}
653653

654-
static inline pte_t pte_mkpte(pte_t pte)
655-
{
656-
return __pte_raw(pte_raw(pte) | cpu_to_be64(_PAGE_PTE));
657-
}
658-
659654
static inline pte_t pte_mkwrite(pte_t pte)
660655
{
661656
/*
@@ -819,6 +814,14 @@ static inline int pte_none(pte_t pte)
819814
static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
820815
pte_t *ptep, pte_t pte, int percpu)
821816
{
817+
818+
VM_WARN_ON(!(pte_raw(pte) & cpu_to_be64(_PAGE_PTE)));
819+
/*
820+
* Keep the _PAGE_PTE added till we are sure we handle _PAGE_PTE
821+
* in all the callers.
822+
*/
823+
pte = __pte_raw(pte_raw(pte) | cpu_to_be64(_PAGE_PTE));
824+
822825
if (radix_enabled())
823826
return radix__set_pte_at(mm, addr, ptep, pte, percpu);
824827
return hash__set_pte_at(mm, addr, ptep, pte, percpu);
@@ -866,6 +869,13 @@ static inline bool pte_ci(pte_t pte)
866869

867870
static inline void pmd_clear(pmd_t *pmdp)
868871
{
872+
if (IS_ENABLED(CONFIG_DEBUG_VM) && !radix_enabled()) {
873+
/*
874+
* Don't use this if we can possibly have a hash page table
875+
* entry mapping this.
876+
*/
877+
WARN_ON((pmd_val(*pmdp) & (H_PAGE_HASHPTE | _PAGE_PTE)) == (H_PAGE_HASHPTE | _PAGE_PTE));
878+
}
869879
*pmdp = __pmd(0);
870880
}
871881

@@ -914,6 +924,13 @@ static inline int pmd_bad(pmd_t pmd)
914924

915925
static inline void pud_clear(pud_t *pudp)
916926
{
927+
if (IS_ENABLED(CONFIG_DEBUG_VM) && !radix_enabled()) {
928+
/*
929+
* Don't use this if we can possibly have a hash page table
930+
* entry mapping this.
931+
*/
932+
WARN_ON((pud_val(*pudp) & (H_PAGE_HASHPTE | _PAGE_PTE)) == (H_PAGE_HASHPTE | _PAGE_PTE));
933+
}
917934
*pudp = __pud(0);
918935
}
919936

arch/powerpc/include/asm/nohash/pgtable.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ static inline pte_t pte_mkold(pte_t pte)
140140
return __pte(pte_val(pte) & ~_PAGE_ACCESSED);
141141
}
142142

143-
static inline pte_t pte_mkpte(pte_t pte)
144-
{
145-
return pte;
146-
}
147-
148143
static inline pte_t pte_mkspecial(pte_t pte)
149144
{
150145
return __pte(pte_val(pte) | _PAGE_SPECIAL);

arch/powerpc/mm/pgtable.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,6 @@ void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
184184
*/
185185
VM_WARN_ON(pte_hw_valid(*ptep) && !pte_protnone(*ptep));
186186

187-
/* Add the pte bit when trying to set a pte */
188-
pte = pte_mkpte(pte);
189-
190187
/* Note: mm->context.id might not yet have been assigned as
191188
* this context might not have been activated yet when this
192189
* is called.
@@ -275,8 +272,6 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_
275272
*/
276273
VM_WARN_ON(pte_hw_valid(*ptep) && !pte_protnone(*ptep));
277274

278-
pte = pte_mkpte(pte);
279-
280275
pte = set_pte_filter(pte);
281276

282277
val = pte_val(pte);

arch/powerpc/platforms/powernv/memtrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static int memtrace_online(void)
224224
ent->mem = 0;
225225
}
226226

227-
if (add_memory(ent->nid, ent->start, ent->size)) {
227+
if (add_memory(ent->nid, ent->start, ent->size, MHP_NONE)) {
228228
pr_err("Failed to add trace memory to node %d\n",
229229
ent->nid);
230230
ret += 1;

0 commit comments

Comments
 (0)