History

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton: "10 patches. Subsystems affected by this patch series: ipc, MAINTAINERS, and mm (vmscan, debug, pagemap, kmemleak, and selftests)" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: kselftest/vm: revert "tools/testing/selftests/vm/userfaultfd.c: use swap() to make code cleaner" MAINTAINERS: update rppt's email mm/kmemleak: avoid scanning potential huge holes ipc/sem: do not sleep with a spin lock held mm/pgtable: define pte_index so that preprocessor could recognize it mm/page_table_check: check entries at pmd levels mm/khugepaged: unify collapse pmd clear, flush and free mm/page_table_check: use unsigned long for page counters and cleanup mm/debug_vm_pgtable: remove pte entry from the page table Revert "mm/page_isolation: unset migratetype directly for non Buddy page"

Linus Torvalds committed 4 years ago

Commit f9aaa5b2 parents cff7f22 07d250510 files · +88 −56Browse files

Showing the changes to include (2 of 10 files). Show all

Unified · Split

2 files
  1. include/linux/page_table_check.h +19 −0
  2. include/linux/pgtable.h +1 −0
include/linux/page_table_check.h+19−0
@@ -26,6 +26,9 @@ void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, · 25 unmodified lines
26 pmd_t *pmdp, pmd_t pmd);26 pmd_t *pmdp, pmd_t pmd);
27void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr,27void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr,
28 pud_t *pudp, pud_t pud);28 pud_t *pudp, pud_t pud);
29void __page_table_check_pte_clear_range(struct mm_struct *mm,
30 unsigned long addr,
31 pmd_t pmd);
29 32
30static inline void page_table_check_alloc(struct page *page, unsigned int order)33static inline void page_table_check_alloc(struct page *page, unsigned int order)
31{34{
@@ -100,6 +103,16 @@ static inline void page_table_check_pud_set(struct mm_struct *mm, · 68 unmodified lines
100 __page_table_check_pud_set(mm, addr, pudp, pud);103 __page_table_check_pud_set(mm, addr, pudp, pud);
101}104}
102 105
106static inline void page_table_check_pte_clear_range(struct mm_struct *mm,
107 unsigned long addr,
108 pmd_t pmd)
109{
110 if (static_branch_likely(&page_table_check_disabled))
111 return;
112
113 __page_table_check_pte_clear_range(mm, addr, pmd);
114}
115
103#else116#else
104 117
105static inline void page_table_check_alloc(struct page *page, unsigned int order)118static inline void page_table_check_alloc(struct page *page, unsigned int order)
@@ -143,5 +156,11 @@ static inline void page_table_check_pud_set(struct mm_struct *mm, · 37 unmodified lines
143{156{
144}157}
145 158
159static inline void page_table_check_pte_clear_range(struct mm_struct *mm,
160 unsigned long addr,
161 pmd_t pmd)
162{
163}
164
146#endif /* CONFIG_PAGE_TABLE_CHECK */165#endif /* CONFIG_PAGE_TABLE_CHECK */
147#endif /* __LINUX_PAGE_TABLE_CHECK_H */166#endif /* __LINUX_PAGE_TABLE_CHECK_H */
include/linux/pgtable.h+1−0
@@ -62,6 +62,7 @@ static inline unsigned long pte_index(unsigned long address) · 61 unmodified lines
62{62{
63 return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);63 return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
64}64}
65#define pte_index pte_index
65 66
66#ifndef pmd_index67#ifndef pmd_index
67static inline unsigned long pmd_index(unsigned long address)68static inline unsigned long pmd_index(unsigned long address)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t