From: Sandipan Das <sandipan@linux.ibm.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linuxram@us.ibm.com,
aneesh.kumar@linux.ibm.com, bauerman@linux.ibm.com,
mpe@ellerman.id.au, fweimer@redhat.com
Subject: [PATCH 1/2] selftests: vm: pkeys: Fix powerpc access right definitions
Date: Fri, 8 May 2020 23:19:14 +0530 [thread overview]
Message-ID: <1ba86fd8a94f38131cfe2d9f277001dd1ad1d34e.1588959697.git.sandipan@linux.ibm.com> (raw)
In-Reply-To: <cover.1588959697.git.sandipan@linux.ibm.com>
In-Reply-To: <cover.1588959697.git.sandipan@linux.ibm.com>
For powerpc, PKEY_DISABLE_WRITE and PKEY_DISABLE_ACCESS are
redefined only if the system headers already define them.
Otherwise, the test fails to compile due to their absence.
This makes sure that they are always defined irrespective of
them being present in the system headers.
Fixes: 130f573c2a79 ("selftests/vm/pkeys: introduce powerpc support")
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
---
tools/testing/selftests/vm/pkey-powerpc.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/vm/pkey-powerpc.h b/tools/testing/selftests/vm/pkey-powerpc.h
index 3a761e51a587..eb5077de8f1e 100644
--- a/tools/testing/selftests/vm/pkey-powerpc.h
+++ b/tools/testing/selftests/vm/pkey-powerpc.h
@@ -16,15 +16,11 @@
#define fpregs fp_regs
#define si_pkey_offset 0x20
-#ifdef PKEY_DISABLE_ACCESS
#undef PKEY_DISABLE_ACCESS
-# define PKEY_DISABLE_ACCESS 0x3 /* disable read and write */
-#endif
+#define PKEY_DISABLE_ACCESS 0x3 /* disable read and write */
-#ifdef PKEY_DISABLE_WRITE
#undef PKEY_DISABLE_WRITE
-# define PKEY_DISABLE_WRITE 0x2
-#endif
+#define PKEY_DISABLE_WRITE 0x2
#define NR_PKEYS 32
#define NR_RESERVED_PKEYS_4K 27 /* pkey-0, pkey-1, exec-only-pkey
--
2.17.1
next prev parent reply other threads:[~2020-05-08 17:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 17:49 [PATCH 0/2] selftests: vm: pkeys: Some powerpc fixes Sandipan Das
2020-05-08 17:49 ` Sandipan Das [this message]
2020-05-08 17:49 ` [PATCH 2/2] selftests: vm: pkeys: Fix powerpc access right updates Sandipan Das
2020-05-08 18:01 ` Florian Weimer
2020-05-08 19:54 ` Sandipan Das
2020-05-08 20:03 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ba86fd8a94f38131cfe2d9f277001dd1ad1d34e.1588959697.git.sandipan@linux.ibm.com \
--to=sandipan@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=bauerman@linux.ibm.com \
--cc=fweimer@redhat.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=linuxram@us.ibm.com \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox