Skip to content
Permalink
Anshuman-Khand…
Switch branches/tags

Commits on Jul 12, 2021

  1. arm64/kexec: Test page size support with new TGRAN range values

    The commit 26f5538 ("arm64/mm: Fix __enable_mmu() for new TGRAN range
    values") had already switched into testing ID_AA64MMFR0_TGRAN range values.
    This just changes system_supports_[4|16|64]kb_granule() helpers to perform
    similar range tests as well. While here, it standardizes page size specific
    supported min and max TGRAN values.
    
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: James Morse <james.morse@arm.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
    Anshuman Khandual authored and intel-lab-lkp committed Jul 12, 2021

Commits on Jun 24, 2021

  1. Merge branch 'for-next/sve' into for-next/core

    Optimise SVE switching for CPUs with 128-bit implementations.
    
    * for-next/sve:
      arm64/sve: Skip flushing Z registers with 128 bit vectors
      arm64/sve: Use the sve_flush macros in sve_load_from_fpsimd_state()
      arm64/sve: Split _sve_flush macro into separate Z and predicate flushes
    willdeacon committed Jun 24, 2021
  2. Merge branch 'for-next/smccc' into for-next/core

    Add support for versions v1.2 and 1.3 of the SMC calling convention.
    
    * for-next/smccc:
      arm64: smccc: Support SMCCC v1.3 SVE register saving hint
      arm64: smccc: Add support for SMCCCv1.2 extended input/output registers
    willdeacon committed Jun 24, 2021
  3. Merge branch 'for-next/selftests' into for-next/core

    Fix output format from SVE selftest.
    
    * for-next/selftests:
      kselftest/arm64: Add missing newline to SVE test skipping output
    willdeacon committed Jun 24, 2021
  4. Merge branch 'for-next/ptrauth' into for-next/core

    Allow Pointer Authentication to be configured independently for kernel
    and userspace.
    
    * for-next/ptrauth:
      arm64: Conditionally configure PTR_AUTH key of the kernel.
      arm64: Add ARM64_PTR_AUTH_KERNEL config option
    willdeacon committed Jun 24, 2021
  5. Merge branch 'for-next/perf' into for-next/core

    PMU driver cleanups for managing IRQ affinity and exposing event
    attributes via sysfs.
    
    * for-next/perf: (36 commits)
      drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe()
      perf/arm-cmn: Fix invalid pointer when access dtc object sharing the same IRQ number
      arm64: perf: Simplify EVENT ATTR macro in perf_event.c
      drivers/perf: Simplify EVENT ATTR macro in fsl_imx8_ddr_perf.c
      drivers/perf: Simplify EVENT ATTR macro in xgene_pmu.c
      drivers/perf: Simplify EVENT ATTR macro in qcom_l3_pmu.c
      drivers/perf: Simplify EVENT ATTR macro in qcom_l2_pmu.c
      drivers/perf: Simplify EVENT ATTR macro in SMMU PMU driver
      perf: Add EVENT_ATTR_ID to simplify event attributes
      perf/smmuv3: Don't trample existing events with global filter
      perf/hisi: Constify static attribute_group structs
      perf: qcom: Remove redundant dev_err call in qcom_l3_cache_pmu_probe()
      drivers/perf: hisi: Fix data source control
      arm64: perf: Add more support on caps under sysfs
      perf: qcom_l2_pmu: move to use request_irq by IRQF_NO_AUTOEN flag
      arm_pmu: move to use request_irq by IRQF_NO_AUTOEN flag
      perf: arm_spe: use DEVICE_ATTR_RO macro
      perf: xgene_pmu: use DEVICE_ATTR_RO macro
      perf: qcom: use DEVICE_ATTR_RO macro
      perf: arm_pmu: use DEVICE_ATTR_RO macro
      ...
    willdeacon committed Jun 24, 2021
  6. Merge branch 'for-next/mte' into for-next/core

    KASAN optimisations for the hardware tagging (MTE) implementation.
    
    * for-next/mte:
      kasan: disable freed user page poisoning with HW tags
      arm64: mte: handle tags zeroing at page allocation time
      kasan: use separate (un)poison implementation for integrated init
      mm: arch: remove indirection level in alloc_zeroed_user_highpage_movable()
      kasan: speed up mte_set_mem_tag_range
    willdeacon committed Jun 24, 2021
  7. Merge branch 'for-next/mm' into for-next/core

    Lots of cleanup to our various page-table definitions, but also some
    non-critical fixes and removal of some unnecessary memory types. The
    most interesting change here is the reduction of ARCH_DMA_MINALIGN back
    to 64 bytes, since we're not aware of any machines that need a higher
    value with the way the code is structured (only needed for non-coherent
    DMA).
    
    * for-next/mm:
      arm64: tlb: fix the TTL value of tlb_get_level
      arm64/mm: Rename ARM64_SWAPPER_USES_SECTION_MAPS
      arm64: head: fix code comments in set_cpu_boot_mode_flag
      arm64: mm: drop unused __pa(__idmap_text_start)
      arm64: mm: fix the count comments in compute_indices
      arm64/mm: Fix ttbr0 values stored in struct thread_info for software-pan
      arm64: mm: Pass original fault address to handle_mm_fault()
      arm64/mm: Drop SECTION_[SHIFT|SIZE|MASK]
      arm64/mm: Use CONT_PMD_SHIFT for ARM64_MEMSTART_SHIFT
      arm64/mm: Drop SWAPPER_INIT_MAP_SIZE
      arm64: mm: decode xFSC in mem_abort_decode()
      arm64: mm: Add is_el1_data_abort() helper
      arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES)
      arm64: mm: Remove unused support for Normal-WT memory type
      arm64: acpi: Map EFI_MEMORY_WT memory as Normal-NC
      arm64: mm: Remove unused support for Device-GRE memory type
      arm64: mm: Use better bitmap_zalloc()
      arm64/mm: Make vmemmap_free() available only with CONFIG_MEMORY_HOTPLUG
      arm64/mm: Remove [PUD|PMD]_TABLE_BIT from [pud|pmd]_bad()
      arm64/mm: Validate CONFIG_PGTABLE_LEVELS
    willdeacon committed Jun 24, 2021
  8. Merge branch 'for-next/misc' into for-next/core

    Reduce loglevel of useless print during CPU offlining.
    
    * for-next/misc:
      arm64: smp: Bump debugging information print down to KERN_DEBUG
    willdeacon committed Jun 24, 2021
  9. Merge branch 'for-next/kasan' into for-next/core

    Optimise out-of-line KASAN checking when using software tagging.
    
    * for-next/kasan:
      kasan: arm64: support specialized outlined tag mismatch checks
    willdeacon committed Jun 24, 2021
  10. Merge branch 'for-next/insn' into for-next/core

    Refactoring of our instruction decoding routines and addition of some
    missing encodings.
    
    * for-next/insn:
      arm64: insn: avoid circular include dependency
      arm64: insn: move AARCH64_INSN_SIZE into <asm/insn.h>
      arm64: insn: decouple patching from insn code
      arm64: insn: Add load/store decoding helpers
      arm64: insn: Add some opcodes to instruction decoder
      arm64: insn: Add barrier encodings
      arm64: insn: Add SVE instruction class
      arm64: Move instruction encoder/decoder under lib/
      arm64: Move aarch32 condition check functions
      arm64: Move patching utilities out of instruction encoding/decoding
    willdeacon committed Jun 24, 2021
  11. Merge branch 'for-next/entry' into for-next/core

    The never-ending entry.S refactoring continues, putting us in a much
    better place wrt compiler instrumentation whilst moving more of the code
    into C.
    
    * for-next/entry:
      arm64: idle: don't instrument idle code with KCOV
      arm64: entry: don't instrument entry code with KCOV
      arm64: entry: make NMI entry/exit functions static
      arm64: entry: split SDEI entry
      arm64: entry: split bad stack entry
      arm64: entry: fold el1_inv() into el1h_64_sync_handler()
      arm64: entry: handle all vectors with C
      arm64: entry: template the entry asm functions
      arm64: entry: improve bad_mode()
      arm64: entry: move bad_mode() to entry-common.c
      arm64: entry: consolidate EL1 exception returns
      arm64: entry: organise entry vectors consistently
      arm64: entry: organise entry handlers consistently
      arm64: entry: convert IRQ+FIQ handlers to C
      arm64: entry: add a call_on_irq_stack helper
      arm64: entry: move NMI preempt logic to C
      arm64: entry: move arm64_preempt_schedule_irq to entry-common.c
      arm64: entry: convert SError handlers to C
      arm64: entry: unmask IRQ+FIQ after EL0 handling
      arm64: remove redundant local_daif_mask() in bad_mode()
    willdeacon committed Jun 24, 2021
  12. Merge branch 'for-next/docs' into for-next/core

    Update booting requirements for the FEAT_HCX feature, added to v8.7 of
    the architecture.
    
    * for-next/docs:
      arm64: Document requirement for access to FEAT_HCX
    willdeacon committed Jun 24, 2021
  13. Merge branch 'for-next/cpuidle' into for-next/core

    Fix resume from idle when pNMI is being used.
    
    * for-next/cpuidle:
      arm64: suspend: Use cpuidle context helpers in cpu_suspend()
      PSCI: Use cpuidle context helpers in psci_cpu_suspend_enter()
      arm64: Convert cpu_do_idle() to using cpuidle context helpers
      arm64: Add cpuidle context save/restore helpers
    willdeacon committed Jun 24, 2021
  14. Merge branch 'for-next/cpufeature' into for-next/core

    Additional CPU sanity checks for MTE and preparatory changes for systems
    where not all of the CPUs support 32-bit EL0.
    
    * for-next/cpufeature:
      arm64: Restrict undef hook for cpufeature registers
      arm64: Kill 32-bit applications scheduled on 64-bit-only CPUs
      KVM: arm64: Kill 32-bit vCPUs on systems with mismatched EL0 support
      arm64: Allow mismatched 32-bit EL0 support
      arm64: cpuinfo: Split AArch32 registers out into a separate struct
      arm64: Check if GMID_EL1.BS is the same on all CPUs
      arm64: Change the cpuinfo_arm64 member type for some sysregs to u64
    willdeacon committed Jun 24, 2021
  15. Merge branch 'for-next/cortex-strings' into for-next/core

    Update our kernel string routines to the latest Cortex Strings
    implementation.
    
    * for-next/cortex-strings:
      arm64: update string routine copyrights and URLs
      arm64: Rewrite __arch_clear_user()
      arm64: Better optimised memchr()
      arm64: Import latest memcpy()/memmove() implementation
      arm64: Add assembly annotations for weak-PI-alias madness
      arm64: Import latest version of Cortex Strings' strncmp
      arm64: Import updated version of Cortex Strings' strlen
      arm64: Import latest version of Cortex Strings' strcmp
      arm64: Import latest version of Cortex Strings' memcmp
    willdeacon committed Jun 24, 2021
  16. Merge branch 'for-next/caches' into for-next/core

    Big cleanup of our cache maintenance routines, which were confusingly
    named and inconsistent in their implementations.
    
    * for-next/caches:
      arm64: Rename arm64-internal cache maintenance functions
      arm64: Fix cache maintenance function comments
      arm64: sync_icache_aliases to take end parameter instead of size
      arm64: __clean_dcache_area_pou to take end parameter instead of size
      arm64: __clean_dcache_area_pop to take end parameter instead of size
      arm64: __clean_dcache_area_poc to take end parameter instead of size
      arm64: __flush_dcache_area to take end parameter instead of size
      arm64: dcache_by_line_op to take end parameter instead of size
      arm64: __inval_dcache_area to take end parameter instead of size
      arm64: Fix comments to refer to correct function __flush_icache_range
      arm64: Move documentation of dcache_by_line_op
      arm64: assembler: remove user_alt
      arm64: Downgrade flush_icache_range to invalidate
      arm64: Do not enable uaccess for invalidate_icache_range
      arm64: Do not enable uaccess for flush_icache_range
      arm64: Apply errata to swsusp_arch_suspend_exit
      arm64: assembler: add conditional cache fixups
      arm64: assembler: replace `kaddr` with `addr`
    willdeacon committed Jun 24, 2021
  17. Merge branch 'for-next/build' into for-next/core

    Tweak linker flags so that GDB can understand vmlinux when using RELR
    relocations.
    
    * for-next/build:
      Makefile: fix GDB warning with CONFIG_RELR
    willdeacon committed Jun 24, 2021
  18. Merge branch 'for-next/boot' into for-next/core

    Boot path cleanups to enable early initialisation of per-cpu operations
    needed by KCSAN.
    
    * for-next/boot:
      arm64: scs: Drop unused 'tmp' argument to scs_{load, save} asm macros
      arm64: smp: initialize cpu offset earlier
      arm64: smp: unify task and sp setup
      arm64: smp: remove stack from secondary_data
      arm64: smp: remove pointless secondary_data maintenance
      arm64: assembler: add set_this_cpu_offset
    willdeacon committed Jun 24, 2021
  19. Merge branch 'for-next/stacktrace' into for-next/core

    Relax frame record alignment requirements to facilitate 8-byte alignment
    with KASAN and Clang.
    
    * for-next/stacktrace:
      arm64: stacktrace: Relax frame record alignment requirement to 8 bytes
      arm64: Change the on_*stack functions to take a size argument
      arm64: Implement stack trace termination record
    willdeacon committed Jun 24, 2021

