From patchwork Mon Dec 9 09:47:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Khrustalev X-Patchwork-Id: 13899154 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFC94215F5A; Mon, 9 Dec 2024 09:47:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733737655; cv=none; b=qQ+qHUoeUdMauKwjawTSu5YdJU8riQM7mK6sk05j0taT5fpZRTejxJIM0XFm7rzVheOIPxUndvUq5i+pxspmSqXY0a6IC3YP4ZEmS10SKGSfqAJVdNXJMCVdR0kX6fshxHKuj63/Sf6FGCxDVtgFMKfNDXz1OiR8P8gYm5h3n0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733737655; c=relaxed/simple; bh=/CI2IVKQX6MDa4bGd0sZmJxv5K5DqZ5zF5AGRqppM6A=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=PX6IVCG2tvFa3ljIjv8ZE+LXkfN6Assd5uxVvz0/Oz2D5cDr8jQNdhj92A7jnYBhNvMYlHVNmHP4dSFEE1c4zNDBVSjzdRqBfDJYSKTedXtotBq+Lnv6diCdyqJO9HQIWMqBt+3PJ3LyQj2vfgb40nVaLIPpsjPBxEBEDduw6Pc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 15355113E; Mon, 9 Dec 2024 01:47:59 -0800 (PST) Received: from udebian.localdomain (unknown [10.1.35.36]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 91E573F720; Mon, 9 Dec 2024 01:47:28 -0800 (PST) From: Yury Khrustalev To: linux-arch@vger.kernel.org Cc: Arnd Bergmann , Kevin Brodsky , Joey Gouly , Dave Hansen , Sandipan Das , Michael Ellerman , Catalin Marinas , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, nd@arm.com, Yury Khrustalev Subject: [RESEND v4 0/3] mm/pkey: Add PKEY_UNRESTRICTED macro Date: Mon, 9 Dec 2024 09:47:16 +0000 Message-Id: <20241209094719.2431126-1-yury.khrustalev@arm.com> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add PKEY_UNRESTRICTED macro to mman.h and use it in selftests. For context, this change will also allow for more consistent update of the Glibc manual which in turn will help with introducing memory protection keys on AArch64 targets. Applies to fac04efc5c79 (tag: v6.13-rc2). Note that I couldn't build ppc tests so I would appreciate if someone could check the 3rd patch. Thank you! Signed-off-by: Yury Khrustalev --- Changes in v4: - Removed change to tools/include/uapi/asm-generic/mman-common.h as it is not necessary. Link to v3: https://lore.kernel.org/all/20241028090715.509527-1-yury.khrustalev@arm.com/ Changes in v3: - Replaced previously missed 0-s tools/testing/selftests/mm/mseal_test.c - Replaced previously missed 0-s in tools/testing/selftests/mm/mseal_test.c Link to v2: https://lore.kernel.org/linux-arch/20241027170006.464252-2-yury.khrustalev@arm.com/ Changes in v2: - Update tools/include/uapi/asm-generic/mman-common.h as well - Add usages of the new macro to selftests. Link to v1: https://lore.kernel.org/linux-arch/20241022120128.359652-1-yury.khrustalev@arm.com/ --- Yury Khrustalev (3): mm/pkey: Add PKEY_UNRESTRICTED macro selftests/mm: Use PKEY_UNRESTRICTED macro selftests/powerpc: Use PKEY_UNRESTRICTED macro include/uapi/asm-generic/mman-common.h | 1 + tools/testing/selftests/mm/mseal_test.c | 6 +++--- tools/testing/selftests/mm/pkey-helpers.h | 3 ++- tools/testing/selftests/mm/pkey_sighandler_tests.c | 4 ++-- tools/testing/selftests/mm/protection_keys.c | 2 +- tools/testing/selftests/powerpc/include/pkeys.h | 2 +- tools/testing/selftests/powerpc/mm/pkey_exec_prot.c | 2 +- tools/testing/selftests/powerpc/mm/pkey_siginfo.c | 2 +- tools/testing/selftests/powerpc/ptrace/core-pkey.c | 6 +++--- tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c | 6 +++--- 10 files changed, 18 insertions(+), 16 deletions(-)