summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2020-08-12 18:55:41 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-26 10:31:03 +0200
commit5a5120b162798fdf07147dff03b23b69f147d311 (patch)
tree82baf166086dc535e46a7d853120fe0b5f0aefd2 /arch/s390
parent8dcf188973549e89ed751a10911eab5ff91a98e8 (diff)
downloadlinux-stable-5a5120b162798fdf07147dff03b23b69f147d311.tar.gz
linux-stable-5a5120b162798fdf07147dff03b23b69f147d311.tar.bz2
linux-stable-5a5120b162798fdf07147dff03b23b69f147d311.zip
s390/runtime_instrumentation: fix storage key handling
[ Upstream commit 9eaba29c7985236e16468f4e6a49cc18cf01443e ] The key member of the runtime instrumentation control block contains only the access key, not the complete storage key. Therefore the value must be shifted by four bits. Note: this is only relevant for debugging purposes in case somebody compiles a kernel with a default storage access key set to a value not equal to zero. Fixes: e4b8b3f33fca ("s390: add support for runtime instrumentation") Reported-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/runtime_instr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/runtime_instr.c b/arch/s390/kernel/runtime_instr.c
index 125c7f6e8715..1788a5454b6f 100644
--- a/arch/s390/kernel/runtime_instr.c
+++ b/arch/s390/kernel/runtime_instr.c
@@ -57,7 +57,7 @@ static void init_runtime_instr_cb(struct runtime_instr_cb *cb)
cb->k = 1;
cb->ps = 1;
cb->pc = 1;
- cb->key = PAGE_DEFAULT_KEY;
+ cb->key = PAGE_DEFAULT_KEY >> 4;
cb->v = 1;
}