Re: [PATCH v2] kselftest/arm64: abi: fix SVCR detection

2024-12-13 Thread Catalin Marinas
On Wed, 11 Dec 2024 19:16:39 +0800, Weizhao Ouyang wrote: > When using svcr_in to check ZA and Streaming Mode, we should make sure > that the value in x2 is correct, otherwise it may trigger an Illegal > instruction if FEAT_SVE and !FEAT_SME. > > Applied to arm64 (for-next/fixes), thanks! [1/1]

Re: [PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers

2024-11-12 Thread Catalin Marinas
On Wed, 06 Nov 2024 17:07:51 +, Mark Brown wrote: > We don't currently validate that we exit streaming mode and clear ZA when > we enter a signal handler. Add simple checks for this in the SSVE and ZA > tests. > > Applied to arm64 (for-next/kselftest), thanks! [1/1] kselftest/arm64: Check t

Re: (subset) [PATCH 0/4] kselftest/arm64: Fix compilation warnings/errors in the arm64 tests

2024-11-12 Thread Catalin Marinas
On Fri, 08 Nov 2024 13:49:16 +, Catalin Marinas wrote: > It looks like people started ignoring the compiler warnings (or even > errors) when building the arm64-specific kselftests. The first three > patches are printf() arguments adjustment. The last one adds > ".arch_extensio

Re: [PATCH v2 0/3] kselftest/arm64: fp-ptrace enhancements

2024-11-12 Thread Catalin Marinas
On Tue, 12 Nov 2024 13:08:13 +, Mark Brown wrote: > This series contains a bit of a grab bag of improvements to the floating > point tests, mainly fp-ptrace. Globally over all the tests we start > using defines from the generated sysregs (following the example of the > KVM selftests) for SVCR,

Re: [PATCH] kselftest/arm64: Fix build with stricter assemblers

2024-11-12 Thread Catalin Marinas
On Fri, 08 Nov 2024 15:20:46 +, Mark Brown wrote: > While some assemblers (including the LLVM assembler I mostly use) will > happily accept SMSTART as an instruction by default others, specifically > gas, require that any architecture extensions be explicitly enabled. > The assembler SME test p

Re: (subset) [PATCH v2 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-11-12 Thread Catalin Marinas
On Thu, 07 Nov 2024 01:39:19 +, Mark Brown wrote: > Currently we test signal delivery to the programs run by fp-stress but > our signal handlers simply count the number of signals seen and don't do > anything with the floating point state. The original fpsimd-test and > sve-test programs had s

Re: [PATCH] kselftest/arm64: Enable build of PAC tests with LLVM=1

2024-11-12 Thread Catalin Marinas
On Mon, 11 Nov 2024 18:32:58 +, Mark Brown wrote: > Currently we don't build the PAC selftests when building with LLVM=1 since > we attempt to test for PAC support in the toolchain before we've set up the > build system to point at LLVM in lib.mk, which has to be one of the last > things in the

Re: [PATCH 0/2] kselftest/arm64: Avoid detecting spurious PAC key collisions

2024-11-12 Thread Catalin Marinas
On Mon, 11 Nov 2024 16:18:54 +, Mark Brown wrote: > The PAC tests currently generate a very small number of false failures > since the limited size of PAC keys, especially with fewer bits allocated > for PAC due to larger VA, means collisions in generated PACs are > possible even if the PAC key

Re: [PATCH v2 3/3] kselftest/arm64: Add FPMR coverage to fp-ptrace

2024-11-12 Thread Catalin Marinas
On Tue, Nov 12, 2024 at 01:08:16PM +, Mark Brown wrote: > + // This has to come after we set PSTATE.SM > +check_fpmr_in: > + tbz x0, #HAVE_FPMR_SHIFT, wait_for_writes > + adrpx7, fpmr_in > + ldr x7, [x7, :lo12:fpmr_in] > + msr FPMR, x7 Did this build for you

Re: [PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers

2024-11-12 Thread Catalin Marinas
On Wed, Nov 06, 2024 at 05:07:51PM +, Mark Brown wrote: > diff --git a/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c > b/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c > index > 6dbe48cf8b09ed8b7a5ab47690bd87e39e18e1e6..3dee68fa36d1cf2716f54d5f328b3f4077493c3b > 1006

Re: [PATCH 2/4] kselftest/arm64: Use a define for SVCR

2024-11-11 Thread Catalin Marinas
On Thu, Nov 07, 2024 at 01:38:05AM +, Mark Brown wrote: > For some reason when we're accessing SVCR in the FP tests we use the raw > numerical version of the register name rather than hiding that behind a > preprocessor macro for readability. Since we already use the generated > defines for sys

Re: [PATCH] kselftest/arm64: Fix build with stricter assemblers

2024-11-08 Thread Catalin Marinas
On Fri, Nov 08, 2024 at 03:27:58PM +, Catalin Marinas wrote: > On Fri, Nov 08, 2024 at 03:20:46PM +, Mark Brown wrote: > > While some assemblers (including the LLVM assembler I mostly use) will > > happily accept SMSTART as an instruction by default others, specifically &

Re: [PATCH] kselftest/arm64: Fix build with stricter assemblers

2024-11-08 Thread Catalin Marinas
On Fri, Nov 08, 2024 at 03:20:46PM +, Mark Brown wrote: > While some assemblers (including the LLVM assembler I mostly use) will > happily accept SMSTART as an instruction by default others, specifically > gas, require that any architecture extensions be explicitly enabled. > The assembler SME

Re: (subset) [PATCH v2 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-11-07 Thread Catalin Marinas
On Thu, 07 Nov 2024 01:39:19 +, Mark Brown wrote: > Currently we test signal delivery to the programs run by fp-stress but > our signal handlers simply count the number of signals seen and don't do > anything with the floating point state. The original fpsimd-test and > sve-test programs had s

Re: [PATCH v2 0/2] kselftest/arm64: fp-stress signal delivery interval improvements

2024-11-07 Thread Catalin Marinas
On Wed, 30 Oct 2024 00:02:01 +, Mark Brown wrote: > One of the things that fp-stress does to stress the floating point > context switching is send signals to the test threads it spawns. > Currently we do this once per second but as suggested by Mark Rutland if > we increase this we can improve

Re: [PATCH] kselftest/arm64: Fix encoding for SVE B16B16 test

2024-11-01 Thread Catalin Marinas
On Mon, 28 Oct 2024 20:22:31 +, Mark Brown wrote: > The test for SVE_B16B16 had a cut'n'paste of a SME instruction, fix it with > a relevant SVE instruction. > > Applied to arm64 (for-next/kselftest), thanks! [1/1] kselftest/arm64: Fix encoding for SVE B16B16 test https://git.kernel.o

Re: [PATCH RFT v12 1/8] arm64/gcs: Return a success value from gcs_alloc_thread_stack()

2024-11-01 Thread Catalin Marinas
. Simplify the > interface to just return an int with 0 on success and a negative error code > on failure. > > Acked-by: Deepak Gupta > Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas

Re: [PATCH] kselftest/arm64: Use ksft_perror() to log MTE failures

2024-11-01 Thread Catalin Marinas
On Tue, 29 Oct 2024 12:34:21 +, Mark Brown wrote: > The logging in the allocation helpers variously uses ksft_print_msg() with > very intermittent logging of errno and perror() (which won't produce KTAP > conformant output) when logging the result of API calls that set errno. > Standardise on u

Re: [PATCH] kselftest/arm64: Log fp-stress child startup errors to stdout

2024-10-23 Thread Catalin Marinas
On Wed, 23 Oct 2024 00:20:45 +0100, Mark Brown wrote: > Currently if we encounter an error between fork() and exec() of a child > process we log the error to stderr. This means that the errors don't get > annotated with the child information which makes diagnostics harder and > means that if we mis

Re: [PATCH] kselftest/arm64: Fail the overall fp-stress test if any test fails

2024-10-22 Thread Catalin Marinas
On Thu, 17 Oct 2024 18:43:31 +0100, Mark Brown wrote: > Currently fp-stress does not report a top level test result if it runs to > completion, it always exits with a return code 0. Use the ksft_finished() > helper to ensure that the exit code for the top level program reports a > failure if any of

Re: [v6 PATCH 1/2] hugetlb: arm64: add mte support

2024-10-16 Thread Catalin Marinas
On Tue, 01 Oct 2024 15:52:19 -0700, Yang Shi wrote: > Enable MTE support for hugetlb. > > The MTE page flags will be set on the folio only. When copying > hugetlb folio (for example, CoW), the tags for all subpages will be copied > when copying the first subpage. > > When freeing hugetlb folio,

Re: [PATCH] kselftest/arm64: Validate that GCS push and write permissions work

2024-10-16 Thread Catalin Marinas
On Sat, 05 Oct 2024 01:17:18 +0100, Mark Brown wrote: > Add trivial assembly programs which give themselves the appropriate > permissions and then execute GCSPUSHM and GCSSTR, they will report errors > by generating signals on the non-permitted instructions. Not using libc > minimises the interacti

Re: [PATCH] kselftest/arm64: Ensure stable names for GCS stress test results

2024-10-16 Thread Catalin Marinas
On Fri, 11 Oct 2024 15:36:25 +0100, Mark Brown wrote: > The GCS stress test program currently uses the PID of the threads it > creates in the test names it reports, resulting in unstable test names > between runs. Fix this by using a thread number instead. > > Applied to arm64 (for-next/gcs), th

Re: [PATCH] module: Refine kmemleak scanned areas

2024-09-09 Thread Catalin Marinas
On Mon, Sep 09, 2024 at 08:40:34AM +0100, Vincent Donnefort wrote: > On Sat, Sep 07, 2024 at 03:12:13PM +0100, Catalin Marinas wrote: > > On Fri, Sep 06, 2024 at 04:38:56PM +0100, Vincent Donnefort wrote: > > > commit ac3b43283923 ("module: replace module_la

Re: [PATCH] module: Refine kmemleak scanned areas

2024-09-07 Thread Catalin Marinas
reas which > intended to limit kmemleak scan to sections containing writable data. > This means sections such as .text and .rodata are scanned by kmemleak. > > Refine the scanned areas for modules by limiting it to MOD_TEXT and > MOD_INIT_TEXT mod_mem regions. > > CC: Son

Re: [PATCH] tracing: Inform kmemleak of saved_cmdlines allocation

2024-02-19 Thread Catalin Marinas
+0x14/0xa0 > [] start_kernel+0x12e/0x3c0 > [] x86_64_start_reservations+0x18/0x30 > [] x86_64_start_kernel+0x7b/0x80 > [] secondary_startup_64_no_verify+0x15e/0x16b > > Link: https://lore.kernel.org/linux-trace-kernel/87r0hfnr9r....@kernel.org/ > > Fixes: 44dc5c41b5b1 ("tracing: Fix wasted memory in saved_cmdlines logic") > Reported-by: Kalle Valo > Signed-off-by: Steven Rostedt (Google) Reviewed-by: Catalin Marinas

Re: [PATCH 4/5] kbuild: unify vdso_install rules

2023-10-27 Thread Catalin Marinas
ch/arm64/kernel/vdso32/Makefile | 10 -- For arm64: Acked-by: Catalin Marinas

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-10-27 Thread Catalin Marinas
On Wed, Oct 25, 2023 at 05:52:58PM +0900, Hyesoo Yu wrote: > If we only avoid using ALLOC_CMA for __GFP_TAGGED, would we still be able to > use > the next iteration even if the hardware does not support "tag of tag" ? It depends on how the next iteration looks like. The plan was not to support t

Re: [PATCH RFC 06/37] mm: page_alloc: Allocate from movable pcp lists only if ALLOC_FROM_METADATA

2023-10-17 Thread Catalin Marinas
On Mon, Oct 16, 2023 at 01:41:15PM +0100, Alexandru Elisei wrote: > On Thu, Oct 12, 2023 at 10:25:11AM +0900, Hyesoo Yu wrote: > > I don't think it would be effcient when the majority of movable pages > > do not use GFP_TAGGED. > > > > Metadata pages have a low probability of being in the pcp list

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-09-14 Thread Catalin Marinas
Hi Kuan-Ying, On Wed, Sep 13, 2023 at 08:11:40AM +, Kuan-Ying Lee (李冠穎) wrote: > On Wed, 2023-08-23 at 14:13 +0100, Alexandru Elisei wrote: > > diff --git a/arch/arm64/boot/dts/arm/fvp-base-revc.dts > > b/arch/arm64/boot/dts/arm/fvp-base-revc.dts > > index 60472d65a355..bd050373d6cf 100644 > >

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-09-13 Thread Catalin Marinas
On Mon, Sep 11, 2023 at 02:29:03PM +0200, David Hildenbrand wrote: > On 11.09.23 13:52, Catalin Marinas wrote: > > On Wed, Sep 06, 2023 at 12:23:21PM +0100, Alexandru Elisei wrote: > > > On Thu, Aug 24, 2023 at 04:24:30PM +0100, Catalin Marinas wrote: > > > > On T

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-09-11 Thread Catalin Marinas
On Wed, Sep 06, 2023 at 12:23:21PM +0100, Alexandru Elisei wrote: > On Thu, Aug 24, 2023 at 04:24:30PM +0100, Catalin Marinas wrote: > > On Thu, Aug 24, 2023 at 01:25:41PM +0200, David Hildenbrand wrote: > > > On 24.08.23 13:06, David Hildenbrand wrote: > > > > Re

Re: [PATCH] mm: Move HOLES_IN_ZONE into mm

2021-04-19 Thread Catalin Marinas
HOLES_IN_ZONE > select IOMMU_DMA if IOMMU_SUPPORT > select IRQ_DOMAIN > select IRQ_FORCED_THREADING > @@ -1053,9 +1054,6 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK > def_bool y > depends on NUMA > > -config HOLES_IN_ZONE > - def_bool y > - > source "kernel/Kconfig.hz" For arm64: Acked-by: Catalin Marinas

[GIT PULL] arm64 fix for 5.12-rc8/final

2021-04-16 Thread Catalin Marinas
Hi Linus, A recent commit (2decad92f473, "arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically") broke the kernel build when using the LLVM integrated assembly (only noticeable with clang-12 as MTE is not supported by earlier versions and the code in question not compiled). The Fixes: tag in t

Re: [PATCH 1/3] arm64: ptrace: Add is_syscall_success to handle compat

2021-04-16 Thread Catalin Marinas
On Fri, Apr 16, 2021 at 03:55:31PM +0800, He Zhe wrote: > The general version of is_syscall_success does not handle 32-bit > compatible case, which would cause 32-bit negative return code to be > recoganized as a positive number later and seen as a "success". > > Since is_compat_thread is defined

Re: [PATCH] arm64: alternatives: Move length validation in alternative_{insn, endif}

2021-04-15 Thread Catalin Marinas
On Tue, 13 Apr 2021 17:08:04 -0700, Nathan Chancellor wrote: > After commit 2decad92f473 ("arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is > set atomically"), LLVM's integrated assembler fails to build entry.S: > > :5:7: error: expected assembly-time absolute expression > .org . - (664b-663b) + (662b-6

Re: [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif}

2021-04-15 Thread Catalin Marinas
On Thu, Apr 15, 2021 at 08:50:25AM -0700, Sami Tolvanen wrote: > On Thu, Apr 15, 2021 at 7:02 AM Catalin Marinas > wrote: > > > > On Thu, Apr 15, 2021 at 06:25:57AM -0700, Nathan Chancellor wrote: > > > On Thu, Apr 15, 2021 at 10:17:43AM +0100, Catalin Marinas wrote: &

Re: [PATCH] locking/qrwlock: Fix ordering in queued_write_lock_slowpath

2021-04-15 Thread Catalin Marinas
On Thu, Apr 15, 2021 at 04:28:21PM +0100, Will Deacon wrote: > On Thu, Apr 15, 2021 at 05:03:58PM +0200, Peter Zijlstra wrote: > > On Thu, Apr 15, 2021 at 02:25:52PM +, Ali Saidi wrote: > > > While this code is executed with the wait_lock held, a reader can > > > acquire the lock without holdin

Re: [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif}

2021-04-15 Thread Catalin Marinas
On Thu, Apr 15, 2021 at 06:25:57AM -0700, Nathan Chancellor wrote: > On Thu, Apr 15, 2021 at 10:17:43AM +0100, Catalin Marinas wrote: > > On Tue, Apr 13, 2021 at 05:08:04PM -0700, Nathan Chancellor wrote: > > > After commit 2decad92f473 ("arm64: mte: Ensure TIF_MTE_A

Re: [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif}

2021-04-15 Thread Catalin Marinas
Hi Nathan, On Tue, Apr 13, 2021 at 05:08:04PM -0700, Nathan Chancellor wrote: > After commit 2decad92f473 ("arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is > set atomically"), LLVM's integrated assembler fails to build entry.S: > > :5:7: error: expected assembly-time absolute expression > .org . - (66

Re: [RFC][PATCH] locking: Generic ticket-lock

2021-04-15 Thread Catalin Marinas
(fixed Will's email address) On Thu, Apr 15, 2021 at 10:09:54AM +0200, Peter Zijlstra wrote: > On Thu, Apr 15, 2021 at 05:47:34AM +0900, Stafford Horne wrote: > > > How's this then? Compile tested only on openrisc/simple_smp_defconfig. > > > > I did my testing with this FPGA build SoC: > > > >

Re: [PATCH] arm64:align function __arch_clear_user

2021-04-14 Thread Catalin Marinas
On Wed, Apr 14, 2021 at 05:25:43PM +0800, Kai Shen wrote: > Performance decreases happen in __arch_clear_user when this > function is not correctly aligned on HISI-HIP08 arm64 SOC which > fetches 32 bytes (8 instructions) from icache with a 32-bytes > aligned end address. As a result, if the hot lo

Re: [PATCH] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.

2021-04-14 Thread Catalin Marinas
On Tue, 30 Mar 2021 04:57:50 -0700, zhouchuangao wrote: > It can be optimized at compile time. Applied to arm64 (for-next/misc), it saves one line ;). Thanks! [1/1] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG. https://git.kernel.org/arm64/c/839157876f97 -- Cata

Re: [PATCH] riscv: locks: introduce ticket-based spinlock implementation

2021-04-14 Thread Catalin Marinas
On Wed, Apr 14, 2021 at 08:23:51AM +0800, Guo Ren wrote: > On Tue, Apr 13, 2021 at 5:31 PM Catalin Marinas > wrote: > > On Tue, Apr 13, 2021 at 11:22:40AM +0200, Christoph Müllner wrote: > > > On Tue, Apr 13, 2021 at 10:03 AM Peter Zijlstra > > > wrote: > &g

Re: [PATCH] arch/arm64/kernel/traps: Use find_vma_intersection() in traps for setting si_code

2021-04-13 Thread Catalin Marinas
On Tue, Apr 13, 2021 at 04:52:34PM +, Liam Howlett wrote: > * Catalin Marinas [210412 13:44]: > > On Wed, Apr 07, 2021 at 03:11:06PM +, Liam Howlett wrote: > > > find_vma() will continue to search upwards until the end of the virtual > > > memory space. T

Re: [PATCH] riscv: locks: introduce ticket-based spinlock implementation

2021-04-13 Thread Catalin Marinas
On Tue, Apr 13, 2021 at 12:25:00PM +0200, Christoph Müllner wrote: > On Tue, Apr 13, 2021 at 11:37 AM Peter Zijlstra wrote: > > On Tue, Apr 13, 2021 at 11:22:40AM +0200, Christoph Müllner wrote: > > > What about trylock()? > > > I.e. one could implement trylock() without a loop, by letting > > > t

Re: [PATCH v16 0/9] arm64: ARMv8.5-A: MTE: Add async mode support

2021-04-13 Thread Catalin Marinas
On Mon, 15 Mar 2021 13:20:10 +, Vincenzo Frascino wrote: > This patchset implements the asynchronous mode support for ARMv8.5-A > Memory Tagging Extension (MTE), which is a debugging feature that allows > to detect with the help of the architecture the C and C++ programmatic > memory errors lik

Re: [PATCH] riscv: locks: introduce ticket-based spinlock implementation

2021-04-13 Thread Catalin Marinas
On Tue, Apr 13, 2021 at 11:22:40AM +0200, Christoph Müllner wrote: > On Tue, Apr 13, 2021 at 10:03 AM Peter Zijlstra wrote: > > On Mon, Apr 12, 2021 at 11:54:55PM +0200, Christoph Müllner wrote: > > > On Mon, Apr 12, 2021 at 7:33 PM Palmer Dabbelt wrote: > > > > My plan is to add a generic ticket

Re: linux-next: manual merge of the akpm-current tree with the arm64 tree

2021-04-13 Thread Catalin Marinas
On Tue, Apr 13, 2021 at 06:59:36PM +1000, Stephen Rothwell wrote: > diff --cc lib/test_kasan.c > index 785e724ce0d8,bf9225002a7e.. > --- a/lib/test_kasan.c > +++ b/lib/test_kasan.c > @@@ -78,33 -83,30 +83,35 @@@ static void kasan_test_exit(struct kuni >* fields, it can reorder or op

Re: [PATCH] arch/arm64/kernel/traps: Use find_vma_intersection() in traps for setting si_code

2021-04-12 Thread Catalin Marinas
On Wed, Apr 07, 2021 at 03:11:06PM +, Liam Howlett wrote: > find_vma() will continue to search upwards until the end of the virtual > memory space. This means the si_code would almost never be set to > SEGV_MAPERR even when the address falls outside of any VMA. The result > is that the si_cod

Re: [PATCH v4] kasan: remove redundant config option

2021-04-12 Thread Catalin Marinas
On Sun, Apr 11, 2021 at 03:03:16PM -0700, Andrew Morton wrote: > On Sun, 11 Apr 2021 11:53:33 +0100 Catalin Marinas > wrote: > > On Tue, Mar 30, 2021 at 10:36:37PM -0700, Andrew Morton wrote: > > > On Mon, 29 Mar 2021 16:54:26 +0200 Andrey Konovalov > > > wrot

Re: [PATCH v16 0/9] arm64: ARMv8.5-A: MTE: Add async mode support

2021-04-11 Thread Catalin Marinas
On Thu, Mar 18, 2021 at 06:56:07PM +, Catalin Marinas wrote: > On Mon, Mar 15, 2021 at 01:20:10PM +, Vincenzo Frascino wrote: > > This patchset implements the asynchronous mode support for ARMv8.5-A > > Memory Tagging Extension (MTE), which is a debugging feature that allow

Re: [PATCH v4] kasan: remove redundant config option

2021-04-11 Thread Catalin Marinas
Hi Andrew, On Tue, Mar 30, 2021 at 10:36:37PM -0700, Andrew Morton wrote: > On Mon, 29 Mar 2021 16:54:26 +0200 Andrey Konovalov > wrote: > > Looks like my patch "kasan: fix KASAN_STACK dependency for HW_TAGS" > > that was merged into 5.12-rc causes a build time warning: > > > > include/linux/ka

Re: [PATCH v3] arm64: mte: Move MTE TCF0 check in entry-common

2021-04-09 Thread Catalin Marinas
On Fri, Apr 09, 2021 at 05:18:45PM +0100, Mark Rutland wrote: > On Fri, Apr 09, 2021 at 03:32:47PM +0100, Mark Rutland wrote: > > Hi Vincenzo, > > > > On Fri, Apr 09, 2021 at 02:24:19PM +0100, Vincenzo Frascino wrote: > > > The check_mte_async_tcf macro sets the TIF flag non-atomically. This can >

Re: [PATCH v3] arm64: mte: Move MTE TCF0 check in entry-common

2021-04-09 Thread Catalin Marinas
On Fri, Apr 09, 2021 at 02:24:19PM +0100, Vincenzo Frascino wrote: > diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c > index b3c70a612c7a..84a942c25870 100644 > --- a/arch/arm64/kernel/mte.c > +++ b/arch/arm64/kernel/mte.c > @@ -166,14 +166,43 @@ static void set_gcr_el1_excl(u64 excl

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-08 Thread Catalin Marinas
On Thu, Apr 08, 2021 at 08:16:17PM +0200, David Hildenbrand wrote: > On 08.04.21 16:18, Catalin Marinas wrote: > > On Wed, Apr 07, 2021 at 04:52:54PM +0100, Steven Price wrote: > > > On 07/04/2021 16:14, Catalin Marinas wrote: > > > > On Wed, Apr 07, 2021 at 11:20:

Re: [PATCH] arm64: mte: Remove unused mte_assign_mem_tag_range()

2021-04-08 Thread Catalin Marinas
On Wed, 7 Apr 2021 14:38:17 +0100, Vincenzo Frascino wrote: > mte_assign_mem_tag_range() was added in commit 85f49cae4dfc > ("arm64: mte: add in-kernel MTE helpers") in 5.11 but moved out of > mte.S by commit 2cb34276427a ("arm64: kasan: simplify and inline > MTE functions") in 5.12 and renamed to

Re: [PATCH v2] arm64: Add __init section marker to some functions

2021-04-08 Thread Catalin Marinas
On Tue, 30 Mar 2021 13:54:49 +0800, Jisheng Zhang wrote: > They are not needed after booting, so mark them as __init to move them > to the .init section. Applied to arm64 (for-next/misc), thanks! [1/1] arm64: Add __init section marker to some functions https://git.kernel.org/arm64/c/a7dcf58

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-08 Thread Catalin Marinas
On Wed, Apr 07, 2021 at 04:52:54PM +0100, Steven Price wrote: > On 07/04/2021 16:14, Catalin Marinas wrote: > > On Wed, Apr 07, 2021 at 11:20:18AM +0100, Steven Price wrote: > > > On 31/03/2021 19:43, Catalin Marinas wrote: > > > > When a slot is added by the VMM, i

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-07 Thread Catalin Marinas
On Wed, Apr 07, 2021 at 11:20:18AM +0100, Steven Price wrote: > On 31/03/2021 19:43, Catalin Marinas wrote: > > When a slot is added by the VMM, if it asked for MTE in guest (I guess > > that's an opt-in by the VMM, haven't checked the other patches), can we > > r

Re: [PATCH 09/20] kbuild: arm64: use common install script

2021-04-07 Thread Catalin Marinas
gt; Cc: Catalin Marinas > Cc: Will Deacon > Cc: linux-arm-ker...@lists.infradead.org > Signed-off-by: Greg Kroah-Hartman Assuming that it does the same thing (it seems to from a quick look): Acked-by: Catalin Marinas

Re: [PATCH] arm64/mm: Fix mapping_dirty_helpers with arm64

2021-04-02 Thread Catalin Marinas
g pud_dirty is causing a compilation error. > > The drivers/gpu/drm/vmwgfx code uses mapping_dirty_helpers and > has been ported to ARM64 but it depends on this code getting in > first in order to compile/work. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Peter Zijlst

Re: [PATCH -next] docs: arm64: Fix a grammar error

2021-04-01 Thread Catalin Marinas
On Tue, 30 Mar 2021 04:58:17 -0400, He Ying wrote: > depending -> depending on Applied to arm64 (for-next/misc), thanks! [1/1] docs: arm64: Fix a grammar error https://git.kernel.org/arm64/c/68f638a432df -- Catalin

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-31 Thread Catalin Marinas
On Wed, Mar 31, 2021 at 11:41:20AM +0100, Steven Price wrote: > On 31/03/2021 10:32, David Hildenbrand wrote: > > On 31.03.21 11:21, Catalin Marinas wrote: > > > On Wed, Mar 31, 2021 at 09:34:44AM +0200, David Hildenbrand wrote: > > > > On 30.03.21 12:30, Catalin M

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-31 Thread Catalin Marinas
On Wed, Mar 31, 2021 at 09:34:44AM +0200, David Hildenbrand wrote: > On 30.03.21 12:30, Catalin Marinas wrote: > > On Mon, Mar 29, 2021 at 05:06:51PM +0100, Steven Price wrote: > > > On 28/03/2021 13:21, Catalin Marinas wrote: > > > > On Sat, Mar 27, 2021 at 03:23:24P

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-30 Thread Catalin Marinas
On Mon, Mar 29, 2021 at 05:06:51PM +0100, Steven Price wrote: > On 28/03/2021 13:21, Catalin Marinas wrote: > > On Sat, Mar 27, 2021 at 03:23:24PM +, Catalin Marinas wrote: > > > On Fri, Mar 12, 2021 at 03:18:58PM +, Steven Price wrote: > > > > diff --git

Re: [PATCH v10 1/6] arm64: mte: Sync tags for pages where PTE is untagged

2021-03-30 Thread Catalin Marinas
On Mon, Mar 29, 2021 at 04:55:29PM +0100, Steven Price wrote: > On 26/03/2021 18:56, Catalin Marinas wrote: > > On Fri, Mar 12, 2021 at 03:18:57PM +, Steven Price wrote: > > > A KVM guest could store tags in a page even if the VMM hasn't mapped > > > the page

Re: [PATCH v4 0/5] arm64: kasan: support CONFIG_KASAN_VMALLOC

2021-03-29 Thread Catalin Marinas
On Wed, 24 Mar 2021 12:05:17 +0800, Lecopzer Chen wrote: > Linux supports KAsan for VMALLOC since commit 3c5c3cfb9ef4da9 > ("kasan: support backing vmalloc space with real shadow memory") > > Acroding to how x86 ported it [1], they early allocated p4d and pgd, > but in arm64 I just simulate how KA

Re: [PATCH v2 -next] arm64: smp: Add missing prototype for some smp.c functions

2021-03-29 Thread Catalin Marinas
On Mon, 29 Mar 2021 11:43:43 +0800, Chen Lifu wrote: > In commit eb631bb5bf5b > ("arm64: Support arch_irq_work_raise() via self IPIs") a new > function "arch_irq_work_raise" was added without a prototype. > > In commit d914d4d49745 > ("arm64: Implement panic_smp_self_stop()") a new > function "pan

Re: linux-next: manual merge of the arm64 tree with Linus' tree

2021-03-29 Thread Catalin Marinas
On Mon, Mar 29, 2021 at 09:29:40AM +1100, Stephen Rothwell wrote: > diff --cc arch/arm64/include/asm/cpucaps.h > index c40f2490cd7b,9e3ec4dd56d8.. > --- a/arch/arm64/include/asm/cpucaps.h > +++ b/arch/arm64/include/asm/cpucaps.h > @@@ -66,8 -66,8 +66,9 @@@ > #define ARM64_WORKAROUND_1

Re: [PATCH -next] arm64: smp: Add missing prototype for some smp.c functions

2021-03-28 Thread Catalin Marinas
On Sat, Mar 27, 2021 at 03:06:51PM +0800, Chen Lifu wrote: > In commit eb631bb5bf5b > ("arm64: Support arch_irq_work_raise() via self IPIs") a new > function "arch_irq_work_raise" was added without a prototype > in header irq_work.h > > In commit d914d4d49745 > ("arm64: Implement panic_smp_self_st

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-28 Thread Catalin Marinas
On Sat, Mar 27, 2021 at 03:23:24PM +, Catalin Marinas wrote: > On Fri, Mar 12, 2021 at 03:18:58PM +, Steven Price wrote: > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > > index 77cb2d28f2a4..b31b7a821f90 100644 > > --- a/arch/arm64/kvm/mmu.c > >

Re: [PATCH] arm64: move --fix-cortex-a53-843419 linker test to Kconfig

2021-03-28 Thread Catalin Marinas
On Sun, Mar 28, 2021 at 03:59:29PM +0900, Masahiro Yamada wrote: > On Fri, Mar 26, 2021 at 11:36 PM Catalin Marinas > wrote: > > On Wed, Mar 24, 2021 at 04:11:28PM +0900, Masahiro Yamada wrote: > > > $(call ld-option, --fix-cortex-a53-843419) in arch/arm64/Makefile is >

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-03-27 Thread Catalin Marinas
On Fri, Mar 12, 2021 at 03:18:58PM +, Steven Price wrote: > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 77cb2d28f2a4..b31b7a821f90 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -879,6 +879,22 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, > phy

Re: [PATCH 1/4] arm64: expose orig_x0 in the user_pt_regs structure

2021-03-27 Thread Catalin Marinas
On Fri, Mar 26, 2021 at 05:35:19PM -0700, Andrei Vagin wrote: > On Fri, Mar 26, 2021 at 11:28 AM Catalin Marinas > wrote: > > > > On Mon, Mar 22, 2021 at 03:50:50PM -0700, Andrei Vagin wrote: > > > diff --git a/arch/arm64/include/uapi/asm/ptrace.h > > > b/

Re: [PATCH v10 1/6] arm64: mte: Sync tags for pages where PTE is untagged

2021-03-26 Thread Catalin Marinas
Hi Steven, On Fri, Mar 12, 2021 at 03:18:57PM +, Steven Price wrote: > A KVM guest could store tags in a page even if the VMM hasn't mapped > the page with PROT_MTE. So when restoring pages from swap we will > need to check to see if there are any saved tags even if !pte_tagged(). > > However

Re: [PATCH 2/4] arm64/ptrace: introduce orig_x7 in the user_pt_regs structure

2021-03-26 Thread Catalin Marinas
On Mon, Mar 22, 2021 at 03:50:51PM -0700, Andrei Vagin wrote: > diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h > index d4cdf98ac003..1008f0fbc5ea 100644 > --- a/arch/arm64/include/asm/ptrace.h > +++ b/arch/arm64/include/asm/ptrace.h > @@ -184,6 +184,7 @@ struct pt_re

Re: [PATCH 1/4] arm64: expose orig_x0 in the user_pt_regs structure

2021-03-26 Thread Catalin Marinas
On Mon, Mar 22, 2021 at 03:50:50PM -0700, Andrei Vagin wrote: > diff --git a/arch/arm64/include/uapi/asm/ptrace.h > b/arch/arm64/include/uapi/asm/ptrace.h > index 758ae984ff97..3c118c5b0893 100644 > --- a/arch/arm64/include/uapi/asm/ptrace.h > +++ b/arch/arm64/include/uapi/asm/ptrace.h > @@ -90,6

Re: [PATCH] arm64: move --fix-cortex-a53-843419 linker test to Kconfig

2021-03-26 Thread Catalin Marinas
Hi Masahiro, On Wed, Mar 24, 2021 at 04:11:28PM +0900, Masahiro Yamada wrote: > $(call ld-option, --fix-cortex-a53-843419) in arch/arm64/Makefile is > evaluated every time even for Make targets that do not need the linker, > such as "make ARCH=arm64 install". > > Recently, the Kbuild tree queued

Re: [PATCHv3 0/6] arm64: Support FIQ controller registration

2021-03-24 Thread Catalin Marinas
On Mon, 15 Mar 2021 11:56:23 +, Mark Rutland wrote: > Hector's M1 support series [1] shows that some platforms have critical > interrupts wired to FIQ, and to support these platforms we need to support > handling FIQ exceptions. Other contemporary platforms don't use FIQ (since > e.g. > this i

Re: [PATCH v5 05/19] arm64: Add support for trace synchronization barrier

2021-03-24 Thread Catalin Marinas
24 Mar 2021 15:51:14 +, > > > > Suzuki K Poulose wrote: > > > > > > > > > > On 24/03/2021 13:49, Marc Zyngier wrote: > > > > > > On Wed, 24 Mar 2021 09:39:13 +0000, > > > > > > Suzuki K Poulose wrote: > > > &

Re: linux-next: Signed-off-by missing for commit in the arm64 tree

2021-03-24 Thread Catalin Marinas
On Wed, Mar 24, 2021 at 08:14:45AM +1100, Stephen Rothwell wrote: > Commits > > b17f265bb4cc ("kselftest/arm64: mte: Fix MTE feature detection") > 4dfc9d30a8ab ("kselftest/arm64: mte: common: Fix write() warnings") > > are missing a Signed-off-by from their author. Thanks Stephen. Now fixed.

Re: [PATCH v5 05/19] arm64: Add support for trace synchronization barrier

2021-03-23 Thread Catalin Marinas
Hi Suzuki? On Tue, Mar 23, 2021 at 12:06:33PM +, Suzuki K Poulose wrote: > tsb csync synchronizes the trace operation of instructions. > The instruction is a nop when FEAT_TRF is not implemented. > > Cc: Mathieu Poirier > Cc: Mike Leach > Cc: Catalin Marinas > Cc:

Re: [PATCH 2/3] arm64: lib: improve copy performance when size is ge 128 bytes

2021-03-23 Thread Catalin Marinas
On Tue, Mar 23, 2021 at 01:32:18PM +, Will Deacon wrote: > On Tue, Mar 23, 2021 at 12:08:56PM +, Robin Murphy wrote: > > On 2021-03-23 07:34, Yang Yingliang wrote: > > > When copy over 128 bytes, src/dst is added after > > > each ldp/stp instruction, it will cost more time. > > > To improve

Re: linux-next: manual merge of the akpm tree with the arm64 tree

2021-03-22 Thread Catalin Marinas
On Mon, Mar 22, 2021 at 05:40:23PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the akpm tree got a conflict in: > > arch/arm64/mm/mmu.c > > between commit: > > 87143f404f33 ("arm64: mm: use XN table mapping attributes for the linear > region") > > from the arm

Re: [PATCH] arm64: stacktrace: don't trace arch_stack_walk()

2021-03-19 Thread Catalin Marinas
I've given this a spin with a bunch of > toolchains, verifying the output of /proc/self/stack and checking that > the assembly looked sound. For GCC (where we require version 5.1.0 or > later) I tested with the kernel.org crosstool binares for versions > 5.5.0, 6.4.0, 6.5.0, 7.3.0,

Re: [PATCH 0/6] mm: some config cleanups

2021-03-19 Thread Catalin Marinas
RCH_ENABLE_SPLIT_PMD_PTLOCK > mm: Drop redundant HAVE_ARCH_TRANSPARENT_HUGEPAGE > > arch/arc/Kconfig | 9 ++-- > arch/arm/Kconfig | 10 ++--- > arch/arm64/Kconfig | 30 ++ For arm64: Acked-by: Catalin Marinas

Re: [RESEND PATCH] Kconfig: Move CONFIG_DEBUG_KMEMLEAK_TEST to samples/Kconfig

2021-03-19 Thread Catalin Marinas
And the dependency cannot be guaranteed by Kconfig. > > move the definition of CONFIG_DEBUG_KMEMLEAK_TEST from lib/Kconfig.debug > to samples/Kconfig. > > Signed-off-by: Chen Jun > Acked-by: Catalin Marinas Cc'ing Andrew, I don't think he's seen the patch.

Re: arm64: compiler_types.h:320:38: error: call to __compiletime_assert_417

2021-03-19 Thread Catalin Marinas
On Fri, Mar 19, 2021 at 08:49:07PM +0530, Naresh Kamboju wrote: > [This email landed to Spam for some reason, sending it again with modified > subject] > > While building arm64 kernel modules the following kernel warnings / > errors noticed on linux next 20210318 tag the gcc version is 7.3.0. > Bu

Re: [PATCH v3 0/5] arm64: kasan: support CONFIG_KASAN_VMALLOC

2021-03-19 Thread Catalin Marinas
Hi Lecopzer, On Sat, Feb 06, 2021 at 04:35:47PM +0800, Lecopzer Chen wrote: > Linux supports KAsan for VMALLOC since commit 3c5c3cfb9ef4da9 > ("kasan: support backing vmalloc space with real shadow memory") > > Acroding to how x86 ported it [1], they early allocated p4d and pgd, > but in arm64 I

Re: [PATCH v3 1/5] arm64: kasan: don't populate vmalloc area for CONFIG_KASAN_VMALLOC

2021-03-19 Thread Catalin Marinas
On Sat, Feb 06, 2021 at 04:35:48PM +0800, Lecopzer Chen wrote: > Linux support KAsan for VMALLOC since commit 3c5c3cfb9ef4da9 > ("kasan: support backing vmalloc space with real shadow memory") > > Like how the MODULES_VADDR does now, just not to early populate > the VMALLOC_START between VMALLOC_E

Re: [PATCH V2] mm/memtest: Add ARCH_USE_MEMTEST

2021-03-19 Thread Catalin Marinas
IG_MEMTEST. > Conversely CONFIG_MEMTEST cannot be enabled on platforms where it would > not be tested anyway. > > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Thomas Bogendoerfer > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras

Re: [PATCH] [RFC] arm64: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION

2021-03-19 Thread Catalin Marinas
On Thu, Mar 18, 2021 at 09:41:54AM +0100, Arnd Bergmann wrote: > On Wed, Mar 17, 2021 at 5:18 PM Catalin Marinas > wrote: > > > > On Wed, Mar 17, 2021 at 02:37:57PM +0000, Catalin Marinas wrote: > > > On Thu, Feb 25, 2021 at 12:20:56PM +0100, Arnd Bergmann wrote: >

Re: [PATCH v16 0/9] arm64: ARMv8.5-A: MTE: Add async mode support

2021-03-18 Thread Catalin Marinas
On Mon, Mar 15, 2021 at 01:20:10PM +, Vincenzo Frascino wrote: > This patchset implements the asynchronous mode support for ARMv8.5-A > Memory Tagging Extension (MTE), which is a debugging feature that allows > to detect with the help of the architecture the C and C++ programmatic > memory erro

Re: [PATCH 2/2] arm64: stacktrace: Add skip when task == current

2021-03-18 Thread Catalin Marinas
On Thu, Mar 18, 2021 at 05:12:07PM +, Mark Rutland wrote: > On Thu, Mar 18, 2021 at 04:17:24PM +0000, Catalin Marinas wrote: > > On Wed, Mar 17, 2021 at 07:34:16PM +, Mark Rutland wrote: > > > On Wed, Mar 17, 2021 at 06:36:36PM +0000, Catalin Marinas wrote: > > >

Re: [PATCH 2/2] arm64: stacktrace: Add skip when task == current

2021-03-18 Thread Catalin Marinas
On Wed, Mar 17, 2021 at 07:34:16PM +, Mark Rutland wrote: > On Wed, Mar 17, 2021 at 06:36:36PM +0000, Catalin Marinas wrote: > > On Wed, Mar 17, 2021 at 02:20:50PM +, Chen Jun wrote: > > > On ARM64, cat /sys/kernel/debug/page_owner, all pages return th

Re: [PATCH 2/2] arm64: stacktrace: Add skip when task == current

2021-03-17 Thread Catalin Marinas
On Wed, Mar 17, 2021 at 02:20:50PM +, Chen Jun wrote: > On ARM64, cat /sys/kernel/debug/page_owner, all pages return the same > stack: > stack_trace_save+0x4c/0x78 > register_early_stack+0x34/0x70 > init_page_owner+0x34/0x230 > page_ext_init+0x1bc/0x1dc > > The reason is that: > check_recu

Re: [PATCH] [RFC] arm64: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION

2021-03-17 Thread Catalin Marinas
On Wed, Mar 17, 2021 at 02:37:57PM +, Catalin Marinas wrote: > On Thu, Feb 25, 2021 at 12:20:56PM +0100, Arnd Bergmann wrote: > > diff --git a/arch/arm64/kernel/vmlinux.lds.S > > b/arch/arm64/kernel/vmlinux.lds.S > > index bad2b9eaab22..926cdb597a45 100644 > &

Re: [PATCH] [RFC] arm64: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION

2021-03-17 Thread Catalin Marinas
On Thu, Feb 25, 2021 at 12:20:56PM +0100, Arnd Bergmann wrote: > diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S > index bad2b9eaab22..926cdb597a45 100644 > --- a/arch/arm64/kernel/vmlinux.lds.S > +++ b/arch/arm64/kernel/vmlinux.lds.S > @@ -217,7 +217,7 @@ SECTIONS >

Re: [PATCH mm] kfence: make compatible with kmemleak

2021-03-17 Thread Catalin Marinas
e_ksize() in > slab_post_alloc_hook() (and avoid new IS_ENABLED(CONFIG_DEBUG_KMEMLEAK) > guard), just call kfence_ksize() in mm/kmemleak.c:create_object(). > > Reported-by: Luis Henriques > Cc: Catalin Marinas > Signed-off-by: Marco Elver Reviewed-by: Catalin Marinas

  1   2   3   4   5   6   7   8   9   10   >