Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6587070imm; Mon, 27 Aug 2018 19:48:08 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbc/YgB3wYxSl8Kr8k4fkBU+b3yMc+apw42yYutRrdwBRPdj20EfOq410k1HZ+rQJLRmZLp X-Received: by 2002:a63:1125:: with SMTP id g37-v6mr6866318pgl.187.1535424488745; Mon, 27 Aug 2018 19:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535424488; cv=none; d=google.com; s=arc-20160816; b=BYQIN73ttQ8jbr9UpOlpZCN3cQ2LtFErmsVQNnIbmTd458rbpguzqBGnKrSTRJixWp x52+cmTMQqKQ+h0DjYA7bv4AHLwle7IRjDNtAX/DqfM2rxP0ze7x9p0biaHOIVWBQsk9 rDcbbF2f/HvMP5I++0Xpb09/fk+qfZVqdVKMVmtbNzU7MtqIeKqDD3qUwZOqA7X2Aq3X Daorxz0dhSszQ2/JezlhE6XZrmmtpFp5Cbo2SG0efsruUStHgVGxUB3qFMSnDzyqZc9M jWCgsGlJV0pC21zuQoWDAC/Mwm5D6WW2PWu+FMiwv9dO1rFrkL3aKDFmac7nRYepD0zG M+rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:mime-version:date:in-reply-to :subject:cc:to:from:user-agent:references:arc-authentication-results; bh=dVI9tSjffG7xgMCjx6qkeSas5PbE4Uc34rcaC92Tjyo=; b=heuymNBq1M4Su2VFyaTUKC86aXky4Kv+KMsnHEHF2erEFwpESULJ/YKqxu0sjNliNa 296WZ7E0wRK3eU5SE56X349Mq7rHo1GjNI3RMu5C46e+8LcGhDNRU8ss5orXq4hKeq7D hYS2Tj0DyRNYhxrCjyBOS/Ofs5Log1+je7AWzjOx11s7PG+a2iNk5HSN8dCco1KAeJid 8N7RcUYbgSFZvZ+/QRhZfGpx7cFHI1jIN/50vguZR6Em2sm3qNb9LjY32OqxLDMF60xw Tvyqdv3W8KYxdyOP/qYugY67ex4yd3OCk+a18J6k8RptEdy21u++ycPQ0eJlVCsbSzTE v31Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v20-v6si885235ply.139.2018.08.27.19.47.52; Mon, 27 Aug 2018 19:48:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727125AbeH1GgL (ORCPT + 99 others); Tue, 28 Aug 2018 02:36:11 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58276 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbeH1GgK (ORCPT ); Tue, 28 Aug 2018 02:36:10 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7S2i5vv081288 for ; Mon, 27 Aug 2018 22:46:44 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2m4wcprvd3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 27 Aug 2018 22:46:44 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 Aug 2018 20:46:43 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 27 Aug 2018 20:46:40 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7S2kd8m49610790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 Aug 2018 19:46:39 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BC118BE058; Mon, 27 Aug 2018 20:46:39 -0600 (MDT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C589EBE054; Mon, 27 Aug 2018 20:46:37 -0600 (MDT) Received: from morokweng.localdomain (unknown [9.85.152.225]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTPS; Mon, 27 Aug 2018 20:46:37 -0600 (MDT) References: <20180803220046.4019-1-bauerman@linux.ibm.com> <20180803220046.4019-5-bauerman@linux.ibm.com> <20180807065642.GD20140@rapoport-lnx> User-agent: mu4e 1.0; emacs 25.3.1 From: Thiago Jung Bauermann To: Mike Rapoport Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan , Andrea Arcangeli , Prakash Sangappa Subject: Re: [PATCH v2 4/4] userfaultfd: selftest: Cope if shmem doesn't support zeropage In-reply-to: <20180807065642.GD20140@rapoport-lnx> Date: Mon, 27 Aug 2018 23:46:33 -0300 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 18082802-0012-0000-0000-000016A82749 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009624; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01079868; UDB=6.00556971; IPR=6.00859852; MB=3.00022966; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-28 02:46:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18082802-0013-0000-0000-00005432CCCE Message-Id: <87zhx7rywm.fsf@morokweng.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-28_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808280025 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mike, Mike Rapoport writes: > Hi, > > On Fri, Aug 03, 2018 at 07:00:46PM -0300, Thiago Jung Bauermann wrote: >> If userfaultfd runs on a system that doesn't support UFFDIO_ZEROPAGE for >> shared memory, it currently ends with error code 1 which indicates test >> failure: >> >> # ./userfaultfd shmem 10 10 >> nr_pages: 160, nr_pages_per_cpu: 80 >> bounces: 9, mode: rnd poll, unexpected missing ioctl for anon memory >> # echo $? >> 1 >> >> Change userfaultfd_zeropage_test() to return KSFT_SKIP to indicate that >> the test is being skipped. > > I took a deeper look at what userfaultfd_zeropage_test() does and, > apparently, I've mislead you. The test checks if the range has > UFFDIO_ZEROPAGE and verifies that it works if yes; otherwise the test > verifies that EINVAL is returned. > > Can you please check if the patch below works in your environment? > > From 7a34c84c0461b5073742275638c44b6535d19166 Mon Sep 17 00:00:00 2001 > From: Mike Rapoport > Date: Tue, 7 Aug 2018 09:44:19 +0300 > Subject: [PATCH] userfaultfd: selftest: make supported range ioctl > verification more robust > > When userfaultfd tests runs on older kernel that does not support > UFFDIO_ZEROPAGE for shared memory it fails at the ioctl verification. > > Split out the verification that supported ioctls are superset of the > expected ioctls and relax the checks for UFFDIO_ZEROPAGE for shared memory > areas. > > Signed-off-by: Mike Rapoport > --- > tools/testing/selftests/vm/userfaultfd.c | 63 +++++++++++++++++--------------- > 1 file changed, 34 insertions(+), 29 deletions(-) I'm sorry to take this long to respond, I was only able to get back to this today. Your patch does solve my problem. Thank you very much! It has a trivial conflict in the second hunk with patch 3 in my series. Should I repost the series with your patch in place of patch 4? -- Thiago Jung Bauermann IBM Linux Technology Center