<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/tools/testing/selftests/arm64, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>selftests/arm64: GCS must not leak on a failed clone3</title>
<updated>2026-10-29T20:42:23+00:00</updated>
<author>
<name>Iván Ezequiel Rodriguez</name>
<email>ivanrwcm25@gmail.com</email>
</author>
<published>2026-10-28T15:43:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f46be4da2cbb17574b5369517a9a1e1b414063b4'/>
<id>f46be4da2cbb17574b5369517a9a1e1b414063b4</id>
<content type='text'>
KTAP coverage for clone3(CLONE_VM|CLONE_PIDFD) with a bad pidfd
pointer: sixteen failures must not grow the parent's GCS VMA count.

Assisted-by: LLM
Signed-off-by: Iván Ezequiel Rodriguez &lt;ivanrwcm25@gmail.com&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Tested-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
KTAP coverage for clone3(CLONE_VM|CLONE_PIDFD) with a bad pidfd
pointer: sixteen failures must not grow the parent's GCS VMA count.

Assisted-by: LLM
Signed-off-by: Iván Ezequiel Rodriguez &lt;ivanrwcm25@gmail.com&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Tested-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'for-next/misc', 'for-next/be-gone', 'for-next/smccc-bus', 'for-next/preemptible-this-cpu', 'for-next/cpu-errata', 'for-next/mpam', 'for-next/kselftest', 'for-next/efi', 'for-next/secondary-boot-prep', 'for-next/sysreg' and 'for-next/gcs', remote-tracking branch 'arm64/for-next/perf' into for-next/core</title>
<updated>2026-10-15T18:09:10+00:00</updated>
<author>
<name>Catalin Marinas</name>
<email>catalin.marinas@arm.com</email>
</author>
<published>2026-10-15T18:09:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=34fa781e25a6caa8862acd923e89d08cd9a9f37e'/>
<id>34fa781e25a6caa8862acd923e89d08cd9a9f37e</id>
<content type='text'>
* arm64/for-next/perf: (22 commits)
  drivers/perf: apple_m1: Add macOS 27 M2 Event
  perf/marvell: cn10k_tad: Publish the OF module alias
  perf: xgene: initialize lock before requesting IRQ
  perf: marvell: avoid large stack variables
  perf/dwc_pcie: Fix PCI device reference leak in probe
  coresight: perf: Suppress ITRACE start records
  perf: arm_spe: Suppress redundant ITRACE start records
  perf/core: Export perf_event_itrace_started()
  perf/cxl: Clear stale overflow status before using a counter
  perf/cxl: Don't log through pmu.dev in the overflow interrupt handler
  perf/cxl: Validate the hardware-reported counter width
  perf/cxl: Unfreeze counters after handling an overflow interrupt
  perf/cxl: Don't share the overflow interrupt, and keep it pinned
  cxl/pci: Add the PMUs after configuring events
  perf/cxl: Split the MSI vector out of info-&gt;irq
  perf/cxl: Accept an overflow interrupt on MSI message number 0
  perf/cxl: Fix the counter overflow delta fixup
  perf/cxl: Clear stale event fields before reprogramming a counter
  perf/cxl: Program the requested event group on configurable counters
  drivers/perf: hisi: Add cycle event for new MN PMU
  ...

* for-next/misc:
  arm64: cpufeature: Enable BBML2 for NVIDIA Rigel
  arm64: cputype: Add NVIDIA Rigel definitions
  arm64: raise default ARCH_MMAP_RND_BITS for 48-bit and 52-bit VA
  arm64/debug: mask debug exceptions when called from common code
  arm64: clear_page[s] using memset
  arm64/sve: Don't zero the SVE state buffer when the SVE state is live
  arm64/cpufeature: Drop redundant define(ID_AA64MMFR0..._SUPPORTED_LPA2)
  arm64: Use proper include variant
  arm64: include: fix repeated word 'to' in comment
  selftests: arm64: fix typo "hander" in comment
  arm64: fix typos in comments
  docs: arm64: Fix typo "initalised" in booting.rst
  arm64: alternative: Remove 'cfg' parameter
  arm64: mte-kasan: Use IS_ENABLED() rather than ALTERNATIVE() 'cfg' parameter
  arm64/cpufeature: Change description for ARM64_HAS_LPA2

* for-next/be-gone:
  drivers: Kconfig: Simplify dependencies on ARM64 &amp;&amp; !CPU_BIG_ENDIAN
  arm64: Kbuild: Remove vestigial big-endian support
  gve: Add explicit ARM64 dependency to Kconfig
  crypto: hisilicon/sec2: Remove check of CONFIG_CPU_LITTLE_ENDIAN
  arm64: Remove all usage of __AARCH64EB__
  arm64: Remove all usage of CONFIG_CPU_BIG_ENDIAN
  KVM: arm64: Remove support for a big-endian hypervisor object
  arm64: vdso32: Always build compat vDSO object as little-endian
  arm64: assembler: Remove endianness helper macros
  arm64: lib: Assume a little-endian kernel in optimised string routines
  arm64: lib: Assume a little-endian kernel in custom library routines
  arm64: crypto: Assume a little-endian kernel
  arm64: bpf: Remove big-endian support from the JIT compiler
  selftests/arm64: Remove big-endian support

* for-next/smccc-bus:
  : Switch Arm SMCCC firmware services to an SMCCC bus
  arm64: rsi: Correct type of realm_config::hash_algo
  firmware: smccc: Pass only the required device probe arguments
  firmware: arm_rmm: Add SPDX and sort the Kconfig and Makefile entries
  coco: guest: arm64: Remove dummy CCA platform device
  coco: guest: arm64: Add sysfs ABI for CCA Realm guests
  firmware: smccc: arm-cca-guest: Bind the TSM provider to an SMCCC device
  virt: coco: arm-cca-guest: Rename TSM report source file
  arm64: realm: Move Realm memory encryption ops to RSI code
  firmware: arm_rmm: Move RSI support out of arch/arm64
  firmware: hwrng: arm_smccc_trng: Register as an SMCCC device
  firmware: smccc: Add an Arm SMCCC bus

* for-next/preemptible-this-cpu:
  : Preemptible this_cpu_*() operations
  arm64: percpu: Remove _pcp_protect*() wrappers
  arm64: percpu: Implement preemptible CMPXCHG128 ops
  arm64: percpu: Implement preemptible CMPXCHG ops
  arm64: percpu: Implement preemptible XCHG ops
  arm64: percpu: Implement preemptible return RMW ops
  arm64: percpu: Implement preemptible void RMW ops
  arm64: percpu: Implement preemptible read/write ops
  arm64: percpu: Add infrastructure for preemptible this_cpu_*() ops
  arm64: entry: sdei: Make 'tsk' available
  arm64: entry: sdei: Restore all clobberable GPRs
  arm64: gpr-num: add __GPR_NUM() helper
  arm64: gpr-num: Add wxN aliases for wN registers
  arm64: percpu: Factor out percpu offset asm
  arm64: ptrace: Always inline pt_regs_{read,write}_reg()
  arm64: preempt: Treat should_resched() as unlikely
  arm64: preempt: Simplify and optimize __preempt_count_dec_and_test()
  arm64: cmpxchg128: LSE: Remove redundant operands
  arm64: cmpxchg: LL/SC: Avoid redundant extension

* for-next/cpu-errata:
  : Various CPU errata workarounds
  arm64: errata: Add NXP i.MX8QM/8QP workaround for A53 cache coherency issue
  arm64: cpufeature: Add ARM64_CPUCAP_SOC_ERRATUM for SoC-level errata

