Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4528092imm; Mon, 30 Jul 2018 16:55:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdEBoyoZoqdE2D8ZedIVvSSFWgKtTL4s0bGuM5unw+PokAOCt5Ar0mYEYNDbHTmnbENTGYW X-Received: by 2002:a17:902:d807:: with SMTP id a7-v6mr17973582plz.214.1532994922909; Mon, 30 Jul 2018 16:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532994922; cv=none; d=google.com; s=arc-20160816; b=cH9ALcib9EnwStUE93HTz9w6uV93ramxVhU0GLhT946/UTTQktaHA4xfOFeIk7DU9q osRQJmPDWvctMH7u6t+VhZRhgF+aCRBQAjwM+fZxuw4J2D/3csDwzVlbwCpeoA38of8p aS8WmUldI2ikbMzvf30Oa/5cvv8u6+mDlliXmXHkdQDwjDNg2c+hG+Lpwr/nqZQTDX2/ 2wN1nYC1WHKCiqynHUfO14SpkcF9oJdd1WjLj7dk52nxfhPCpqBKO5x3bsRxzIyG5bIJ 4ek4VtfeRuMsOJqqn45G5p+HJXYdfbE6qaq7OyMx7RgQfOFBwG/gFZZNKmvr8RF2U+qH aLfA== 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=6woSI8o9XoB+X6CGmldDQnFD9e/xAr0Vziz59+Sjtcs=; b=Crjc/xdWUtmK77I9kzTYITpJBRr8ZR3fUWjRo243bA6idB7lYM/7RskkYRLg+ZkS0j jIDHPblFNyeCWU15tDt/hMRkEvJDgXJf+bYIr1leU3lQr9mWUIhsp9LG/Di5koP5hKeW voZ65frUsZ+9wFcO67Ht8nSu+dmgT2S3hOGHxiNEJzDguSM+5hfb90MB6ziIBzPEoJJa XTBJ+iXcwueSKiLNwtIqNhWP8ql8jP31AzeNrThnbVxrE/w+Rpea1pStFyY7Yx0P+gAH jVS5SDcEFqAQUuaxlpIN6jKTjFXyDhyCf9BuAXgiAQlqCLH/gUXotzVx68ZfsuR4QXc5 GEXA== 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 b22-v6si1381226pls.127.2018.07.30.16.55.08; Mon, 30 Jul 2018 16:55:22 -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 S1732031AbeGaBbi (ORCPT + 99 others); Mon, 30 Jul 2018 21:31:38 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50066 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731406AbeGaBbi (ORCPT ); Mon, 30 Jul 2018 21:31:38 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6UNsBMj063648 for ; Mon, 30 Jul 2018 19:54:13 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kjak1byb0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 30 Jul 2018 19:54:12 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Jul 2018 19:53:44 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 30 Jul 2018 19:53:40 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6UNrdxr11010568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 30 Jul 2018 23:53:39 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CD2F6112063; Mon, 30 Jul 2018 19:53:23 -0400 (EDT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 74893112061; Mon, 30 Jul 2018 19:53:20 -0400 (EDT) Received: from morokweng.localdomain (unknown [9.85.203.167]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTPS; Mon, 30 Jul 2018 19:53:19 -0400 (EDT) References: <20180725024209.32586-1-bauerman@linux.ibm.com> <20180725024209.32586-2-bauerman@linux.ibm.com> <20180725135942.GC25188@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 1/3] userfaultfd: selftest: Fix checking of userfaultfd_open() result In-reply-to: <20180725135942.GC25188@rapoport-lnx> Date: Mon, 30 Jul 2018 20:53:30 -0300 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 18073023-0060-0000-0000-00000294FAC0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009459; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01068252; UDB=6.00549141; IPR=6.00846383; MB=3.00022414; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-30 23:53:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18073023-0061-0000-0000-000045FD079F Message-Id: <8736w0b7r9.fsf@morokweng.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-30_10:,, 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-1806210000 definitions=main-1807300250 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mike, Thanks for promptly reviewing the patches. Mike Rapoport writes: > Hi, > > On Tue, Jul 24, 2018 at 11:42:07PM -0300, Thiago Jung Bauermann wrote: >> If the userfaultfd test is run on a kernel with CONFIG_USERFAULTFD=n, it >> will report that the system call is not available yet go ahead and continue >> anyway: >> >> # ./userfaultfd anon 30 1 >> nr_pages: 480, nr_pages_per_cpu: 120 >> userfaultfd syscall not available in this kernel >> bounces: 0, mode:, register failure >> >> This is because userfaultfd_open() returns 0 on success and 1 on error but >> all callers assume that it returns < 0 on error. >> >> Since the convention of the test as a whole is the one used by >> userfault_open(), fix its callers instead. Now the test behaves correctly: >> >> # ./userfaultfd anon 30 1 >> nr_pages: 480, nr_pages_per_cpu: 120 >> userfaultfd syscall not available in this kernel >> >> Signed-off-by: Thiago Jung Bauermann > > It seems that this patch is superseded by the second patch in this series. Yes, but since this is a simple bugfix while the other patch is a proposed improvement which can be debated, I think it's worthwhile to keep them separate. -- Thiago Jung Bauermann IBM Linux Technology Center