Commits on Jun 23, 2021

  1. arm64: tlb: fix the TTL value of tlb_get_level

    The TTL field indicates the level of page table walk holding the *leaf*
    entry for the address being invalidated. But currently, the TTL field
    may be set to an incorrent value in the following stack:
    
    pte_free_tlb
        __pte_free_tlb
            tlb_remove_table
                tlb_table_invalidate
                    tlb_flush_mmu_tlbonly
                        tlb_flush
    
    In this case, we just want to flush a PTE page, but the tlb->cleared_pmds
    is set and we get tlb_level = 2 in the tlb_get_level() function. This may
    cause some unexpected problems.
    
    This patch set the TTL field to 0 if tlb->freed_tables is set. The
    tlb->freed_tables indicates page table pages are freed, not the leaf
    entry.
    
    Cc: <stable@vger.kernel.org> # 5.9.x
    Fixes: c4ab2cb ("arm64: tlb: Set the TTL field in flush_tlb_range")
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Reported-by: ZhuRui <zhurui3@huawei.com>
    Signed-off-by: Zhenyu Ye <yezhenyu2@huawei.com>
    Link: https://lore.kernel.org/r/b80ead47-1f88-3a00-18e1-cacc22f54cc4@huawei.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Zhenyu Ye authored and willdeacon committed Jun 23, 2021

