Commit e30cbb5
committed
fix: avoid page_table_check BUG on time namespace VVAR page
Backport a kernel patch to stop page_table_check from tracking special
(PFN-mapped) PTEs.
The vDSO "[vvar]" mapping is VM_PFNMAP and its pages are installed with
vmf_insert_pfn(), producing special PTEs. pte_user_accessible_page() on
x86/arm64 does not exclude special PTEs, so page_table_check accounts
these PFN mappings. The time-namespace VVAR page is a real alloc_page()
that is freed in free_time_ns() when the last task in a time namespace
exits; the unbalanced accounting leaves a non-zero map count and trips
the BUG_ON() in __page_table_check_zero():
kernel BUG at mm/page_table_check.c:143!
__page_table_check_zero / __free_frozen_pages / free_time_ns /
free_nsproxy / do_exit
This is hit under heavy container/CI churn (CLONE_NEWTIME via runc /
docker-init / tini) on both amd64 and arm64, since the Talos kernel
enables CONFIG_PAGE_TABLE_CHECK. Mainline sidesteps it in v7.0 by
switching the mapping to VM_MIXEDMAP + vmf_insert_page(), but 6.18.y
still uses the PFNMAP path.
See: siderolabs/talos#13496
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>1 parent f2850d1 commit e30cbb5
2 files changed
Lines changed: 81 additions & 0 deletions
File tree
- kernel/build/patches
Lines changed: 79 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
0 commit comments