Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2119806imm; Wed, 16 May 2018 08:10:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo4yrzZERUQ8wEhYQeUgRDefpzJQ4y/yyqevZiGYnyqOgfP7poLMpDkqowb0rt3rMD944+q X-Received: by 2002:a17:902:c6b:: with SMTP id 98-v6mr1361385pls.270.1526483437835; Wed, 16 May 2018 08:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526483437; cv=none; d=google.com; s=arc-20160816; b=Ur9tNB+jEygWdsblRHI+XJiBSfBMeHHk/1SRdDyJo8zavxXiH3A1MSgrvQipa09cFw S4uzrGgpTjOG0Npn+gNiSR32/W20HjBNvwg2wM0KA9/9Uu1P+Sh0OxfZXu9fy+5y6yqQ zY2ggDU01kfkaGvhjEbMpaDWkhJOXiVgppf7cxh21gmexqx+D6bUr+/W3MiivtU2xbBn k/+cnSVW0UTQqoW8ujCGl0R1GD0eOHG6ndg9u9zUjb4z0RRdiHE40qI5FvhjpWYCy/Xq 7OCr1Thhwo04ya0ELXqN45bibmhvRzNhAS3Yhgv6KvYfN3GvchTNjgvi5ReuZEkRypje qoeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=21M9dmnD/7dOEejeRcrEONW9XFopew2b+oI/fOqL7A0=; b=IZt6ZFAwCvu6/YgYSKYcVt27uIxz9e18FVd0LPq3IbS9WTVCqrMmGNWgvY2xwkYD7W 1K5/vhzkrvh68JFpxevW0++6Ao5F2p5DEnh46KhAAZYYFCdTVUSdr7KNy2nhwmMtN15l 9V/QK5pX9JwIgnMe7kPicwMruweW8o3BqoNNxPhKqVfOTEm92WJeo6of54QJG63VxGU+ utoKa/4fWsABG3gHNUOjYx5IxMAScfhRw1F06c3Slfup8XkSxTR9hJgvaFp8jGAlrp9o P1Wpwgv5IXECTieKAJbNbburwku9q3/UJx9JALlgUZp7cA9yq5G+8JmJGnGGeCO5Cz7L Dp6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=becuQsZO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8-v6si2644314plz.93.2018.05.16.08.10.23; Wed, 16 May 2018 08:10:37 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=becuQsZO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752062AbeEPPKI (ORCPT + 99 others); Wed, 16 May 2018 11:10:08 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:37200 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751647AbeEPPKD (ORCPT ); Wed, 16 May 2018 11:10:03 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4GF6a6x032678; Wed, 16 May 2018 15:08:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=corp-2017-10-26; bh=21M9dmnD/7dOEejeRcrEONW9XFopew2b+oI/fOqL7A0=; b=becuQsZOpWnwR4ZPRm7BSURIcrUQ9T0Ut5H/NCqaOIRs7VFogNtv/iQwp/A2ev+x35P/ 5qJmW7D6pkLHQvPhuKg+NOnF09E3T3/s5KI4h/VTOw3rDD6QpCezWXudN6gR1ATvp3v9 5n5k6dpeHoBYL7FRwwv21mMIq8sgDQWdkcxfR641lVt/5JXFkE5iDKV+fN3S1xqxsL3H 2ihRE9GOvzZbykQ7vZ/LrgKvpxfz9eSF3gQwA2SLGPMxbXrK1xGoOfaZYZaQc4Fn2vrv j7geVOfI+LOkQmBMXcoyy3GeiDhPmXmCL/kvNqfSUa4oDhMk8Sc3NELY/altZWJcGrif Yw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2hx29wdb4v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 May 2018 15:08:34 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4GF8W35020211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 May 2018 15:08:32 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w4GF8Vxh010126; Wed, 16 May 2018 15:08:31 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 16 May 2018 08:08:31 -0700 Date: Wed, 16 May 2018 08:08:29 -0700 From: "Darrick J. Wong" To: Christoph Hellwig Cc: Souptick Joarder , Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, devel@lists.orangefs.org, ceph-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-mtd@lists.infradead.org, dri-devel@lists.freedesktop.org, lustre-devel@lists.lustre.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org Subject: Re: [PATCH 14/14] mm: turn on vm_fault_t type checking Message-ID: <20180516150829.GA4904@magnolia> References: <20180516054348.15950-1-hch@lst.de> <20180516054348.15950-15-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180516054348.15950-15-hch@lst.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8894 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=860 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805160153 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 16, 2018 at 07:43:48AM +0200, Christoph Hellwig wrote: > Switch vm_fault_t to point to an unsigned int with __bіtwise annotations. > This both catches any old ->fault or ->page_mkwrite instance with plain > compiler type checking, as well as finding more intricate problems with > sparse. > > Signed-off-by: Christoph Hellwig > --- For the iomap and xfs parts, Reviewed-by: Darrick J. Wong That said... > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > index 54f1e05ecf3e..da2b77a19911 100644 > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -22,7 +22,8 @@ > #endif > #define AT_VECTOR_SIZE (2*(AT_VECTOR_SIZE_ARCH + AT_VECTOR_SIZE_BASE + 1)) > > -typedef int vm_fault_t; > +typedef unsigned __bitwise vm_fault_t; > + > > struct address_space; > struct mem_cgroup; > @@ -619,7 +620,7 @@ struct vm_special_mapping { > * If non-NULL, then this is called to resolve page faults > * on the special mapping. If used, .pages is not checked. > */ > - int (*fault)(const struct vm_special_mapping *sm, > + vm_fault_t (*fault)(const struct vm_special_mapping *sm, Uh, we're changing function signatures /and/ redefinining vm_fault_t? All in the same 90K patch? I /was/ expecting a series of "convert XXXXX and all callers/users" patches followed by a trivial one to switch the definition, not a giant pile of change. FWIW I don't mind so much if you make a patch containing a change for some super-common primitive and a hojillion little diff hunks tree-wide, but only one logical change at a time for a big patch, please... I quite prefer seeing the whole series from start to finish all packaged up in one series, but wow this was overwhelming. :/ --D