Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fix from Catalin Marinas:
"Fix PTRACE_PEEKMTETAGS access to an mmapped region before the first
write"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: mte: Allow PTRACE_PEEKMTETAGS access to the zero page

+3 -6
+1 -5
arch/arm64/kernel/cpufeature.c
··· 1701 1701 #ifdef CONFIG_ARM64_MTE 1702 1702 static void cpu_enable_mte(struct arm64_cpu_capabilities const *cap) 1703 1703 { 1704 - static bool cleared_zero_page = false; 1705 - 1706 1704 /* 1707 1705 * Clear the tags in the zero page. This needs to be done via the 1708 1706 * linear map which has the Tagged attribute. 1709 1707 */ 1710 - if (!cleared_zero_page) { 1711 - cleared_zero_page = true; 1708 + if (!test_and_set_bit(PG_mte_tagged, &ZERO_PAGE(0)->flags)) 1712 1709 mte_clear_page_tags(lm_alias(empty_zero_page)); 1713 - } 1714 1710 1715 1711 kasan_init_hw_tags_cpu(); 1716 1712 }
+2 -1
arch/arm64/kernel/mte.c
··· 329 329 * would cause the existing tags to be cleared if the page 330 330 * was never mapped with PROT_MTE. 331 331 */ 332 - if (!test_bit(PG_mte_tagged, &page->flags)) { 332 + if (!(vma->vm_flags & VM_MTE)) { 333 333 ret = -EOPNOTSUPP; 334 334 put_page(page); 335 335 break; 336 336 } 337 + WARN_ON_ONCE(!test_bit(PG_mte_tagged, &page->flags)); 337 338 338 339 /* limit access to the end of the page */ 339 340 offset = offset_in_page(addr);