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
2626 pmd_t *pmdp, pmd_t pmd);
2727 void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr,
2828 pud_t *pudp, pud_t pud);
29+void __page_table_check_pte_clear_range(struct mm_struct *mm,
30+ unsigned long addr,
31+ pmd_t pmd);
2932
3033 static inline void page_table_check_alloc(struct page *page, unsigned int order)
3134 {
@@ -100,6 +103,16 @@ static inline void page_table_check_pud_set(struct mm_struct *mm, · 68 unmodified lines
100103 __page_table_check_pud_set(mm, addr, pudp, pud);
101104 }
102105
106+static 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+
103116 #else
104117
105118 static 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
143156 {
144157 }
145158
159+static inline void page_table_check_pte_clear_range(struct mm_struct *mm,
160+ unsigned long addr,
161+ pmd_t pmd)
162+{
163+}
164+
146165 #endif /* CONFIG_PAGE_TABLE_CHECK */
147166 #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
6262 {
6363 return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
6464 }
65+#define pte_index pte_index
6566
6667 #ifndef pmd_index
6768 static 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