Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4165912ybp; Sun, 13 Oct 2019 23:46:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7wY/j5RES9if6UTGw/oq3g7eiFbsfWPJVJz7E96YiCUG6R5MOHcuLN+7mIKsSY97UFgNk X-Received: by 2002:a05:6402:8cf:: with SMTP id d15mr25748282edz.225.1571035599891; Sun, 13 Oct 2019 23:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571035599; cv=none; d=google.com; s=arc-20160816; b=aF28zXabLoqjrVR2gPmTv6XQT86Q1G7IbQzAx5mLzErC58ZWO8P0k4mWnTd7HtYDOW id5lquxcN3ZDE6vUbXm3EbPI12h5hcV8ErxwoJ8v/5cU7nzPS/EXJkKvpFHtJybVP/TI 5Jy1hMM+OyOOOrlPbBwvHat4w8RygcOR+sm6sUkoEAmklw9F85MDu6iDeL7rnrbfK5G1 hwyYKpHQUxKPtPh2w3PyR6nd3uIE4BVpl47cICXhhFrOJDLaprhUAwQ7+Zqfn8KqJPtE 3JC8SIH+udYXpLgn2qxctkiYNQZdiA5XF78dfUwJ1GulLkfGBcSqxS3Gz7oVNWfgwDSP 0OjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=HtIDdAJxmRTbCOCnYRZivqbYMR39l4cMWjhrGLronnw=; b=DHB92Fgb8lenGt3MLV6ws/lsu7vSAjmuv50iD3jVgR+EzeLbyMG0rU0/U8MhPayCwa zyG8sSAVtGkHfqWZONWm205oPLwn2XHDVwscuf22rl+UN9UYWVd5gqbM3nVDrvA5ta0q kOOCExOy9OPyRkLA1BtvoVHKi2t/0ZNEXrgc9AJKirgChwvHaG6lXeimNZdFd62+yF2W rLGNiEJpFgGz8Ut0AkDEryuHt0sGFs8mYyqpbotu4L/rj9NfM4eTPnkmzhPDaXzL8JE5 P1Kry4s9qYhs1+M+INmWOCXvwdqO70NRvavRu5oymiYeowmRE/pnh01eNqJ3WcI9WOkt 7y/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="g/7d6Lj5"; 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qh28si10277027ejb.210.2019.10.13.23.46.15; Sun, 13 Oct 2019 23:46:39 -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=@nvidia.com header.s=n1 header.b="g/7d6Lj5"; 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729947AbfJNGpl (ORCPT + 99 others); Mon, 14 Oct 2019 02:45:41 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:2039 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729656AbfJNGpk (ORCPT ); Mon, 14 Oct 2019 02:45:40 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 13 Oct 2019 23:45:41 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Sun, 13 Oct 2019 23:45:39 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Sun, 13 Oct 2019 23:45:39 -0700 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 14 Oct 2019 06:45:39 +0000 Received: from [10.2.173.58] (172.20.13.39) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 14 Oct 2019 06:45:38 +0000 Subject: Re: [PATCH 2/2] mm/gup: fix a misnamed "write" argument: should be "flags" To: kbuild test robot CC: , Andrew Morton , Christoph Hellwig , "Aneesh Kumar K . V" , Keith Busch , Ira Weiny , LKML , , Christoph Hellwig References: <20191013221155.382378-3-jhubbard@nvidia.com> <201910141316.DHpeevy3%lkp@intel.com> X-Nvconfidentiality: public From: John Hubbard Message-ID: Date: Sun, 13 Oct 2019 23:43:10 -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: <201910141316.DHpeevy3%lkp@intel.com> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To DRHQMAIL107.nvidia.com (10.27.9.16) Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1571035541; bh=HtIDdAJxmRTbCOCnYRZivqbYMR39l4cMWjhrGLronnw=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=g/7d6Lj5Z4epMh5MIW7HJOBvnD1mgP1zooBmwUkkukc8e2f2stiBkxUl6aNmLanYp rKawF6vuWHDUOCHmXlm5lG8G6rrGjpBQtlq/5K8Ailkjlu1PNhHGqB7zo+R22hyTrc XFFV96ed6eO/KwEawT1SX0c7TSat/IPk4cR34ntYmcN0Wat8DetLfLrm56EbAQaa/N prOfAfXrZEMgkVR2SY+5zS+/8n752DjJwRUKslM0cDloExgv8DM/69ci3PtsQYgkOj 89HsyWOFktj77um8a25mepEsOc2XZhknFB/h95Z72EBaXbAjeSxH5w0L+r4inhiviH 8TDlDPH1CNBYg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? thanks, -- John Hubbard NVIDIA > vim +1990 mm/gup.c > > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1974 > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1975 static int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr, > cc492e4c15e804 John Hubbard 2019-10-13 1976 unsigned long end, int flags, struct page **pages, > cc492e4c15e804 John Hubbard 2019-10-13 1977 int *nr) > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1978 { > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1979 unsigned long pte_end; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1980 struct page *head, *page; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1981 pte_t pte; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1982 int refs; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1983 > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1984 pte_end = (addr + sz) & ~(sz-1); > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1985 if (pte_end < end) > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1986 end = pte_end; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1987 > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1988 pte = READ_ONCE(*ptep); > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1989 > cbd34da7dc9afd Christoph Hellwig 2019-07-11 @1990 if (!pte_access_permitted(pte, write)) > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1991 return 0; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1992 > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1993 /* hugepages are never "special" */ > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1994 VM_BUG_ON(!pfn_valid(pte_pfn(pte))); > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1995 > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1996 refs = 0; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1997 head = pte_page(pte); > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1998 > cbd34da7dc9afd Christoph Hellwig 2019-07-11 1999 page = head + ((addr & (sz-1)) >> PAGE_SHIFT); > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2000 do { > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2001 VM_BUG_ON(compound_head(page) != head); > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2002 pages[*nr] = page; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2003 (*nr)++; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2004 page++; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2005 refs++; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2006 } while (addr += PAGE_SIZE, addr != end); > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2007 > 01a369160bbea4 Christoph Hellwig 2019-07-11 2008 head = try_get_compound_head(head, refs); > 01a369160bbea4 Christoph Hellwig 2019-07-11 2009 if (!head) { > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2010 *nr -= refs; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2011 return 0; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2012 } > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2013 > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2014 if (unlikely(pte_val(pte) != pte_val(*ptep))) { > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2015 /* Could be optimized better */ > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2016 *nr -= refs; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2017 while (refs--) > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2018 put_page(head); > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2019 return 0; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2020 } > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2021 > 520b4a4496f12b Christoph Hellwig 2019-07-11 2022 SetPageReferenced(head); > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2023 return 1; > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2024 } > cbd34da7dc9afd Christoph Hellwig 2019-07-11 2025 > > :::::: The code at line 1990 was first introduced by commit > :::::: cbd34da7dc9afd521e0bea5e7d12701f4a9da7c7 mm: move the powerpc hugepd code to mm/gup.c > > :::::: TO: Christoph Hellwig > :::::: CC: Linus Torvalds > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation >