Commit dc55ceae authored by Janis Schoetterl-Glausch's avatar Janis Schoetterl-Glausch Committed by Janosch Frank

KVM: s390: selftest: memop: Fix integer literal

The address is a 64 bit value, specifying a 32 bit value can crash the
guest. In this case things worked out with -O2 but not -O0.
Signed-off-by: default avatarJanis Schoetterl-Glausch <scgl@linux.ibm.com>
Fixes: 1bb87349 ("KVM: s390: selftests: Add more copy memop tests")
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/r/20230206164602.138068-8-scgl@linux.ibm.com
Message-Id: <20230206164602.138068-8-scgl@linux.ibm.com>
Signed-off-by: default avatarJanosch Frank <frankja@linux.ibm.com>
parent 12c12a99
...@@ -514,7 +514,7 @@ static void guest_copy_key_fetch_prot_override(void) ...@@ -514,7 +514,7 @@ static void guest_copy_key_fetch_prot_override(void)
GUEST_SYNC(STAGE_INITED); GUEST_SYNC(STAGE_INITED);
set_storage_key_range(0, PAGE_SIZE, 0x18); set_storage_key_range(0, PAGE_SIZE, 0x18);
set_storage_key_range((void *)last_page_addr, PAGE_SIZE, 0x0); set_storage_key_range((void *)last_page_addr, PAGE_SIZE, 0x0);
asm volatile ("sske %[key],%[addr]\n" :: [addr] "r"(0), [key] "r"(0x18) : "cc"); asm volatile ("sske %[key],%[addr]\n" :: [addr] "r"(0L), [key] "r"(0x18) : "cc");
GUEST_SYNC(STAGE_SKEYS_SET); GUEST_SYNC(STAGE_SKEYS_SET);
for (;;) { for (;;) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment