Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4320398rwi; Wed, 12 Oct 2022 14:01:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5X+KSlKliD7Lyp5GolZCmMyiPdKySfbRRghFouk5uTO9ZeQm0XYjRXnbhZ1Radl3bRO6xR X-Received: by 2002:a05:6402:b5a:b0:458:f4c6:8039 with SMTP id bx26-20020a0564020b5a00b00458f4c68039mr29040981edb.349.1665608466829; Wed, 12 Oct 2022 14:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665608466; cv=none; d=google.com; s=arc-20160816; b=SbJPjbVWGvihc2q4Y8nPh1GwHuX0tBRBjWfLd2aRy9zzdURa6A0pvbP97eMcnuXrU+ P7muzdhCRzR2veLTMBCdNeJW8r634FtVvI1uNb44dEi2qIhwVKnGoCyJkyAfbJqo7P67 OWx3TFIluQ+KBrIPFuQ1PAjVVtR5ohJElYdhdgBjo0P2sHZFB1OF9UBJjrbDAdt3qAZk tbF2J8N9dE5kBLXiLJE0chkH4hLAW3Wwdc3bWS64ockCYt3ANtWgOLm3XwAcpPp9O/u5 cOYnFUaMLdyttXLTTbWJj7otX13q/ERtVga77uxD4TkLEIfTlvmUresyOTxJrlp8pV+l QAZg== 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=AOiCiOefShO8eS4olLXl+vqOGpVUbd10eFX4BSzSVEE=; b=uX0iDXVBjtvdJXLJuxpOFkMjoVNyP6qetCNVpJeg7tcL/wrxmADv0Yk7m3SLap6DDc NrKT9y1lOtWiiKQzL7HoB59724TXrC+DIZPHUtfPiQl/kH0xf9QWUsesX+pbMGDmtf+z VpK7c/gQRx+sRGaF862Fgv5QVHnkdXq5Xza+E5RmOPHMTYyDFh06v2AvMlr6rj/w12eS J5IlxLRXsZT3fsruBA4zHWU1OFkR785rOiFgPjbCU06cRe/IGjJjauLuE2dAZzLm9A1W j/1M21X0N/Ex0fWnjM/0S9Ve8iHGUZTIF+jAql5nAvMw3a2sAwYUvU61J9lOSbexeBuU E6fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ARG1HwC5; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rh16-20020a17090720f000b00772fe97b31esi13447408ejb.901.2022.10.12.14.00.41; Wed, 12 Oct 2022 14:01:06 -0700 (PDT) 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=ARG1HwC5; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230026AbiJLU4m (ORCPT + 99 others); Wed, 12 Oct 2022 16:56:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229843AbiJLU4Z (ORCPT ); Wed, 12 Oct 2022 16:56:25 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A21895EE; Wed, 12 Oct 2022 13:56:23 -0700 (PDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29CKDUOI013752; Wed, 12 Oct 2022 20:56:21 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=AOiCiOefShO8eS4olLXl+vqOGpVUbd10eFX4BSzSVEE=; b=ARG1HwC5L/Vs4cL8RfFR3sXBjAvQxrOmToXR40t4aFy8XxdEtfDZpHB4yQWZyQRBcGCY AUztZsBuAh1Y4yGUzAEVjSZJQpD6ByVMdYIxUBq5ilTmgIKqcOoMKtBQ8F5sGJYhtXZr H76kZNCxCi6LTF55h+zGQrrFcAi7T/XSJ3izCMUxX37wU8mo2GqziCiTA5dGPaEflAIJ d8vIGzwY44JKQdVuMRMvvz/jSorywwavwh4ZVx5YZqD1v7ozi0UQfDD/OXcYmhMviHyR 6Ot86rCDxZw0P8Z0+EW7F6buIYeiYXy2pnuqOTJ7GXoA6ZuScdAvuriT326l7ubDNrbX 6w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k64e9gyck-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 20:56:21 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29CKDcXE014074; Wed, 12 Oct 2022 20:56:21 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k64e9gyc1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 20:56:20 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29CKsktf026025; Wed, 12 Oct 2022 20:56:18 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma01fra.de.ibm.com with ESMTP id 3k30u8vx75-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 20:56:18 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29CKuFBT4653748 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Oct 2022 20:56:15 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 208805204E; Wed, 12 Oct 2022 20:56:15 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 9B47B5204F; Wed, 12 Oct 2022 20:56:14 +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 Subject: [PATCH v2 7/9] KVM: s390: selftest: memop: Add bad address test Date: Wed, 12 Oct 2022 22:56:07 +0200 Message-Id: <20221012205609.2811294-8-scgl@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221012205609.2811294-1-scgl@linux.ibm.com> References: <20221012205609.2811294-1-scgl@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: n0EOfAGMFYg8kkqZD-HNF3kMSSidKTgd X-Proofpoint-ORIG-GUID: Ks_fdN4NlsjeHBf7oWEY1Nt3ue_9-RuY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-12_10,2022-10-12_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 priorityscore=1501 clxscore=1015 adultscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210120129 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 Add test that tries to access, instead of CHECK_ONLY. Signed-off-by: Janis Schoetterl-Glausch --- tools/testing/selftests/kvm/s390x/memop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/s390x/memop.c b/tools/testing/selftests/kvm/s390x/memop.c index d4f4fb4022b9..404ddb6fa855 100644 --- a/tools/testing/selftests/kvm/s390x/memop.c +++ b/tools/testing/selftests/kvm/s390x/memop.c @@ -969,7 +969,9 @@ static void _test_errors_common(struct test_info info, enum mop_target target, i /* Bad guest address: */ rv = ERR_MOP(info, target, WRITE, mem1, size, GADDR((void *)~0xfffUL), CHECK_ONLY); - TEST_ASSERT(rv > 0, "ioctl does not report bad guest memory access"); + TEST_ASSERT(rv > 0, "ioctl does not report bad guest memory address"); + rv = ERR_MOP(info, target, WRITE, mem1, size, GADDR((void *)~0xfffUL)); + TEST_ASSERT(rv > 0, "ioctl does not report bad guest memory address"); /* Bad host address: */ rv = ERR_MOP(info, target, WRITE, 0, size, GADDR_V(mem1)); -- 2.34.1