Commits on Jun 22, 2021

  1. arm64: Restrict undef hook for cpufeature registers

    This commit modifies the mask of the mrs_hook declared in
    arch/arm64/kernel/cpufeatures.c which emulates only feature register
    access. This is necessary because this hook's mask was too large and
    thus masking any mrs instruction, even if not related to the emulated
    registers which made the pmu emulation inefficient.
    
    Signed-off-by: Raphael Gault <raphael.gault@arm.com>
    Signed-off-by: Rob Herring <robh@kernel.org>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Link: https://lore.kernel.org/r/20210517180256.2881891-1-robh@kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>
    raphaelgault authored and willdeacon committed Jun 22, 2021

Commits on Jun 21, 2021

  1. arm64/mm: Rename ARM64_SWAPPER_USES_SECTION_MAPS

    ARM64_SWAPPER_USES_SECTION_MAPS implies that a PMD level huge page mappings
    are used for swapper, idmap and vmemmap. Lets make it PMD explicit removing
    any possible confusion with generic memory sections and also bit generic as
    it's applicable for idmap and vmemmap mappings as well. Hence rename it as
    ARM64_KERNEL_USES_PMD_MAPS instead.
    
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Link: https://lore.kernel.org/r/1623991622-24294-1-git-send-email-anshuman.khandual@arm.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Anshuman Khandual authored and willdeacon committed Jun 21, 2021
  2. arm64: insn: avoid circular include dependency

    Nathan reports that when building with CONFIG_LTO_CLANG_THIN=y, the
    build fails due to BUILD_BUG_ON() not being defined before its uss in
    <asm/insn.h>.
    
    The problem is that with LTO, we patch READ_ONCE(), and <asm/rwonce.h>
    includes <asm/insn.h>, creating a circular include chain:
    
            <linux/build_bug.h>
            <linux/compiler.h>
            <asm/rwonce.h>
            <asm/alternative-macros.h>
            <asm/insn.h>
            <linux/build-bug.h>
    
    ... and so when <asm/insn.h> includes <linux/build_bug.h>, none of the
    BUILD_BUG* definitions have happened yet.
    
    To avoid this, let's move AARCH64_INSN_SIZE into a header without any
    dependencies, such that it can always be safely included. At the same
    time, avoid including <asm/alternative.h> in <asm/insn.h>, which should
    no longer be necessary (and doesn't make sense when insn.h is consumed
    by userspace).
    
    Reported-by: Nathan Chancellor <nathan@kernel.org>
    Signed-off-by: Mark Rutland <mark.rutland@arm.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Link: https://lore.kernel.org/r/20210621080830.GA37068@C02TD0UTHF1T.local
    Fixes: 3e00e39 ("arm64: insn: move AARCH64_INSN_SIZE into <asm/insn.h>")
    Signed-off-by: Will Deacon <will@kernel.org>
    Mark Rutland authored and willdeacon committed Jun 21, 2021

