From patchwork Wed Jan 25 21:25:58 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: 48367 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp493120wrn; Wed, 25 Jan 2023 13:27:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXvbDYMh+nZESHOqtDYaSJmjLLC5MXRvo/0bpEPGdFaLqy/N5p5IMa2uJNySi08xeePGk8Ki X-Received: by 2002:a05:6402:28ca:b0:499:70a8:f91a with SMTP id ef10-20020a05640228ca00b0049970a8f91amr34888485edb.19.1674682026458; Wed, 25 Jan 2023 13:27:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674682026; cv=none; d=google.com; s=arc-20160816; b=Fm9epQe3mSB0lCRRf7vxKBpYlfZAJtICb8f5YPLCMWURquVwEovWNvXLAJvTtgOre0 KewDal6XwPpSOC3KTOOC6BKJInNsA/V1SBokBdPDLGc6PpgQVKZP0NPQtYf0zkHffbqf DwVlsegJZ0/l+z7q8wCQiUQ+TkElubYaBWG7FwNEPt683b1RrGzrrzvK8t9k86d3C1yx p9067M1m8DNJ4IRYboUnT+9CDXSa3fXBvMQnivFdWg7js7A1vtugw33DsZyhNfXOptuO 0QOwPV6WeuCxD21gM8N4/rvuPkEL2REQ1p4xfGa+CU3lvvMJGzf2GL0RbHCCKdfbCtUU MrHQ== 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=PrPXQcsfIDLo3JEbRR4mC6NVxHdrBFgC7TKlTbLPQM0=; b=xITMxI7vk6F0GFqU2/0L7/XEN06LMoi20eOnpZahsxiLGyIj//9zPnMcqoa+87xYP0 WxeV2Z30PpYinoc/t163v8DWeaU3+0rnXPpFE976PkJbA+esPWfdJz4Hn433IcNLUGEt aqkN9cT97qOE2z7bQQ6tdGsk4kH6jimm1zeNmJfFjcONAA3bb5UP+lavrvsRXewJV0sG kJe+aA07pdJa+B8KlLwgLFmVY4xU9pHZzhvElEwUbV+cL8O1WWVa391CtynUaFyeqG4P 21ELXrEfztWJckm2rvMeUWtRNRMjLNvDxNnTR61kC+ALlNcM0QRq01f8eTK9kSYUReVu XmSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="nbk7/ukm"; 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 t19-20020a05640203d300b0046bb35e06e6si6936174edw.149.2023.01.25.13.26.42; Wed, 25 Jan 2023 13:27:06 -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="nbk7/ukm"; 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 S236761AbjAYV0e (ORCPT + 99 others); Wed, 25 Jan 2023 16:26:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236608AbjAYV03 (ORCPT ); Wed, 25 Jan 2023 16:26:29 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46B1845F77; Wed, 25 Jan 2023 13:26:27 -0800 (PST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30PKLeij012813; Wed, 25 Jan 2023 21:26:24 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=PrPXQcsfIDLo3JEbRR4mC6NVxHdrBFgC7TKlTbLPQM0=; b=nbk7/ukmSwhNKijphmqdxZA95UFVmiik0whZsmG93qQQwGQI14hsFN8s/TDuov9NmBKF VSHbEJklOegsgcNS5seYZ3ZcukOyz0wR8r7+njx1kuf4h+G3nPX/yY91SMQbu3Rk2T/r W4ujpNk+zeLrABBhdcj9Xj6ymEdFBWmfhv9MoIvMw7zEEh8K70TzrTOLyIj6j3Eg7NV7 2jNMJsXsBC1b3USldCUGCKlxAfhH+Ru99mRYS7sOzSEK8KqomnrMUziTenY0MXLzuTpC ++K0AWPMBUwUlb8rB3AvJsVrY+tTji0kesuTLYjL9CFMyYjJKHqmvagiVH9AvETM7Wrq EQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nac21afpf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Jan 2023 21:26:24 +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 30PKLhRi013507; Wed, 25 Jan 2023 21:26:24 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nac21afnd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Jan 2023 21:26:24 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30PGCopI030500; Wed, 25 Jan 2023 21:26:21 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3n87afc35u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Jan 2023 21:26:21 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30PLQIGx41353660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jan 2023 21:26:18 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EB28820043; Wed, 25 Jan 2023 21:26:17 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A991B2004D; Wed, 25 Jan 2023 21:26:17 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 25 Jan 2023 21:26:17 +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 , Nico Boehr Subject: [PATCH v6 04/14] KVM: s390: selftest: memop: Add bad address test Date: Wed, 25 Jan 2023 22:25:58 +0100 Message-Id: <20230125212608.1860251-5-scgl@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230125212608.1860251-1-scgl@linux.ibm.com> References: <20230125212608.1860251-1-scgl@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: AzBybXiqxM0oN9wjR_x3rgGFx9WgjKVz X-Proofpoint-ORIG-GUID: OlCVSIDwwiyvEEgFefsBcvkq5ATkHFUY 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-01-25_13,2023-01-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 malwarescore=0 mlxscore=0 priorityscore=1501 spamscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301250187 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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?1756031380442187251?= X-GMAIL-MSGID: =?utf-8?q?1756031380442187251?= Add test that tries to access, instead of CHECK_ONLY. Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Nico Boehr --- 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 bbc191a13760..5aae27549437 100644 --- a/tools/testing/selftests/kvm/s390x/memop.c +++ b/tools/testing/selftests/kvm/s390x/memop.c @@ -641,7 +641,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));