From patchwork Thu Nov 7 13:16:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Brodsky X-Patchwork-Id: 13866441 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7507B322E for ; Thu, 7 Nov 2024 13:17:36 +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=1730985459; cv=none; b=f2YPCtDATgmK06HhrT1D/9KxRXKUUQCvBl24yyjn2pUbiUURRn8xC0qkqfoYle1Pj4ltg8xUrGc+tAzHsmkSJdjSFipXWUW2Sjnqr1Brjh8TOX83G4fN03y767enlqRw/R+xrP0K0mir+zJTti0TvRXqmHICFi3pO0YcnBqoD4A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730985459; c=relaxed/simple; bh=CHZ7QQlwVUkYoN4fFdMyI0YGcgnUYP/RLyTwB7dWOYY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bNx5RxXN5tlN6jHtUKqra1V6B+hGELyGT5yZFOWs2Szsv2emkHYPby4gDa6suS2KyAoeRdQdBISMXGbUoXPsNmEaTb/TxMg7D2LNSszsTEu5oGAYM3CvFcNqP18ka7HXb9/DSUf20pOHPPNssjvGdfuULN0W4oGm7FICz4KwT60= 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 808B7497; Thu, 7 Nov 2024 05:18:04 -0800 (PST) Received: from e123572-lin.arm.com (e123572-lin.cambridge.arm.com [10.1.194.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 35CED3F66E; Thu, 7 Nov 2024 05:17:33 -0800 (PST) From: Kevin Brodsky To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, dave.hansen@linux.intel.com, yury.khrustalev@arm.com, will@kernel.org, linux-kselftest@vger.kernel.org, Kevin Brodsky , Aishwarya TCV Subject: [PATCH] selftests/mm: Define PKEY_UNRESTRICTED for pkey_sighandler_tests Date: Thu, 7 Nov 2024 13:16:40 +0000 Message-ID: <20241107131640.650703-1-kevin.brodsky@arm.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Commit 6e182dc9f268 ("selftests/mm: Use generic pkey register manipulation") makes use of PKEY_UNRESTRICTED in pkey_sighandler_tests. The macro has been proposed for addition to uapi headers [1], but the patch hasn't landed yet. Define PKEY_UNRESTRICTED in pkey-helpers.h for the time being to fix the build. [1] https://lore.kernel.org/all/20241028090715.509527-2-yury.khrustalev@arm.com/ Fixes: 6e182dc9f268 ("selftests/mm: Use generic pkey register manipulation") Reported-by: Aishwarya TCV Signed-off-by: Kevin Brodsky --- Based on arm64 for-next/pkey-signal (49f59573e9e0). --- tools/testing/selftests/mm/pkey-helpers.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/mm/pkey-helpers.h b/tools/testing/selftests/mm/pkey-helpers.h index 9ab6a3ee153b..319f5b6b7132 100644 --- a/tools/testing/selftests/mm/pkey-helpers.h +++ b/tools/testing/selftests/mm/pkey-helpers.h @@ -112,6 +112,10 @@ void record_pkey_malloc(void *ptr, long size, int prot); #define PKEY_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) #endif +#ifndef PKEY_UNRESTRICTED +#define PKEY_UNRESTRICTED 0x0 +#endif + #ifndef set_pkey_bits static inline u64 set_pkey_bits(u64 reg, int pkey, u64 flags) {