From patchwork Mon Feb 6 16:45:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Schoetterl-Glausch X-Patchwork-Id: 53427 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2338094wrn; Mon, 6 Feb 2023 08:48:14 -0800 (PST) X-Google-Smtp-Source: AK7set+sqhTyq4QiAOz3wrAxhBRtjHUggvBzFu6+PIX+OGSDAFX+2lrHnTIuW8/EAy8UaPOI3b35 X-Received: by 2002:a50:f684:0:b0:4aa:a280:55b5 with SMTP id d4-20020a50f684000000b004aaa28055b5mr432681edn.20.1675702094111; Mon, 06 Feb 2023 08:48:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675702094; cv=none; d=google.com; s=arc-20160816; b=Hnt15gn9Z3sASt2Tie+MhWP4e0g4R4YNH36DabLoi8tvoGRYtXRK+Y73atlgA0Xa9U 5vO6EEayC4EoK8jms78kM/sTQSQYSgLWPJA9YT6pfJpMrdM9/dLS2V0RP1WIjkumMtHF 41dHS6jAfGZosOc9H5CQLrdBlQE7ObrJZqSs5I+8yo86Q4dvGfBntVBWfftryq5Aq/lH VHMS2UB0jgg0IZWPcZy7xd6DnOst3gXuhFmHkWmxRHl5EkmUPB3y00TumdYVm084PdRL FEfyEeoeQRgIV4Je75UMSjaUci4TVNEwf6o5+j/bJl1J8fhg2bhM0do80xf720MJ9xaM 50ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lGd6NVjCuZeAkFsLSbx/PFZ9uVy5N6POGj4BCOeukGE=; b=LMBdl1XA+4JnI06Fx6MfQ3iPEA6ksOfKLqDN+CUxwaUp0qcZ8uJHxx7Kgs+/DKBswo /L2gz4J+Kg7BH3OI10uAfCUTLAntG08WljL75mT3k3BmwVWOp5eQY797Pz8oqt16ybuK LB14AmmbOHY5CDTSsOM1ETYmJAT23MEzeAnmkQfFpaCBrume8WXeujh6QfhrkM+NS+iT y8TnyWcR85SXOkYB0Oef2iDsOueyC5Q502WjYoS9L3G3jbkbaxADPr4RXxu6xl3/vNF2 VHFcmXD2kg1j3zNzAKKTwThAybWPoO5Ens1GVCl7eTTXJMTMpJfYZ8UwARzFbnSSBu8Z 0bpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=gHDDahat; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id et10-20020a056402378a00b004a22a5ecd53si13293520edb.413.2023.02.06.08.47.49; Mon, 06 Feb 2023 08:48:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=gHDDahat; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230498AbjBFQq2 (ORCPT + 99 others); Mon, 6 Feb 2023 11:46:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbjBFQqT (ORCPT ); Mon, 6 Feb 2023 11:46:19 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A83711D93F; Mon, 6 Feb 2023 08:46:18 -0800 (PST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 316GjPAM009493; Mon, 6 Feb 2023 16:46:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=lGd6NVjCuZeAkFsLSbx/PFZ9uVy5N6POGj4BCOeukGE=; b=gHDDahatp1MD57+duLPu+1AhDJjFfaybZA5eZxO/XC1kTFihSGGMk7xNCl4Zte9hhXww /sn3/yw8A9wM/03e//kfd2h4rRih+klq+Bs9T71UDv94tPXEusvOxPTOkzMQgvX2R7ae 5NaVzd2FDVnhvpmy6Iy5JtxmaY55ZzEJLPsJJU82KaNjJmb9lAowWr+JdfGrJg+U5dSU 2gTR1IdX2r76hu3Fj429Zh3rMbqmTBOJMFaOe32mH8xSRnz7U//iQpNpJflawTHBQ5rb 1QBV1N6fjBEgSaOvuwfL2rAXdSp/MBhkwEpi1PO6S7NNVKXr5P52nMEWKrRv9K2o7+c6 ZA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nk5aw81hf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Feb 2023 16:46:14 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 316GkDhL012316; Mon, 6 Feb 2023 16:46:13 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nk5aw81gq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Feb 2023 16:46:13 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 316GSWME020984; Mon, 6 Feb 2023 16:46:11 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3nhemfjms6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Feb 2023 16:46:11 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 316Gk8kS22085972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Feb 2023 16:46:08 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 12FCD20040; Mon, 6 Feb 2023 16:46:08 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8D22F2004D; Mon, 6 Feb 2023 16:46:07 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Feb 2023 16:46:07 +0000 (GMT) From: Janis Schoetterl-Glausch To: Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Heiko Carstens , Vasily Gorbik , Alexander Gordeev Cc: Janis Schoetterl-Glausch , David Hildenbrand , Jonathan Corbet , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-s390@vger.kernel.org, Paolo Bonzini , Shuah Khan , Sven Schnelle , Thomas Huth Subject: [PATCH v7 07/14] KVM: s390: selftest: memop: Fix integer literal Date: Mon, 6 Feb 2023 17:45:55 +0100 Message-Id: <20230206164602.138068-8-scgl@linux.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230206164602.138068-1-scgl@linux.ibm.com> References: <20230206164602.138068-1-scgl@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: a8QoKZoIdYYVSs43QOhsv68OViBLs1xh X-Proofpoint-ORIG-GUID: UJEX56f8_nvuAvKplaUwcbHZ5VFpEnRd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-06_07,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 malwarescore=0 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302060144 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757100998880265461?= X-GMAIL-MSGID: =?utf-8?q?1757100998880265461?= 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: Janis Schoetterl-Glausch Fixes: 1bb873495a9e ("KVM: s390: selftests: Add more copy memop tests") Reviewed-by: Thomas Huth --- tools/testing/selftests/kvm/s390x/memop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/s390x/memop.c b/tools/testing/selftests/kvm/s390x/memop.c index 1ae5c01f9904..c5fec84ef3c2 100644 --- a/tools/testing/selftests/kvm/s390x/memop.c +++ b/tools/testing/selftests/kvm/s390x/memop.c @@ -514,7 +514,7 @@ static void guest_copy_key_fetch_prot_override(void) GUEST_SYNC(STAGE_INITED); set_storage_key_range(0, PAGE_SIZE, 0x18); 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); for (;;) {