* for-next/mpam: (30 commits)
  : MPAM updates
  arm_mpam: make the mon_sel guard conditional only
  arm_mpam: On saving mbwu state read the monitors before clearing CFG_MBWU_CTL
  arm_mpam: detect and enable MPAM-Fb PCC support
  arm_mpam: change MPAM-Fb error IRQ to use a threaded IRQ handler
  arm_mpam: add MPAM-Fb MSC firmware access support
  arm_mpam: prepare mon_sel locking for MPAM-Fb
  arm_mpam: propagate MSC access errors in mpam_reset_class_locked()
  arm_mpam: propagate MSC access errors for interrupt control
  arm_mpam: propagate MSC access errors for mpam_reprogram_ris_partid()
  arm_mpam: propagate MSC access errors for state saving function
  arm_mpam: propagate MSC access errors for __ris_msmon_read()
  arm_mpam: propagate MSC access errors for msmon helpers
  arm_mpam: propagate MSC access errors for MBWU counters
  arm_mpam: propagate MSC access errors for hw_probe functions
  arm_mpam: let low level MSC accessors return an error
  MAINTAINERS: Use linux-arm-kernel list for the MPAM driver
  MAINTAINERS: Add mpam.rst to the MPAM DRIVER entry
  arm_mpam: resctrl: Don't stop early when tearing down a class
  arm_mpam: Switch to kvzmalloc_objs() for allocation of component cfg
  arm_mpam: Don't loop forever if there is the maximum possible amount of PARTIDs
  ...

* for-next/kselftest:
  : arm64 kselftest updates
  kselftest/arm64: signal: copy each test binary only once
  kselftest/arm64/mte: Use MTE safe memory accessors
  kselftest/arm64/mte: Introduce MTE safe memory accessors
  kselftest/arm64: Extend gcs-locking to cover cases where enable is unlocked

* for-next/efi:
  : arm64 EFI updates/fixes
  arm64/mm: Treat faults taken by EFI runtime firmware as kernel faults
  arm64/efi: Clear PTE_WRITE when applying EFI_MEMORY_RO

* for-next/secondary-boot-prep:
  : cpuinfo cleanup in preparation for parallel secondary bring-up
  arm64: smp: Defer RCU registration during secondary CPU bringup
  arm64: smp: Don't bother printing the I-cache policy for each CPU
  arm64: smp: Defer update of secondary CPU capabilities
  arm64: smp: Tidy up cpuinfo init and cpufeature updates
  arm64: smp: Tidy up smp_prepare_cpus()
  arm64: cpufeature: Store every ID register with its overrides applied
  arm64: cpufeature: Read MPAMIDR_EL1 in __cpuinfo_store_cpu()
  arm64: cpufeature: Add read_cpuid_with_overrides()
  arm64: cpufeature: Check arm64_ftr_regs[] before the first store

* for-next/sysreg:
  : sysreg updates
  perf: arm_brbe: Remove the check for TME transaction states
  arm64: sysreg: Mark fields the architecture dropped as RES0
  arm64: sysreg: Fix the names of two misspelt fields
  arm64: sysreg: Fix three incorrect enum values

* for-next/gcs:
  : GCS updates/fixes
  kselftest/arm64: Check for -EPERM not -EBUSY in the locking test
  arm64: gcs: Return -EPERM not -EBUSY for prctl() locking failures
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* arm64/for-next/perf: (22 commits)
  drivers/perf: apple_m1: Add macOS 27 M2 Event
  perf/marvell: cn10k_tad: Publish the OF module alias
  perf: xgene: initialize lock before requesting IRQ
  perf: marvell: avoid large stack variables
  perf/dwc_pcie: Fix PCI device reference leak in probe
  coresight: perf: Suppress ITRACE start records
  perf: arm_spe: Suppress redundant ITRACE start records
  perf/core: Export perf_event_itrace_started()
  perf/cxl: Clear stale overflow status before using a counter
  perf/cxl: Don't log through pmu.dev in the overflow interrupt handler
  perf/cxl: Validate the hardware-reported counter width
  perf/cxl: Unfreeze counters after handling an overflow interrupt
  perf/cxl: Don't share the overflow interrupt, and keep it pinned
  cxl/pci: Add the PMUs after configuring events
  perf/cxl: Split the MSI vector out of info-&gt;irq
  perf/cxl: Accept an overflow interrupt on MSI message number 0
  perf/cxl: Fix the counter overflow delta fixup
  perf/cxl: Clear stale event fields before reprogramming a counter
  perf/cxl: Program the requested event group on configurable counters
  drivers/perf: hisi: Add cycle event for new MN PMU
  ...

* for-next/misc:
  arm64: cpufeature: Enable BBML2 for NVIDIA Rigel
  arm64: cputype: Add NVIDIA Rigel definitions
  arm64: raise default ARCH_MMAP_RND_BITS for 48-bit and 52-bit VA
  arm64/debug: mask debug exceptions when called from common code
  arm64: clear_page[s] using memset
  arm64/sve: Don't zero the SVE state buffer when the SVE state is live
  arm64/cpufeature: Drop redundant define(ID_AA64MMFR0..._SUPPORTED_LPA2)
  arm64: Use proper include variant
  arm64: include: fix repeated word 'to' in comment
  selftests: arm64: fix typo "hander" in comment
  arm64: fix typos in comments
  docs: arm64: Fix typo "initalised" in booting.rst
  arm64: alternative: Remove 'cfg' parameter
  arm64: mte-kasan: Use IS_ENABLED() rather than ALTERNATIVE() 'cfg' parameter
  arm64/cpufeature: Change description for ARM64_HAS_LPA2

* for-next/be-gone:
  drivers: Kconfig: Simplify dependencies on ARM64 &amp;&amp; !CPU_BIG_ENDIAN
  arm64: Kbuild: Remove vestigial big-endian support
  gve: Add explicit ARM64 dependency to Kconfig
  crypto: hisilicon/sec2: Remove check of CONFIG_CPU_LITTLE_ENDIAN
  arm64: Remove all usage of __AARCH64EB__
  arm64: Remove all usage of CONFIG_CPU_BIG_ENDIAN
  KVM: arm64: Remove support for a big-endian hypervisor object
  arm64: vdso32: Always build compat vDSO object as little-endian
  arm64: assembler: Remove endianness helper macros
  arm64: lib: Assume a little-endian kernel in optimised string routines
  arm64: lib: Assume a little-endian kernel in custom library routines
  arm64: crypto: Assume a little-endian kernel
  arm64: bpf: Remove big-endian support from the JIT compiler
  selftests/arm64: Remove big-endian support

* for-next/smccc-bus:
  : Switch Arm SMCCC firmware services to an SMCCC bus
  arm64: rsi: Correct type of realm_config::hash_algo
  firmware: smccc: Pass only the required device probe arguments
  firmware: arm_rmm: Add SPDX and sort the Kconfig and Makefile entries
  coco: guest: arm64: Remove dummy CCA platform device
  coco: guest: arm64: Add sysfs ABI for CCA Realm guests
  firmware: smccc: arm-cca-guest: Bind the TSM provider to an SMCCC device
  virt: coco: arm-cca-guest: Rename TSM report source file
  arm64: realm: Move Realm memory encryption ops to RSI code
  firmware: arm_rmm: Move RSI support out of arch/arm64
  firmware: hwrng: arm_smccc_trng: Register as an SMCCC device
  firmware: smccc: Add an Arm SMCCC bus

* for-next/preemptible-this-cpu:
  : Preemptible this_cpu_*() operations
  arm64: percpu: Remove _pcp_protect*() wrappers
  arm64: percpu: Implement preemptible CMPXCHG128 ops
  arm64: percpu: Implement preemptible CMPXCHG ops
  arm64: percpu: Implement preemptible XCHG ops
  arm64: percpu: Implement preemptible return RMW ops
  arm64: percpu: Implement preemptible void RMW ops
  arm64: percpu: Implement preemptible read/write ops
  arm64: percpu: Add infrastructure for preemptible this_cpu_*() ops
  arm64: entry: sdei: Make 'tsk' available
  arm64: entry: sdei: Restore all clobberable GPRs
  arm64: gpr-num: add __GPR_NUM() helper
  arm64: gpr-num: Add wxN aliases for wN registers
  arm64: percpu: Factor out percpu offset asm
  arm64: ptrace: Always inline pt_regs_{read,write}_reg()
  arm64: preempt: Treat should_resched() as unlikely
  arm64: preempt: Simplify and optimize __preempt_count_dec_and_test()
  arm64: cmpxchg128: LSE: Remove redundant operands
  arm64: cmpxchg: LL/SC: Avoid redundant extension

* for-next/cpu-errata:
  : Various CPU errata workarounds
  arm64: errata: Add NXP i.MX8QM/8QP workaround for A53 cache coherency issue
  arm64: cpufeature: Add ARM64_CPUCAP_SOC_ERRATUM for SoC-level errata

* for-next/mpam: (30 commits)
  : MPAM updates
  arm_mpam: make the mon_sel guard conditional only
  arm_mpam: On saving mbwu state read the monitors before clearing CFG_MBWU_CTL
  arm_mpam: detect and enable MPAM-Fb PCC support
  arm_mpam: change MPAM-Fb error IRQ to use a threaded IRQ handler
  arm_mpam: add MPAM-Fb MSC firmware access support
  arm_mpam: prepare mon_sel locking for MPAM-Fb
  arm_mpam: propagate MSC access errors in mpam_reset_class_locked()
  arm_mpam: propagate MSC access errors for interrupt control
  arm_mpam: propagate MSC access errors for mpam_reprogram_ris_partid()
  arm_mpam: propagate MSC access errors for state saving function
  arm_mpam: propagate MSC access errors for __ris_msmon_read()
  arm_mpam: propagate MSC access errors for msmon helpers
  arm_mpam: propagate MSC access errors for MBWU counters
  arm_mpam: propagate MSC access errors for hw_probe functions
  arm_mpam: let low level MSC accessors return an error
  MAINTAINERS: Use linux-arm-kernel list for the MPAM driver
  MAINTAINERS: Add mpam.rst to the MPAM DRIVER entry
  arm_mpam: resctrl: Don't stop early when tearing down a class
  arm_mpam: Switch to kvzmalloc_objs() for allocation of component cfg
  arm_mpam: Don't loop forever if there is the maximum possible amount of PARTIDs
  ...

* for-next/kselftest:
  : arm64 kselftest updates
  kselftest/arm64: signal: copy each test binary only once
  kselftest/arm64/mte: Use MTE safe memory accessors
  kselftest/arm64/mte: Introduce MTE safe memory accessors
  kselftest/arm64: Extend gcs-locking to cover cases where enable is unlocked

* for-next/efi:
  : arm64 EFI updates/fixes
  arm64/mm: Treat faults taken by EFI runtime firmware as kernel faults
  arm64/efi: Clear PTE_WRITE when applying EFI_MEMORY_RO

* for-next/secondary-boot-prep:
  : cpuinfo cleanup in preparation for parallel secondary bring-up
  arm64: smp: Defer RCU registration during secondary CPU bringup
  arm64: smp: Don't bother printing the I-cache policy for each CPU
  arm64: smp: Defer update of secondary CPU capabilities
  arm64: smp: Tidy up cpuinfo init and cpufeature updates
  arm64: smp: Tidy up smp_prepare_cpus()
  arm64: cpufeature: Store every ID register with its overrides applied
  arm64: cpufeature: Read MPAMIDR_EL1 in __cpuinfo_store_cpu()
  arm64: cpufeature: Add read_cpuid_with_overrides()
  arm64: cpufeature: Check arm64_ftr_regs[] before the first store