Commits on Jun 17, 2021

  1. arm64: smp: Bump debugging information print down to KERN_DEBUG

    This sort of information is only generally useful when debugging.
    
    No need to have these sprinkled through the kernel log otherwise.
    
    Cc: Will Deacon <will@kernel.org>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Link: https://lore.kernel.org/r/20210617073059.315542-1-lee.jones@linaro.org
    Signed-off-by: Will Deacon <will@kernel.org>
    lag-linaro authored and willdeacon committed Jun 17, 2021
  2. drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe()

    ddr_perf_probe() misses to call ida_simple_remove() in an error path.
    Jump to cpuhp_state_err to fix it.
    
    Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
    Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
    Link: https://lore.kernel.org/r/20210617122614.166823-1-jingxiangfeng@huawei.com
    Signed-off-by: Will Deacon <will@kernel.org>
    hiss2018 authored and willdeacon committed Jun 17, 2021
  3. perf/arm-cmn: Fix invalid pointer when access dtc object sharing the …

    …same IRQ number
    
    When multiple dtcs share the same IRQ number, the irq_friend which
    used to refer to dtc object gets calculated incorrect which leads
    to invalid pointer.
    
    Fixes: 0ba6477 ("perf: Add Arm CMN-600 PMU driver")
    
    Signed-off-by: Tuan Phan <tuanphan@os.amperecomputing.com>
    Reviewed-by: Robin Murphy <robin.murphy@arm.com>
    Link: https://lore.kernel.org/r/1623946129-3290-1-git-send-email-tuanphan@os.amperecomputing.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Tuan Phan authored and willdeacon committed Jun 17, 2021
  4. arm64: suspend: Use cpuidle context helpers in cpu_suspend()

    Use cpuidle context helpers to switch to using DAIF.IF instead
    of PMR to mask interrupts, ensuring that we suspend with
    interrupts being able to reach the CPU interface.
    
    Signed-off-by: Marc Zyngier <maz@kernel.org>
    Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
    Link: https://lore.kernel.org/r/20210615111227.2454465-5-maz@kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Marc Zyngier authored and willdeacon committed Jun 17, 2021
  5. PSCI: Use cpuidle context helpers in psci_cpu_suspend_enter()

    The PSCI CPU suspend code isn't aware of the PMR vs DAIF game,
    resulting in a system that locks up if entering CPU suspend
    with GICv3 pNMI enabled.
    
    To save the day, teach the suspend code about our new cpuidle
    context helpers, which will do everything that's required just
    like the usual WFI cpuidle code.
    
    This fixes my Altra system, which would otherwise lock-up at
    boot time when booted with irqchip.gicv3_pseudo_nmi=1.
    
    Tested-by: Valentin Schneider <valentin.schneider@arm.com>
    Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Signed-off-by: Marc Zyngier <maz@kernel.org>
    Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
    Link: https://lore.kernel.org/r/20210615111227.2454465-4-maz@kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Marc Zyngier authored and willdeacon committed Jun 17, 2021
  6. arm64: Convert cpu_do_idle() to using cpuidle context helpers

    Now that we have helpers that are aware of the pseudo-NMI
    feature, introduce them to cpu_do_idle(). This allows for
    some nice cleanup.
    
    No functional change intended.
    
    Tested-by: Valentin Schneider <valentin.schneider@arm.com>
    Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Signed-off-by: Marc Zyngier <maz@kernel.org>
    Link: https://lore.kernel.org/r/20210615111227.2454465-3-maz@kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Marc Zyngier authored and willdeacon committed Jun 17, 2021
  7. arm64: Add cpuidle context save/restore helpers

    As we need to start doing some additional work on all idle
    paths, let's introduce a set of macros that will perform
    the work related to the GICv3 pseudo-NMI idle entry exit.
    
    Stubs are introduced to 32bit ARM for compatibility.
    As these helpers are currently unused, there is no functional
    change.
    
    Tested-by: Valentin Schneider <valentin.schneider@arm.com>
    Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Signed-off-by: Marc Zyngier <maz@kernel.org>
    Link: https://lore.kernel.org/r/20210615111227.2454465-2-maz@kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Marc Zyngier authored and willdeacon committed Jun 17, 2021

Commits on Jun 15, 2021

  1. arm64: head: fix code comments in set_cpu_boot_mode_flag

    Up to here, the CPU boot mode can either be EL1 or EL2.
    Correct the code comments a bit.
    
    Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Acked-by: Mark Rutland <mark.rutland@arm.com>
    Link: https://lore.kernel.org/r/20210518101405.1048860-5-aisheng.dong@nxp.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Dong Aisheng authored and willdeacon committed Jun 15, 2021
  2. arm64: mm: drop unused __pa(__idmap_text_start)

    x5 is not used in the following map_memory. Instead,
    __pa(__idmap_text_start) is stored in x3 which is used later.
    
    Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Acked-by: Mark Rutland <mark.rutland@arm.com>
    Link: https://lore.kernel.org/r/20210518101405.1048860-4-aisheng.dong@nxp.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Dong Aisheng authored and willdeacon committed Jun 15, 2021
  3. arm64: mm: fix the count comments in compute_indices

    'count - 1' is confusing and not comply with the real code running.
    'count' actually represents the extra entries required, no need minus 1.
    
    Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Link: https://lore.kernel.org/r/20210518101405.1048860-3-aisheng.dong@nxp.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Dong Aisheng authored and willdeacon committed Jun 15, 2021
  4. arm64/mm: Fix ttbr0 values stored in struct thread_info for software-pan

    When using CONFIG_ARM64_SW_TTBR0_PAN, a task's thread_info::ttbr0 must be
    the TTBR0_EL1 value used to run userspace. With 52-bit PAs, the PA must be
    packed into the TTBR using phys_to_ttbr(), but we forget to do this in some
    of the SW PAN code. Thus, if the value is installed into TTBR0_EL1 (as may
    happen in the uaccess routines), this could result in UNPREDICTABLE
    behaviour.
    
    Since hardware with 52-bit PA support almost certainly has HW PAN, which
    will be used in preference, this shouldn't be a practical issue, but let's
    fix this for consistency.
    
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: James Morse <james.morse@arm.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Fixes: 529c4b0 ("arm64: handle 52-bit addresses in TTBR")
    Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
    Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
    Link: https://lore.kernel.org/r/1623749578-11231-1-git-send-email-anshuman.khandual@arm.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Anshuman Khandual authored and willdeacon committed Jun 15, 2021
Older