{"api_version":"1","generated_at":"2026-12-01T13:13:06+00:00","cve":"CVE-2026-100032","urls":{"html":"https://cve.report/CVE-2026-100032","api":"https://cve.report/api/cve/CVE-2026-100032.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-100032","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-100032"},"summary":{"title":"alpha: do not skip TLB shootdown IPIs for kthread-borrowed mms","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nalpha: do not skip TLB shootdown IPIs for kthread-borrowed mms\n\nflush_tlb_mm(), flush_tlb_page() and flush_icache_user_page() skip the\nshootdown IPI when mm_users <= 1, on the assumption that no other CPU can\nbe running the mm. A task that borrows an mm through kthread_use_mm()\ntakes mmgrab() rather than mmget(), so it never appears in mm_users, and\nkthread_use_mm() may be handed an mm that is already the caller's\nactive_mm and loaded on that CPU. Such a CPU was not only left without\nan IPI, its mm->context[cpu] was cleared from under it.\n\nmm->context[cpu] is already the record of which CPUs hold an ASN for the\nmm. Test it rather than clearing it: take the shortcut only when no\nother CPU has one, and otherwise fall through to the IPI, which\ninvalidates those CPUs properly. A CPU that merely ran the mm in the\npast also holds a context and now costs an IPI, which errs in the safe\ndirection.\n\nChange ipi_flush_tlb_mm(), ipi_flush_icache_page() and the migration\ncallback ipi_flush_mm_and_page() to test current->mm, like\nipi_flush_tlb_page(). A CPU that only retains the mm lazily then clears\nits own slot through flush_tlb_other(), rather than publishing a new ASN\non every IPI or migration rendezvous. The migration callback still does\nits per-VA tbi() afterwards. Returning to the mm allocates a fresh ASN\nthrough ev5_switch_mm(), or through the direct-load path when\nkthread_use_mm() switches current's mm.\n\nOnce these historical slots are gone, the shortcut is available again\nif mm_users remains at most one and no other CPU has taken or kept a\ncontext. An explicit kthread_use_mm() borrower has current->mm set and\nstill receives the invalidate it needs.\n\nThe caller-side tests in flush_tlb_mm() and flush_icache_user_page()\nremain current->active_mm. A kernel thread that flushes its lazily held\nmm can therefore publish its own context slot. Those branches also\nperform the shortcut check, which excludes the calling CPU's slot, so\nleave them unchanged. This is distinct from a remote lazy CPU keeping\nits slot populated through repeated callbacks.\n\nTogether with the preceding patch, dropping these clearing loops leaves\nevery runtime write to mm->context[] targeting the writing CPU's own slot,\nso the array becomes a lockless publication of which CPUs may be using the\nmm, with a single writer per slot. Mark the two stores that are now\nobserved from other CPUs; flush_tlb_other() already uses WRITE_ONCE().\nThe uniprocessor flush_icache_user_page() is left alone, as nothing reads\nanother CPU's slot there, and init_new_context() runs before the mm is\nshared.\n\nOrder the slot reads after the page-table changes with smp_mb(). On the\npublishing CPU, the store in ev5_switch_mm() precedes the mb() in Alpha's\narch_spin_unlock(), when finish_lock_switch() drops the rq lock. This\nrelies on Alpha's unlock implementation, not a generic scheduler promise\nof a full barrier on unlock; document that reliance at the store. Also\nissue smp_mb() after publishing in __load_new_mm_context(), before loading\nand using the mm.\n\nThis covers every caller, including check_mmu_context(), which can\npublish a replacement after finish_lock_switch() has already run.\n\nThis requires the preceding removal of remote slot clearing from\nmigrate_flush_tlb_page(). It also requires the stale-TLB series to set\nneed_new_asn on both the reused and newly allocated ASN paths. Otherwise\nan IPI between finish_lock_switch() and check_mmu_context() can zero a\nnew slot while asn_lock is set, and the task can return to user space\nwith a live ASN that the shortcut cannot see.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:18","updated_at":"2026-12-01 06:17:19"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/1ded6b545bade7167471e2b3f2d4fe0c6489cd6e","name":"https://git.kernel.org/stable/c/1ded6b545bade7167471e2b3f2d4fe0c6489cd6e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/643c1e5912592d14de28643f0d30fdef5a85bd23","name":"https://git.kernel.org/stable/c/643c1e5912592d14de28643f0d30fdef5a85bd23","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/398aee3dd326d709801c8b530c30cbe6ee7dafb9","name":"https://git.kernel.org/stable/c/398aee3dd326d709801c8b530c30cbe6ee7dafb9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fe221b7b2d3ecd042dd391f74ff6a6fdeb7c2038","name":"https://git.kernel.org/stable/c/fe221b7b2d3ecd042dd391f74ff6a6fdeb7c2038","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5cb3129c30e0b6ea9700ad4911c8a4c842dc285c","name":"https://git.kernel.org/stable/c/5cb3129c30e0b6ea9700ad4911c8a4c842dc285c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9bd62e1fd11c6fdc2145b449f067ae73f3b8960c","name":"https://git.kernel.org/stable/c/9bd62e1fd11c6fdc2145b449f067ae73f3b8960c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-100032","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-100032","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 9bd62e1fd11c6fdc2145b449f067ae73f3b8960c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 5cb3129c30e0b6ea9700ad4911c8a4c842dc285c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 398aee3dd326d709801c8b530c30cbe6ee7dafb9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 1ded6b545bade7167471e2b3f2d4fe0c6489cd6e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 643c1e5912592d14de28643f0d30fdef5a85bd23 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 fe221b7b2d3ecd042dd391f74ff6a6fdeb7c2038 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.12","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 2.6.12 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["arch/alpha/include/asm/mmu_context.h","arch/alpha/kernel/smp.c","arch/alpha/mm/fault.c","arch/alpha/mm/tlbflush.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"9bd62e1fd11c6fdc2145b449f067ae73f3b8960c","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"5cb3129c30e0b6ea9700ad4911c8a4c842dc285c","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"398aee3dd326d709801c8b530c30cbe6ee7dafb9","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"1ded6b545bade7167471e2b3f2d4fe0c6489cd6e","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"643c1e5912592d14de28643f0d30fdef5a85bd23","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"fe221b7b2d3ecd042dd391f74ff6a6fdeb7c2038","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["arch/alpha/include/asm/mmu_context.h","arch/alpha/kernel/smp.c","arch/alpha/mm/fault.c","arch/alpha/mm/tlbflush.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"2.6.12"},{"lessThan":"2.6.12","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"2.6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"2.6.12","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nalpha: do not skip TLB shootdown IPIs for kthread-borrowed mms\n\nflush_tlb_mm(), flush_tlb_page() and flush_icache_user_page() skip the\nshootdown IPI when mm_users <= 1, on the assumption that no other CPU can\nbe running the mm. A task that borrows an mm through kthread_use_mm()\ntakes mmgrab() rather than mmget(), so it never appears in mm_users, and\nkthread_use_mm() may be handed an mm that is already the caller's\nactive_mm and loaded on that CPU. Such a CPU was not only left without\nan IPI, its mm->context[cpu] was cleared from under it.\n\nmm->context[cpu] is already the record of which CPUs hold an ASN for the\nmm. Test it rather than clearing it: take the shortcut only when no\nother CPU has one, and otherwise fall through to the IPI, which\ninvalidates those CPUs properly. A CPU that merely ran the mm in the\npast also holds a context and now costs an IPI, which errs in the safe\ndirection.\n\nChange ipi_flush_tlb_mm(), ipi_flush_icache_page() and the migration\ncallback ipi_flush_mm_and_page() to test current->mm, like\nipi_flush_tlb_page(). A CPU that only retains the mm lazily then clears\nits own slot through flush_tlb_other(), rather than publishing a new ASN\non every IPI or migration rendezvous. The migration callback still does\nits per-VA tbi() afterwards. Returning to the mm allocates a fresh ASN\nthrough ev5_switch_mm(), or through the direct-load path when\nkthread_use_mm() switches current's mm.\n\nOnce these historical slots are gone, the shortcut is available again\nif mm_users remains at most one and no other CPU has taken or kept a\ncontext. An explicit kthread_use_mm() borrower has current->mm set and\nstill receives the invalidate it needs.\n\nThe caller-side tests in flush_tlb_mm() and flush_icache_user_page()\nremain current->active_mm. A kernel thread that flushes its lazily held\nmm can therefore publish its own context slot. Those branches also\nperform the shortcut check, which excludes the calling CPU's slot, so\nleave them unchanged. This is distinct from a remote lazy CPU keeping\nits slot populated through repeated callbacks.\n\nTogether with the preceding patch, dropping these clearing loops leaves\nevery runtime write to mm->context[] targeting the writing CPU's own slot,\nso the array becomes a lockless publication of which CPUs may be using the\nmm, with a single writer per slot. Mark the two stores that are now\nobserved from other CPUs; flush_tlb_other() already uses WRITE_ONCE().\nThe uniprocessor flush_icache_user_page() is left alone, as nothing reads\nanother CPU's slot there, and init_new_context() runs before the mm is\nshared.\n\nOrder the slot reads after the page-table changes with smp_mb(). On the\npublishing CPU, the store in ev5_switch_mm() precedes the mb() in Alpha's\narch_spin_unlock(), when finish_lock_switch() drops the rq lock. This\nrelies on Alpha's unlock implementation, not a generic scheduler promise\nof a full barrier on unlock; document that reliance at the store. Also\nissue smp_mb() after publishing in __load_new_mm_context(), before loading\nand using the mm.\n\nThis covers every caller, including check_mmu_context(), which can\npublish a replacement after finish_lock_switch() has already run.\n\nThis requires the preceding removal of remote slot clearing from\nmigrate_flush_tlb_page(). It also requires the stale-TLB series to set\nneed_new_asn on both the reused and newly allocated ASN paths. Otherwise\nan IPI between finish_lock_switch() and check_mmu_context() can zero a\nnew slot while asn_lock is set, and the task can return to user space\nwith a live ASN that the shortcut cannot see."}],"metrics":[{"cvssV3_1":{"baseScore":7,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"AV:L - The fix patches the mm_users <= 1 shortcut in Alpha flush_tlb_mm()/flush_tlb_page()/flush_icache_user_page(), reached when kswapd reclaims a local process's pages via try_to_unmap_one() -> flush_tlb_range() -> flush_tlb_mm(). The attacker drives this with local mmap and memory allocation, and SMP Alpha must be in use. No remote peer supplies any data.\nAC:H - The bug only matters when a reclaiming kthread such as kswapd runs with the attacker's mm as its lazy active_mm while the attacker's single-threaded task keeps running on another CPU, and reclaim then frees a page still in that task's TLB. sched_setaffinity() and memory pressure make this likely, but the attacker cannot choose kswapd's CPU or reclaim timing. The kthread_use_mm() case is a narrow race against mmget_not_zero().\nPR:L - Any unprivileged user can mmap memory, pin a single-threaded process with sched_setaffinity() and allocate memory to wake kswapd. mm_users stays at 1, so the shortcut is taken. No capability or user namespace is needed.\nUI:N - The attacker's own process creates the memory pressure and then uses the stale translation. No other user mounts, opens or runs anything.\nS:U - The stale ASN translations and the freed pages they reach are both managed by the same kernel. This is local privilege escalation within one authority; no hypervisor or IOMMU boundary is crossed.\nC:H - The shortcut sets other CPUs' mm->context[cpu] to 0 and returns without calling smp_call_function(), so the CPU running the task keeps its old ASN and TLB entries. Userspace can then read whatever reuses the reclaimed physical page: page cache, slab or page tables.\nI:H - The stale TLB entries stay writable, so the task can write into a freed page after the allocator gives it to the kernel or another process. Overwriting a reused page-table or slab page gives arbitrary kernel write. The earlier Alpha compaction stale-TLB bug caused real heap corruption.\nA:H - Writes through stale translations corrupt reused kernel and user pages. This leads to oopses, panics, and SIGSEGV or heap corruption in unrelated processes, the same symptoms reported for the Alpha compaction stale-TLB fix dd5712f3379cf."}]}],"providerMetadata":{"dateUpdated":"2026-12-01T05:39:42.171Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/9bd62e1fd11c6fdc2145b449f067ae73f3b8960c"},{"url":"https://git.kernel.org/stable/c/5cb3129c30e0b6ea9700ad4911c8a4c842dc285c"},{"url":"https://git.kernel.org/stable/c/398aee3dd326d709801c8b530c30cbe6ee7dafb9"},{"url":"https://git.kernel.org/stable/c/1ded6b545bade7167471e2b3f2d4fe0c6489cd6e"},{"url":"https://git.kernel.org/stable/c/643c1e5912592d14de28643f0d30fdef5a85bd23"},{"url":"https://git.kernel.org/stable/c/fe221b7b2d3ecd042dd391f74ff6a6fdeb7c2038"}],"title":"alpha: do not skip TLB shootdown IPIs for kthread-borrowed mms","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-100032","datePublished":"2026-11-30T13:23:15.299Z","dateReserved":"2026-09-25T10:25:14.454Z","dateUpdated":"2026-12-01T05:39:42.171Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:18","lastModifiedDate":"2026-12-01 06:17:19","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"100032","Ordinal":"1","Title":"alpha: do not skip TLB shootdown IPIs for kthread-borrowed mms","CVE":"CVE-2026-100032","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"100032","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nalpha: do not skip TLB shootdown IPIs for kthread-borrowed mms\n\nflush_tlb_mm(), flush_tlb_page() and flush_icache_user_page() skip the\nshootdown IPI when mm_users <= 1, on the assumption that no other CPU can\nbe running the mm. A task that borrows an mm through kthread_use_mm()\ntakes mmgrab() rather than mmget(), so it never appears in mm_users, and\nkthread_use_mm() may be handed an mm that is already the caller's\nactive_mm and loaded on that CPU. Such a CPU was not only left without\nan IPI, its mm->context[cpu] was cleared from under it.\n\nmm->context[cpu] is already the record of which CPUs hold an ASN for the\nmm. Test it rather than clearing it: take the shortcut only when no\nother CPU has one, and otherwise fall through to the IPI, which\ninvalidates those CPUs properly. A CPU that merely ran the mm in the\npast also holds a context and now costs an IPI, which errs in the safe\ndirection.\n\nChange ipi_flush_tlb_mm(), ipi_flush_icache_page() and the migration\ncallback ipi_flush_mm_and_page() to test current->mm, like\nipi_flush_tlb_page(). A CPU that only retains the mm lazily then clears\nits own slot through flush_tlb_other(), rather than publishing a new ASN\non every IPI or migration rendezvous. The migration callback still does\nits per-VA tbi() afterwards. Returning to the mm allocates a fresh ASN\nthrough ev5_switch_mm(), or through the direct-load path when\nkthread_use_mm() switches current's mm.\n\nOnce these historical slots are gone, the shortcut is available again\nif mm_users remains at most one and no other CPU has taken or kept a\ncontext. An explicit kthread_use_mm() borrower has current->mm set and\nstill receives the invalidate it needs.\n\nThe caller-side tests in flush_tlb_mm() and flush_icache_user_page()\nremain current->active_mm. A kernel thread that flushes its lazily held\nmm can therefore publish its own context slot. Those branches also\nperform the shortcut check, which excludes the calling CPU's slot, so\nleave them unchanged. This is distinct from a remote lazy CPU keeping\nits slot populated through repeated callbacks.\n\nTogether with the preceding patch, dropping these clearing loops leaves\nevery runtime write to mm->context[] targeting the writing CPU's own slot,\nso the array becomes a lockless publication of which CPUs may be using the\nmm, with a single writer per slot. Mark the two stores that are now\nobserved from other CPUs; flush_tlb_other() already uses WRITE_ONCE().\nThe uniprocessor flush_icache_user_page() is left alone, as nothing reads\nanother CPU's slot there, and init_new_context() runs before the mm is\nshared.\n\nOrder the slot reads after the page-table changes with smp_mb(). On the\npublishing CPU, the store in ev5_switch_mm() precedes the mb() in Alpha's\narch_spin_unlock(), when finish_lock_switch() drops the rq lock. This\nrelies on Alpha's unlock implementation, not a generic scheduler promise\nof a full barrier on unlock; document that reliance at the store. Also\nissue smp_mb() after publishing in __load_new_mm_context(), before loading\nand using the mm.\n\nThis covers every caller, including check_mmu_context(), which can\npublish a replacement after finish_lock_switch() has already run.\n\nThis requires the preceding removal of remote slot clearing from\nmigrate_flush_tlb_page(). It also requires the stale-TLB series to set\nneed_new_asn on both the reused and newly allocated ASN paths. Otherwise\nan IPI between finish_lock_switch() and check_mmu_context() can zero a\nnew slot while asn_lock is set, and the task can return to user space\nwith a live ASN that the shortcut cannot see.","Type":"Description","Title":"alpha: do not skip TLB shootdown IPIs for kthread-borrowed mms"}]}}}