Re: [RFC][PATCH 0/3] arm64 relaxed ABI

2019-02-26 Thread Kevin Brodsky
On 25/02/2019 18:02, Szabolcs Nagy wrote: On 25/02/2019 16:57, Catalin Marinas wrote: On Tue, Feb 19, 2019 at 06:38:31PM +, Szabolcs Nagy wrote: i think these rules work for the cases i care about, a more tricky question is when/how to check for the new syscall abi and when/how the TCR_EL1.

Re: [RFC][PATCH 0/3] arm64 relaxed ABI

2019-02-11 Thread Kevin Brodsky
On 19/12/2018 12:52, Dave Martin wrote: On Tue, Dec 18, 2018 at 05:59:38PM +, Catalin Marinas wrote: On Tue, Dec 18, 2018 at 04:03:38PM +0100, Andrey Konovalov wrote: On Wed, Dec 12, 2018 at 4:02 PM Catalin Marinas wrote: The summary of our internal discussions (mostly between kernel deve

Re: [RFC][PATCH 0/3] arm64 relaxed ABI

2019-02-14 Thread Kevin Brodsky
On 13/02/2019 21:41, Evgenii Stepanov wrote: On Wed, Feb 13, 2019 at 9:43 AM Dave Martin wrote: On Wed, Feb 13, 2019 at 04:42:11PM +, Kevin Brodsky wrote: (+Cc other people with MTE experience: Branislav, Ruben) [...] I'm wondering whether we can piggy-back on existing concepts

Re: [PATCH v19 00/15] arm64: untag user pointers passed to the kernel

2019-08-01 Thread Kevin Brodsky
On 31/07/2019 17:50, Dave Hansen wrote: On 7/23/19 10:58 AM, Andrey Konovalov wrote: The mmap and mremap (only new_addr) syscalls do not currently accept tagged addresses. Architectures may interpret the tag as a background colour for the corresponding vma. What the heck is a "background colour

Re: [PATCH v19 02/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-08-01 Thread Kevin Brodsky
On 31/07/2019 18:05, Dave Hansen wrote: On 7/23/19 10:58 AM, Andrey Konovalov wrote: +long set_tagged_addr_ctrl(unsigned long arg) +{ + if (!tagged_addr_prctl_allowed) + return -EINVAL; + if (is_compat_task()) + return -EINVAL; + if (arg & ~PR_TAGGED

Re: [RFC][PATCH 0/3] arm64 relaxed ABI

2019-02-13 Thread Kevin Brodsky
(+Cc other people with MTE experience: Branislav, Ruben) On 13/02/2019 14:58, Dave Martin wrote: On Tue, Feb 12, 2019 at 06:02:24PM +, Catalin Marinas wrote: On Mon, Feb 11, 2019 at 12:32:55PM -0800, Evgenii Stepanov wrote: On Mon, Feb 11, 2019 at 9:28 AM Kevin Brodsky wrote: On 19/12

Re: [PATCH] psci: add CPU_IDLE dependency

2017-07-31 Thread Kevin Brodsky
der though, shouldn't cpuidle.h declare cpuidle_devices conditionally on CONFIG_CPU_IDLE? Fixes: ea8b1c4a6019 ("drivers: psci: PSCI checker module") Signed-off-by: Arnd Bergmann Acked-by: Kevin Brodsky Cheers, Kevin --- drivers/firmware/Kconfig | 2 +- 1 file changed, 1

Re: [PATCH] psci: add CPU_IDLE dependency

2017-07-31 Thread Kevin Brodsky
On 31/07/17 15:14, Jean Delvare wrote: Hi Kevin, On Mon, 31 Jul 2017 11:19:39 +0100, Kevin Brodsky wrote: On 31/07/17 09:55, Arnd Bergmann wrote: I ran into a build error for the psci_checker: drivers/firmware/psci_checker.o: In function `psci_checker': psci_checker.c:(.init.text+

[PATCH 14/14] selftests/mm: Remove X permission from sigaltstack mapping

2024-12-09 Thread Kevin Brodsky
There is no reason why the alternate signal stack should be mapped as RWX. Map it as RW instead. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/pkey_sighandler_tests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/mm

[PATCH 13/14] selftests/mm: Skip pkey_sighandler_tests if support is missing

2024-12-09 Thread Kevin Brodsky
The pkey_sighandler_tests are bound to fail if either the kernel or CPU doesn't support pkeys. Skip the tests if pkeys support is missing. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/pkey_sighandler_tests.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/te

[PATCH 10/14] selftests/mm: Ensure non-global pkey symbols are marked static

2024-12-09 Thread Kevin Brodsky
for some architectures. Mark them __maybe_unused to suppress compiler warnings. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/pkey-helpers.h | 3 + .../selftests/mm/pkey_sighandler_tests.c | 6 +- tools/testing/selftests/mm/protection_keys.c | 132 +- 3

[PATCH 00/14] pkeys kselftests improvements

2024-12-09 Thread Kevin Brodsky
ux-foundation.org Cc: aruna.ramakris...@oracle.com Cc: catalin.mari...@arm.com Cc: dave.han...@linux.intel.com Cc: joey.go...@arm.com Cc: keith.lu...@oracle.com Cc: ryan.robe...@arm.com Cc: sh...@kernel.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kselft...@vger.kernel.org Cc: x...@kernel.org -

[PATCH 01/14] selftests/mm: Fix condition in uffd_move_test_common()

2024-12-09 Thread Kevin Brodsky
is likely to be false. Use the same condition as when saving so that the globals are restored as intended. Fixes: a2bf6a9ca805 ("selftests/mm: add UFFDIO_MOVE ioctl test") Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/uffd-unit-tests.c | 2 +- 1 file changed, 1 insertion(+

[PATCH 08/14] selftests/mm: Ensure pkey-*.h define inline functions only

2024-12-09 Thread Kevin Brodsky
patch does just that. read_ptr() is an exception as it must not be inlined. Since it is only called from protection_keys.c, we just move it there. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/pkey-arm64.h | 4 ++-- tools/testing/selftests/mm/pkey-helpers.h| 8

[PATCH 03/14] selftests/mm: Fix strncpy() length

2024-12-09 Thread Kevin Brodsky
GCC complains (with -O2) that the length is equal to the destination size, which is indeed invalid. Subtract 1 from the size of the array to leave room for '\0'. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/write_to_hugetlbfs.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 04/14] selftests/mm: Fix -Warray-bounds warnings in pkey_sighandler_tests

2024-12-09 Thread Kevin Brodsky
ct is likely at address zero Using NULL instead seems to make it happy. This should make no difference in practice (SIGSEGV with SEGV_MAPERR will be the outcome regardless), we just need to update the expected si_addr. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/pkey_sighand

[PATCH 02/14] selftests/mm: Fix -Wmaybe-uninitialized warnings

2024-12-09 Thread Kevin Brodsky
A few -Wmaybe-uninitialized warnings show up when building the mm tests with -O2. None of them looks worrying; silence them by initialising the problematic variables. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/ksm_tests.c | 2 +- tools/testing/selftests/mm/mremap_test.c

[PATCH 05/14] selftests/mm: Build with -O2

2024-12-09 Thread Kevin Brodsky
The mm kselftests are currently built with no optimisation (-O0). It's unclear why, and besides being obviously suboptimal, this also prevents the pkeys tests from working as intended. Let's build all the tests with -O2. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/Ma

[PATCH 06/14] selftests/mm: Remove unused pkey helpers

2024-12-09 Thread Kevin Brodsky
Commit 5f23f6d082a9 ("x86/pkeys: Add self-tests") introduced a number of helpers and functions that don't seem to have ever been used. Let's remove them. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/pkey-helpers.h| 34 tools/

[PATCH 11/14] selftests/mm: Use sys_pkey helpers consistently

2024-12-09 Thread Kevin Brodsky
protections_keys.c, since it relies on sys_pkey_{alloc,free}. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/Makefile | 4 +- tools/testing/selftests/mm/pkey-helpers.h | 2 + .../selftests/mm/pkey_sighandler_tests.c | 8 ++-- tools/testing/selftests/mm/pkey_util.c

[PATCH 12/14] selftests/mm: Rename pkey register macro

2024-12-09 Thread Kevin Brodsky
misunderstanding. This is consistent with the PKEY_REG_ALLOW_NONE macro introduced by commit 6e182dc9f268 ("selftests/mm: Use generic pkey register manipulation"). Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/pkey-arm64.h | 2 +- tools/testing/selftests/mm/protection_keys.c |

[PATCH 09/14] selftests/mm: Remove empty pkey helper definition

2024-12-09 Thread Kevin Brodsky
add a comment clarifying that. We can also remove the empty definition in pkey_sighandler_tests.c: expected_pkey_fault() is not meant to be called from there. Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/pkey-helpers.h | 6 -- tools/testing/selftests/mm/pkey_sighandler_te

[PATCH 07/14] selftests/mm: Define types using typedef in pkey-helpers.h

2024-12-09 Thread Kevin Brodsky
Using #define to define types should be avoided. Use typedef instead. Also ensure that __u* types are actually defined by including . Signed-off-by: Kevin Brodsky --- tools/testing/selftests/mm/pkey-helpers.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools

[PATCH] selftests/mm: silence unused-result warnings

2025-01-07 Thread Kevin Brodsky
upstream toolchains where FORTIFY_SOURCE is not implicitly enabled. Suggested-by: Ryan Roberts Signed-off-by: Kevin Brodsky --- Hi Andrew, Could you please take this fixup patch for "selftests/mm: Build with -O2" in mm-unstable? Ryan found that building the mm kselftests on Ubuntu yields

[PATCH] selftests/mm: fix dependency on pkey_util.c

2024-12-16 Thread Kevin Brodsky
so we need to add an explicit dependency there as well. Signed-off-by: Kevin Brodsky --- Hi Alexander, Thank you for the bug report, that patch indeed breaks all architectures that don't support pkeys, I should have realised that! This patch should fix it. Andrew, it would make sense to s

[PATCH] selftests/mm: Fix -Wnull-dereference on Clang

2024-12-18 Thread Kevin Brodsky
: Kevin Brodsky --- Hi Andrew, Another fixup for an issue reported by the LKP CI (building with Clang instead of GCC). This should be squashed into the patch I'm replying to: "selftests/mm: Fix -Warray-bounds warnings in pkey_sighandler_tests" Cheers, - Kevin Cc: aruna.ramakris..

[PATCH] kunit: Clarify kunit_skip() argument name

2025-02-17 Thread Kevin Brodsky
kunit_skip() and kunit_mark_skipped() can only be passed a pointer to a struct kunit, not struct kunit_suite (only kunit_log() actually supports both). Rename their first argument accordingly. Signed-off-by: Kevin Brodsky --- Cc: Brendan Higgins Cc: David Gow Cc: Rae Moar Cc: linux-kselft