* for-next/sysreg:
  : sysreg updates
  perf: arm_brbe: Remove the check for TME transaction states
  arm64: sysreg: Mark fields the architecture dropped as RES0
  arm64: sysreg: Fix the names of two misspelt fields
  arm64: sysreg: Fix three incorrect enum values

* for-next/gcs:
  : GCS updates/fixes
  kselftest/arm64: Check for -EPERM not -EBUSY in the locking test
  arm64: gcs: Return -EPERM not -EBUSY for prctl() locking failures
</pre>
</div>
</content>
</entry>
<entry>
<title>kselftest/arm64: signal: copy each test binary only once</title>
<updated>2026-10-15T17:32:59+00:00</updated>
<author>
<name>Sasha Levin</name>
<email>sashal@kernel.org</email>
</author>
<published>2026-10-14T20:01:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7b3b147c4104f8211ad356a78cff9a2dcd966312'/>
<id>7b3b147c4104f8211ad356a78cff9a2dcd966312</id>
<content type='text'>
The signal tests are built in testcases/ and then copied to the output
directory. The copy rule lists every generated program as a target and
copies all of them in each recipe:

  $(TEST_GEN_PROGS): $(PROGS)
          cp $(PROGS) $(OUTPUT)/

In a parallel build make runs that recipe once for each program, so
several cp processes write the same destination files at the same time.
cp then fails with "cannot create regular file ...: File exists", which
fails the arm64 build even though every test compiled. A cross build of
the arm64 signal tests at -j8 hit this in all of 8 runs.

Use a static pattern rule so that each output depends on, and copies,
only its own binary.

