Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6725517imm; Mon, 27 Aug 2018 23:16:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaAuJ/IFUBgi9ibhOb0/XgGqfaaQdUmBgW/fhYVqw/eT2jhwJxDjE7ZD0if7FKN3sLTkJUC X-Received: by 2002:a17:902:145:: with SMTP id 63-v6mr127971plb.103.1535437008579; Mon, 27 Aug 2018 23:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535437008; cv=none; d=google.com; s=arc-20160816; b=AnAuxhbjwFxjR10N15hgafAou2ca7JnU5nBuvnrWGDOKIEWr5ab114HuufKBGUC645 0jNYhzRPi90I76Va25nQE961ddQ2E9bu/LsnnJy0BV+cxknVgRgrvcVDl4MYjSjz0P3q nI5u/EdJtPA1PjHXpDPM/GBilsXN9mmsWjRdyMpjCgjMlbesC62b4PiaBS1aXHJXbK+8 0+CmT6JY1oFJSB0rBxwlIeDcOcxm4BHK50StY7HLMhXI0lByW7AaA/Bf2GnT6gw+kL8n LxYIGsy8vEj6stgYfFHUaIh5dN4C9/iwLBCyF9bg4wnIygj79QhHaEjFTVTJejyHKSCu 3LbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date :arc-authentication-results; bh=YHk0W4yu6RSbbz5IKgcIKDfx8lFyV59769Rg+fvCnNs=; b=F5O232mQXrnr45Bql/h/4FSus8bd8GoyRnY5R6rylN0voirgnw1+rtXAQwRzb+jzmy 5JU0S7XNq2X+X7NAIirttgyjJPxol9mjf4I3OpgfybGdc/wh2FuqXofe9VQfZ1uNudZC 3oZ7uQwHsQYah1MRQB5wIrM0Uq/WT9Maly/zJ80m7lBSI/fyB2A4agHreA9kW5V9rLvR p5hWUrlW33GwroC1+Dbjj1f+oNmFG74ioA8V52oqGNfqXGH5IgCHNFDpNNt2lYb0M3Qy meFdnM5k9W9ON9RUglUnBy4HIQ4s0xfV9igQB4xk/u5EKz+iW7uY9Rm/LQ+ZjjiojTvp 3I7g== 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 i16-v6si195265pgi.660.2018.08.27.23.16.30; Mon, 27 Aug 2018 23:16:48 -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 S1726781AbeH1KFZ (ORCPT + 99 others); Tue, 28 Aug 2018 06:05:25 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35758 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726432AbeH1KFZ (ORCPT ); Tue, 28 Aug 2018 06:05:25 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7S6EUvi138756 for ; Tue, 28 Aug 2018 02:15:20 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2m4y51v095-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 28 Aug 2018 02:15:20 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 28 Aug 2018 07:15:18 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 28 Aug 2018 07:15:14 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7S6FDMh34078944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Aug 2018 06:15:13 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 792EB4C046; Tue, 28 Aug 2018 09:15:12 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E87F64C06A; Tue, 28 Aug 2018 09:15:11 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.97]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 28 Aug 2018 09:15:11 +0100 (BST) Date: Tue, 28 Aug 2018 09:15:11 +0300 From: Mike Rapoport To: Thiago Jung Bauermann 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 References: <20180803220046.4019-1-bauerman@linux.ibm.com> <20180803220046.4019-5-bauerman@linux.ibm.com> <20180807065642.GD20140@rapoport-lnx> <87zhx7rywm.fsf@morokweng.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zhx7rywm.fsf@morokweng.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18082806-0012-0000-0000-0000029FA9DB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18082806-0013-0000-0000-000020D3AFB8 Message-Id: <20180828061510.GA25317@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-28_02:,, 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-1808280064 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 27, 2018 at 11:46:33PM -0300, Thiago Jung Bauermann wrote: > > 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. No problem :) > 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? Yep. > -- > Thiago Jung Bauermann > IBM Linux Technology Center -- Sincerely yours, Mike.