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 fixes from Will Deacon:

- Fix Kconfig dependencies to re-allow the enabling of function graph
tracer and shadow call stacks at the same time.

- Revert the workaround for CPU erratum #2645198 since the CONFIG_
guards were incorrect and the code has therefore not seen any real
exposure in -next.

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
Revert "arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption"
ftrace: Allow WITH_ARGS flavour of graph tracer with shadow call stack

+1 -87
-2
Documentation/arm64/silicon-errata.rst
··· 120 120 +----------------+-----------------+-----------------+-----------------------------+ 121 121 | ARM | Cortex-A710 | #2224489 | ARM64_ERRATUM_2224489 | 122 122 +----------------+-----------------+-----------------+-----------------------------+ 123 - | ARM | Cortex-A715 | #2645198 | ARM64_ERRATUM_2645198 | 124 - +----------------+-----------------+-----------------+-----------------------------+ 125 123 | ARM | Cortex-X2 | #2119858 | ARM64_ERRATUM_2119858 | 126 124 +----------------+-----------------+-----------------+-----------------------------+ 127 125 | ARM | Cortex-X2 | #2224489 | ARM64_ERRATUM_2224489 |
+1 -1
arch/Kconfig
··· 638 638 config SHADOW_CALL_STACK 639 639 bool "Shadow Call Stack" 640 640 depends on ARCH_SUPPORTS_SHADOW_CALL_STACK 641 - depends on DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER 641 + depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER 642 642 help 643 643 This option enables the compiler's Shadow Call Stack, which 644 644 uses a shadow stack to protect function return addresses from
-16
arch/arm64/Kconfig
··· 972 972 973 973 If unsure, say Y. 974 974 975 - config ARM64_ERRATUM_2645198 976 - bool "Cortex-A715: 2645198: Workaround possible [ESR|FAR]_ELx corruption" 977 - default y 978 - help 979 - This option adds the workaround for ARM Cortex-A715 erratum 2645198. 980 - 981 - If a Cortex-A715 cpu sees a page mapping permissions change from executable 982 - to non-executable, it may corrupt the ESR_ELx and FAR_ELx registers on the 983 - next instruction abort caused by permission fault. 984 - 985 - Only user-space does executable to non-executable permission transition via 986 - mprotect() system call. Workaround the problem by doing a break-before-make 987 - TLB invalidation, for all changes to executable user space mappings. 988 - 989 - If unsure, say Y. 990 - 991 975 config CAVIUM_ERRATUM_22375 992 976 bool "Cavium erratum 22375, 24313" 993 977 default y
-9
arch/arm64/include/asm/hugetlb.h
··· 49 49 50 50 void __init arm64_hugetlb_cma_reserve(void); 51 51 52 - #define huge_ptep_modify_prot_start huge_ptep_modify_prot_start 53 - extern pte_t huge_ptep_modify_prot_start(struct vm_area_struct *vma, 54 - unsigned long addr, pte_t *ptep); 55 - 56 - #define huge_ptep_modify_prot_commit huge_ptep_modify_prot_commit 57 - extern void huge_ptep_modify_prot_commit(struct vm_area_struct *vma, 58 - unsigned long addr, pte_t *ptep, 59 - pte_t old_pte, pte_t new_pte); 60 - 61 52 #include <asm-generic/hugetlb.h> 62 53 63 54 #endif /* __ASM_HUGETLB_H */
-9
arch/arm64/include/asm/pgtable.h
··· 1093 1093 } 1094 1094 1095 1095 1096 - #define __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION 1097 - #define ptep_modify_prot_start ptep_modify_prot_start 1098 - extern pte_t ptep_modify_prot_start(struct vm_area_struct *vma, 1099 - unsigned long addr, pte_t *ptep); 1100 - 1101 - #define ptep_modify_prot_commit ptep_modify_prot_commit 1102 - extern void ptep_modify_prot_commit(struct vm_area_struct *vma, 1103 - unsigned long addr, pte_t *ptep, 1104 - pte_t old_pte, pte_t new_pte); 1105 1096 #endif /* !__ASSEMBLY__ */ 1106 1097 1107 1098 #endif /* __ASM_PGTABLE_H */
-7
arch/arm64/kernel/cpu_errata.c
··· 661 661 CAP_MIDR_RANGE_LIST(trbe_write_out_of_range_cpus), 662 662 }, 663 663 #endif 664 - #ifdef CONFIG_ARM64_ERRATUM_2645198 665 - { 666 - .desc = "ARM erratum 2645198", 667 - .capability = ARM64_WORKAROUND_2645198, 668 - ERRATA_MIDR_ALL_VERSIONS(MIDR_CORTEX_A715) 669 - }, 670 - #endif 671 664 #ifdef CONFIG_ARM64_ERRATUM_2077057 672 665 { 673 666 .desc = "ARM erratum 2077057",
-21
arch/arm64/mm/hugetlbpage.c
··· 559 559 { 560 560 return __hugetlb_valid_size(size); 561 561 } 562 - 563 - pte_t huge_ptep_modify_prot_start(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) 564 - { 565 - if (IS_ENABLED(CONFIG_ARM64_WORKAROUND_2645198) && 566 - cpus_have_const_cap(ARM64_WORKAROUND_2645198)) { 567 - /* 568 - * Break-before-make (BBM) is required for all user space mappings 569 - * when the permission changes from executable to non-executable 570 - * in cases where cpu is affected with errata #2645198. 571 - */ 572 - if (pte_user_exec(READ_ONCE(*ptep))) 573 - return huge_ptep_clear_flush(vma, addr, ptep); 574 - } 575 - return huge_ptep_get_and_clear(vma->vm_mm, addr, ptep); 576 - } 577 - 578 - void huge_ptep_modify_prot_commit(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep, 579 - pte_t old_pte, pte_t pte) 580 - { 581 - set_huge_pte_at(vma->vm_mm, addr, ptep, pte); 582 - }
-21
arch/arm64/mm/mmu.c
··· 1630 1630 } 1631 1631 early_initcall(prevent_bootmem_remove_init); 1632 1632 #endif 1633 - 1634 - pte_t ptep_modify_prot_start(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) 1635 - { 1636 - if (IS_ENABLED(CONFIG_ARM64_WORKAROUND_2645198) && 1637 - cpus_have_const_cap(ARM64_WORKAROUND_2645198)) { 1638 - /* 1639 - * Break-before-make (BBM) is required for all user space mappings 1640 - * when the permission changes from executable to non-executable 1641 - * in cases where cpu is affected with errata #2645198. 1642 - */ 1643 - if (pte_user_exec(READ_ONCE(*ptep))) 1644 - return ptep_clear_flush(vma, addr, ptep); 1645 - } 1646 - return ptep_get_and_clear(vma->vm_mm, addr, ptep); 1647 - } 1648 - 1649 - void ptep_modify_prot_commit(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep, 1650 - pte_t old_pte, pte_t pte) 1651 - { 1652 - set_pte_at(vma->vm_mm, addr, ptep, pte); 1653 - }
-1
arch/arm64/tools/cpucaps
··· 71 71 WORKAROUND_2064142 72 72 WORKAROUND_2077057 73 73 WORKAROUND_2457168 74 - WORKAROUND_2645198 75 74 WORKAROUND_2658417 76 75 WORKAROUND_TRBE_OVERWRITE_FILL_MODE 77 76 WORKAROUND_TSB_FLUSH_FAILURE