Fixes: f96bf4340316 ("kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The signal tests are built in testcases/ and then copied to the output
directory. The copy rule lists every generated program as a target and
copies all of them in each recipe:

  $(TEST_GEN_PROGS): $(PROGS)
          cp $(PROGS) $(OUTPUT)/

In a parallel build make runs that recipe once for each program, so
several cp processes write the same destination files at the same time.
cp then fails with "cannot create regular file ...: File exists", which
fails the arm64 build even though every test compiled. A cross build of
the arm64 signal tests at -j8 hit this in all of 8 runs.

Use a static pattern rule so that each output depends on, and copies,
only its own binary.

Fixes: f96bf4340316 ("kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kselftest/arm64: Check for -EPERM not -EBUSY in the locking test</title>
<updated>2026-10-15T15:45:08+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-10T19:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8c831e5cd3ad56a977337b17693a0bc705aac71f'/>
<id>8c831e5cd3ad56a977337b17693a0bc705aac71f</id>
<content type='text'>
The API has been updated to return the more descriptive -EPERM rather
than -EBUSY, update the selftest to reflect this.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The API has been updated to return the more descriptive -EPERM rather
than -EBUSY, update the selftest to reflect this.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kselftest/arm64/mte: Use MTE safe memory accessors</title>
<updated>2026-10-06T16:02:48+00:00</updated>
<author>
<name>Vladimir Murzin</name>
<email>vladimir.murzin@arm.com</email>
</author>
<published>2026-09-22T10:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9f7af3cf5cc78f880e8d2349d66b46f1341e104c'/>
<id>9f7af3cf5cc78f880e8d2349d66b46f1341e104c</id>
<content type='text'>
Use MTE safe memory accessors instead of library functions with
arbitrary implementations.

Also, for consistency, use accessors even for byte size accesses.

Signed-off-by: Vladimir Murzin &lt;vladimir.murzin@arm.com&gt;
Tested-by: Muhammad Usama Anjum &lt;usama.anjum@arm.com&gt;
Reviewed-by: Muhammad Usama Anjum &lt;usama.anjum@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use MTE safe memory accessors instead of library functions with
arbitrary implementations.

Also, for consistency, use accessors even for byte size accesses.

Signed-off-by: Vladimir Murzin &lt;vladimir.murzin@arm.com&gt;
Tested-by: Muhammad Usama Anjum &lt;usama.anjum@arm.com&gt;
Reviewed-by: Muhammad Usama Anjum &lt;usama.anjum@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kselftest/arm64/mte: Introduce MTE safe memory accessors</title>
<updated>2026-10-06T16:02:48+00:00</updated>
<author>
<name>Vladimir Murzin</name>
<email>vladimir.murzin@arm.com</email>
</author>
<published>2026-09-22T10:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1cd024f3f6ae5a349f06c51161e80101c8329610'/>
<id>1cd024f3f6ae5a349f06c51161e80101c8329610</id>
<content type='text'>
The MTE selftests assume that they can skip (expected) MTE faults by
advancing the PC by 4 in mte_default_handler(), but this is not
generally safe, as the faults are triggered from arbitrary library
functions (e.g. memset() and memcpy()). For instance, memset() could
be implemented as simple as:

  mov	x3, x0       // copy pointer
  add	x4, x0, x2   // calculate end
loop:
  strb	w1, [x3], #1 // faulting access
  cmp	x3, x4
  b.ne	loop
  ret

which leads to an infinite loop since X3 could not be updated.

Or, it could be having advanced implementation (FEAT_MOPS):

  mov	x3, x0         // copy pointer
  setp	[x3]!, x2!, x1 // prologue
  setm	[x3]!, x2!, x1 // main
  sete	[x3]!, x2!, x1 // epilogue
  ret

with faulting access at prologue advancing PC to main could lead to
infinite loop due to main could be triggering unaligned access fault
which kernel fixing up by advancing PC back to prologue.

Instead of relying on arbitrary implementations of library functions
introduce helpers to perform the faulting accesses, where those faults
can safely be handled.

Signed-off-by: Vladimir Murzin &lt;vladimir.murzin@arm.com&gt;
Tested-by: Muhammad Usama Anjum &lt;usama.anjum@arm.com&gt;
Reviewed-by: Muhammad Usama Anjum &lt;usama.anjum@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The MTE selftests assume that they can skip (expected) MTE faults by
advancing the PC by 4 in mte_default_handler(), but this is not
generally safe, as the faults are triggered from arbitrary library
functions (e.g. memset() and memcpy()). For instance, memset() could
be implemented as simple as:

  mov	x3, x0       // copy pointer
  add	x4, x0, x2   // calculate end
loop:
  strb	w1, [x3], #1 // faulting access
  cmp	x3, x4
  b.ne	loop
  ret

which leads to an infinite loop since X3 could not be updated.

Or, it could be having advanced implementation (FEAT_MOPS):

  mov	x3, x0         // copy pointer
  setp	[x3]!, x2!, x1 // prologue
  setm	[x3]!, x2!, x1 // main
  sete	[x3]!, x2!, x1 // epilogue
  ret

with faulting access at prologue advancing PC to main could lead to
infinite loop due to main could be triggering unaligned access fault
which kernel fixing up by advancing PC back to prologue.

Instead of relying on arbitrary implementations of library functions
introduce helpers to perform the faulting accesses, where those faults
can safely be handled.

Signed-off-by: Vladimir Murzin &lt;vladimir.murzin@arm.com&gt;
Tested-by: Muhammad Usama Anjum &lt;usama.anjum@arm.com&gt;
Reviewed-by: Muhammad Usama Anjum &lt;usama.anjum@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kselftest/arm64: Extend gcs-locking to cover cases where enable is unlocked</title>
<updated>2026-10-06T15:28:14+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-01T17:27:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a3fcb14f5673f8127fbb40ce430bb9d1ff61db35'/>
<id>a3fcb14f5673f8127fbb40ce430bb9d1ff61db35</id>
<content type='text'>
The gcs-locking test case currently only covers locking combinations of
the various flags that can be set for GCS (enable, write and push) where
enable is included in the locked bits. Since it is valid to only lock a
combination of write and push while leaving enable user controllable we
should also cover those cases, add coverage for them. The new cases pass
as expected.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The gcs-locking test case currently only covers locking combinations of
the various flags that can be set for GCS (enable, write and push) where
enable is included in the locked bits. Since it is valid to only lock a
combination of write and push while leaving enable user controllable we
should also cover those cases, add coverage for them. The new cases pass
as expected.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/arm64: Remove big-endian support</title>
<updated>2026-09-23T17:19:06+00:00</updated>
<author>
<name>Will Deacon</name>
<email>will@kernel.org</email>
</author>
<published>2026-09-18T14:52:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=97c1757db39d852e6c1ec234476b508c7895cbcf'/>
<id>97c1757db39d852e6c1ec234476b508c7895cbcf</id>
<content type='text'>
Big-endian support on arm64 depends on BROKEN, so the arm64 selftests do
not need to worry about testing this configuration any more.

Remove the 128-bit byte-swapping helper from the fp-ptrace test and the
big-endian definition of RSEQ_SIG_DATA from the rseq test.

Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Marc Zyngier &lt;maz@kernel.org&gt;
Acked-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Big-endian support on arm64 depends on BROKEN, so the arm64 selftests do
not need to worry about testing this configuration any more.

Remove the 128-bit byte-swapping helper from the fp-ptrace test and the
big-endian definition of RSEQ_SIG_DATA from the rseq test.

Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Marc Zyngier &lt;maz@kernel.org&gt;
Acked-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selftests: arm64: fix typo "hander" in comment</title>
<updated>2026-09-23T17:18:35+00:00</updated>
<author>
<name>Hemanth Selam</name>
<email>hemanth.selam@gmail.com</email>
</author>
<published>2026-09-04T10:51:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1ad42ed8a6669795782fbffe1c7a6c9ec60053fc'/>
<id>1ad42ed8a6669795782fbffe1c7a6c9ec60053fc</id>
<content type='text'>
Correct "hander" to "handler", reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt.  Only touches comments, no code
changes.

Assisted-by: Cursor:claude-opus-5
Signed-off-by: Hemanth Selam &lt;hemanth.selam@gmail.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Correct "hander" to "handler", reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt.  Only touches comments, no code
changes.

Assisted-by: Cursor:claude-opus-5
Signed-off-by: Hemanth Selam &lt;hemanth.selam@gmail.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kselftest/arm64: Fix size of thread_data values for pthread_join()</title>
<updated>2026-09-11T12:48:02+00:00</updated>
<author>
<name>Thomas Huth</name>
<email>thuth@redhat.com</email>
</author>
<published>2026-09-09T15:57:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3d1ba5cbfb622025690c218d8f20da92a9ecb383'/>
<id>3d1ba5cbfb622025690c218d8f20da92a9ecb383</id>
<content type='text'>
pthread_join() stores the thread's return value (a "void *", i.e.
8 bytes on 64 bit computers) into the address that is passed as second
parameter. However, the entries of thread_data are only normal "int"s,
i.e. only 4 bytes. The additional 4 bytes of the return value clobber
whatever is adjacent on the stack, i.e. other members of the thread_data
array (which will be re-written in the next iteration of the for-loop,
so that nobody noticed this problem), or another other local variable
on the stack for the last iteration. Use "intptr_t" to declare the
thread_data array entries with the correct size.

Fixes: 29f080881601c ("kselftest/arm64: check GCR_EL1 after context switch")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pthread_join() stores the thread's return value (a "void *", i.e.
8 bytes on 64 bit computers) into the address that is passed as second
parameter. However, the entries of thread_data are only normal "int"s,
i.e. only 4 bytes. The additional 4 bytes of the return value clobber
whatever is adjacent on the stack, i.e. other members of the thread_data
array (which will be re-written in the next iteration of the for-loop,
so that nobody noticed this problem), or another other local variable
on the stack for the last iteration. Use "intptr_t" to declare the
thread_data array entries with the correct size.

Fixes: 29f080881601c ("kselftest/arm64: check GCR_EL1 after context switch")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
