From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CA1EC4CECE for ; Mon, 14 Oct 2019 18:39:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C1D3420873 for ; Mon, 14 Oct 2019 18:39:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="HUV2s57b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1D3420873 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4B6B18E0005; Mon, 14 Oct 2019 14:39:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 440778E0001; Mon, 14 Oct 2019 14:39:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 307418E0005; Mon, 14 Oct 2019 14:39:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 09CFB8E0001 for ; Mon, 14 Oct 2019 14:39:39 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 57BBC82FAD5D for ; Mon, 14 Oct 2019 18:39:38 +0000 (UTC) X-FDA: 76043253636.22.kick41_36d07e13fbe0b X-HE-Tag: kick41_36d07e13fbe0b X-Filterd-Recvd-Size: 6039 Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com [216.228.121.143]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Oct 2019 18:39:36 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 14 Oct 2019 11:39:39 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 14 Oct 2019 11:39:34 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 14 Oct 2019 11:39:34 -0700 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 14 Oct 2019 18:39:34 +0000 Received: from [10.110.48.28] (10.124.1.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 14 Oct 2019 18:39:34 +0000 Subject: Re: [PATCH 2/2] mm/gup: fix a misnamed "write" argument: should be "flags" To: Ira Weiny , Aneesh Kumar K.V CC: "Kirill A. Shutemov" , kbuild test robot , , Andrew Morton , Christoph Hellwig , "Keith Busch" , LKML , , Christoph Hellwig References: <20191013221155.382378-3-jhubbard@nvidia.com> <201910141316.DHpeevy3%lkp@intel.com> <20191014135234.7ak32pfir6du3xae@box> <20191014164513.GA6839@iweiny-DESK2.sc.intel.com> From: John Hubbard X-Nvconfidentiality: public Message-ID: Date: Mon, 14 Oct 2019 11:39:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191014164513.GA6839@iweiny-DESK2.sc.intel.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To DRHQMAIL107.nvidia.com (10.27.9.16) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1571078379; bh=4WrFH6Ur7xpRHYIy1BtnX26bs5NUctNCs6D8wN0c78Y=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=HUV2s57b26ug9mEMNrEcy6Yiq2OhgN84MNfOnA0Xx5quiHPVOvuYwy5Cxjf5J4MJ4 EfKEClebDxqvl2r5S8vwmsZpYokInTnBtAuomD7RegJ6OGBVgz6ETACis9/6O66AnK NTdKCITl1znVMzdE+6ow/xi/kd/ROZQrIpEfF7M6Il71FCDxumel2FAe5VmGaTY9nI a1L8RMenTu/A2V7vKprP+43lt/xzDyldbR6Bn4iSOaxUVBcMl8iWEBl6zAkkKAaS+0 vYYvI+UKj2SSiG3LFAx/zEEnlqYilPfKDInoNPiDprTWszUJb3iVP7P7gJZrSshYCQ bW5pBG1dFGo+Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10/14/19 9:45 AM, Ira Weiny wrote: > On Mon, Oct 14, 2019 at 08:14:04PM +0530, Aneesh Kumar K.V wrote: >> On 10/14/19 7:22 PM, Kirill A. Shutemov wrote: >>> On Sun, Oct 13, 2019 at 11:43:10PM -0700, John Hubbard wrote: >>>> On 10/13/19 11:12 PM, kbuild test robot wrote: >>>>> Hi John, >>>>> >>>>> Thank you for the patch! Yet something to improve: >>>>> >>>>> [auto build test ERROR on linus/master] >>>>> [cannot apply to v5.4-rc3 next-20191011] >>>>> [if your patch is applied to the wrong git tree, please drop us a note to help >>>>> improve the system. BTW, we also suggest to use '--base' option to specify the >>>>> base tree in git format-patch, please see https://stackoverflow.com/a/37406982] >>>>> >>>>> url: https://github.com/0day-ci/linux/commits/John-Hubbard/gup-c-gup_benchmark-c-trivial-fixes-before-the-storm/20191014-114158 >>>>> config: powerpc-defconfig (attached as .config) >>>>> compiler: powerpc64-linux-gcc (GCC) 7.4.0 >>>>> reproduce: >>>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross >>>>> chmod +x ~/bin/make.cross >>>>> # save the attached .config to linux build tree >>>>> GCC_VERSION=7.4.0 make.cross ARCH=powerpc >>>>> >>>>> If you fix the issue, kindly add following tag >>>>> Reported-by: kbuild test robot >>>>> >>>>> All errors (new ones prefixed by >>): >>>>> >>>>> mm/gup.c: In function 'gup_hugepte': >>>>>>> mm/gup.c:1990:33: error: 'write' undeclared (first use in this function); did you mean 'writeq'? >>>>> if (!pte_access_permitted(pte, write)) >>>>> ^~~~~ >>>>> writeq >>>>> mm/gup.c:1990:33: note: each undeclared identifier is reported only once for each function it appears in >>>>> >>>> >>>> OK, so this shows that my cross-compiler test scripts are faulty lately, >>>> sorry I missed this. >>>> >>>> But more importantly, the above missed case is an example of when "write" really >>>> means "write", as opposed to meaning flags. >>>> >>>> Please put this patch on hold or drop it, until we hear from the authors as to how >>>> they would like to resolve this. I suspect it will end up as something like: >>>> >>>> bool write = (flags & FOLL_WRITE); >>>> >>>> ...perhaps? >>> >>> Just use >>> >>> if (!pte_access_permitted(pte, flags & FOLL_WRITE)) >>> >>> as we have in gup_pte_range(). >>> >>> And add: >>> >>> Fixes: cbd34da7dc9a ("mm: move the powerpc hugepd code to mm/gup.c") >>> >> >> b798bec4741bdd80224214fdd004c8e52698e42 isn't this the commit that need to >> be mentioned in the Fixes: tag? > > Yes, and while we are at it the type should probably be changed to unsigned > int. > OK, I'm posting a v2 with all the above, thanks for these reviews! thanks, John Hubbard NVIDIA