Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp429545imm; Fri, 21 Sep 2018 02:37:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZVkzus12+OFiUWa+V3mLBnfokAQJ2qM3A1WkxTypSLU4Y/YYk4Slul514SGEvWT4+OQeQ1 X-Received: by 2002:a62:45d2:: with SMTP id n79-v6mr45563299pfi.137.1537522644305; Fri, 21 Sep 2018 02:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537522644; cv=none; d=google.com; s=arc-20160816; b=ywpAcVUKiH+5NzS1K4ffZ0fOTkuN+BKSFy+19ZDK+wXubrsJDuEnPm4ICiJYMbvV3f 0hPUIkc3q1HZNVNWXNXMrX7fsbjONSGyTRZzgczVtOtGsSzTIxsZXhP3iKGfQ5HfVLGJ SQ/Y671qmvO9nW6NlopvBFofQVNZByXUAa2T7Gmetv34S1OunRiVJKgbj9vYZfJkleAz PHVRAiCJ5TrlhSq2z7n2ZEZsXwz3A/Zv7zsxOszRvzOf+ikHoZ8ULKUjsy12DLoiFcPJ aF7UPrBY6+SSkhhiP9NIHLcr9oWfEwo68N3pBqpMDSoxzUWCswTGRqLtvkurg9CdSyx5 jcYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=5E1ZF3LDTzO8MRqZdR807CajiI2Xpc8Ji7ncysXl8Vc=; b=mX8tTAL4aahZCJyN+CWKUFE2qbwAMRoESvqnzT3ZAGpoSJufGyFfIhtdh5Me8JpF8K 9qJFTCXy6+YrIoOgYk3AYk0Rr8Oirc0aYQrs0swv14A80QRHiN+l+8PxGhIRchq3Ah46 3ROTlz8vY6wCtR0PjfgPywV90OEq0g0x0G5kAqiItPCqmK3TUAVldkJ9P3sWwWepFhjF 2RgrPy41PVhcf5m87Y3fSfQuLpUv/6DnMbTEneodoshCcQ9qlDak4TExuUcWu4867IbY SvGpUWFE/mHdzCouE9adXa8gAj8SHw5GIZa8sv+/D7gqcWDdNIfEbibYWhpLO5kqqcJ2 4nMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=JSKOeKvv; 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=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1-v6si5007263pfc.97.2018.09.21.02.37.07; Fri, 21 Sep 2018 02:37:24 -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=@virtuozzo.com header.s=selector1 header.b=JSKOeKvv; 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=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389463AbeIUPZB (ORCPT + 99 others); Fri, 21 Sep 2018 11:25:01 -0400 Received: from mail-eopbgr10139.outbound.protection.outlook.com ([40.107.1.139]:45270 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388944AbeIUPZA (ORCPT ); Fri, 21 Sep 2018 11:25:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5E1ZF3LDTzO8MRqZdR807CajiI2Xpc8Ji7ncysXl8Vc=; b=JSKOeKvvVu8nMPThptowsnBGFGRa4UPaAXDg6DqS7IRSRkw8w/GqJQM0nVRo+CIOvm9antgVNhse9kQRlN5qVvRMwcd6DHtrGgO7AsCkBU7UD1RPtx/CQoaq8ZNTIxr7mQiIXxgq3KxNLDpGBLg5lgJxR7oqNbNLgjC3l3ffCok= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from [172.16.25.12] (185.231.240.5) by DB7PR08MB3259.eurprd08.prod.outlook.com (2603:10a6:5:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 09:36:54 +0000 Subject: Re: [PATCH] kernel/kcov: Replace vm_insert_page with vmf_insert_page To: Souptick Joarder , willy@infradead.org, akpm@linux-foundation.org, mark.rutland@arm.com, dvyukov@google.com, tglx@linutronix.de, gregkh@linuxfoundation.org, tchibo@google.com Cc: linux-kernel@vger.kernel.org References: <20180920191254.GA22764@jordon-HP-15-Notebook-PC> From: Andrey Ryabinin Message-ID: <6fa7d32b-07f0-ab6d-8053-021b171153e6@virtuozzo.com> Date: Fri, 21 Sep 2018 12:37:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180920191254.GA22764@jordon-HP-15-Notebook-PC> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: HE1PR02CA0104.eurprd02.prod.outlook.com (2603:10a6:7:29::33) To DB7PR08MB3259.eurprd08.prod.outlook.com (2603:10a6:5:1f::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 83c71d33-924d-40b2-1313-08d61fa5c548 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR08MB3259; X-Microsoft-Exchange-Diagnostics: 1;DB7PR08MB3259;3:vb+zZGnxg/PqUtJteieH5NeKV6oOnwo0waEzGzH43QJ2GZpUnll0h9nRCN51IBsb4vjtQWcSu0w6rrNGIxk/pLdlTzfbexEtZLcGOgfN6a3+8dmiaRshIInniHWzrBQErlGuK+7a3gnn18EfmRVz+i27CSm2b6H8eCl33DH3oiqHw9ZDb1ZOE0j35pna8thdP0cG+xTGPui6jBuI01n6KUl6TDKGrIOQ60Cc8wf6dwe4vD6Fg7Z7KtQpmKtQCr2n;25:WoRXLWCGuKNRLVeQwUfGz5OiTcvjIRh3wXmYMtfGX76xl7eSa1k6nZfDxfKCsDvBO3sfxy3Xe2QVo1l7irpylieEsu75NDVuF4q9Rn5x6MPA7e31CCxv50E/WK5li6XvLeYgpQt7Tqe0Al60x517K5lVoL827XjQTUKeXL8uRHPOto45CdfQKDM+LiO89UektXmhlqPHVWDkYSYcKyMldDMHmbwjHOXkzLPU4BKtzBhyXkaOhowANpDjUOzYylmRlfPOKX6bkqhU29+0fOR2A1gmVfPbtx0AnRKbL683b5zhhqMuTFcQS+OWVZxysmQ8rYW8d84NBUePFEDYfaeiwA==;31:d/0FEhijgK7PN7+r2P4PPxG/JUJ0k3kdfMpMfYsDINzrsXOnWQY4ODARmi0L8HTcLGamkJx4S2YX1R6/2rw3WiClBCIqfB64dxobnOoKVxv73gtRitGoplwb4tKkZD6m5044Y+4OSLvnmkviNzKGMNhwhAKstvE7UIEOHt6c47E7qDdhW1ZihRNvyG8HIsTEhg3fcVkt6zHaMNeumY5t4hpl+g52zGLUG3cmuobmzZs= X-MS-TrafficTypeDiagnostic: DB7PR08MB3259: X-Microsoft-Exchange-Diagnostics: 1;DB7PR08MB3259;20:CFORs0450nAlYyP9W1irFDhf4juO+DEfSiiq7nXF1AS9oXPKsBB7ShZ6KFvXanH4fbwSq8v/H4wo48yZCclfdnE5bzopYhkFkPFV2xzejBH56x9EVhj6+uY7JEWLYZkG+tZbd9gIPYZNpznXa9HiovRNM9tnfbfIsOZbSp+X7kHlw6DpGR06X5xLgEIxUfNGe1wCJv3xk5pyK61dlTZ2BkkECYZ9AzOFNhPYCIsnpUEEC2b71W4AxGHRtNtC846nZtsRQ0q4EwasSZsBLyScSOZ6MTRS/Hp1LWZQ9D9Qq7nisRK45r9g90QYBmLTAtexz+AMT3K24CDGYZg3TxGLvmDUQnCK5oDI9IuHdRjy7uss21SNPd5HEqxmaru+kmgovvwCpPjej7tywuW/BPPqm+Y0GUFcFVqTi8ZUdIkHJNKu+Q2nbg4J8bSYS3YJ5horH2BoH6geH/Gi0ZeJ1E7k+4gGMHMIricy04aYHSI7D0ZKESXs2+orEt6ZL9SRM5NO;4:7x1B3VkZDeVpUKQ8p+NodreXrC4q960DFZ7cERRaOwLcokZNqc8Qmh4tIqXLXJ+Zo9H/DioQCjZGt4eTW8mdAJa3QPvwzJerG2GKdI5U3ICNfE+UavzW4F6nekDDVQSBjfEVndK1RFoxkThUijWQmpIZOvjpOrjgJdYa1nZc0h6U6KGNS5gECB0OqWopJtgVd17UDlPsU3gSg1eWcEtzxDMxzmw5ZyOO0tKlel1hmUCu+mLgR7MsEfqt91pckJEtP40g24vBXIVHbtMgM60IVz+TYjOXn14gS1n2H4VhKb/f9PRhWaBHwkxNkdT0gmVn4brQbLHFwxX1W36D/ggScw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158)(788757137089); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051);SRVR:DB7PR08MB3259;BCL:0;PCL:0;RULEID:;SRVR:DB7PR08MB3259; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(346002)(39850400004)(376002)(366004)(396003)(136003)(189003)(199004)(6246003)(76176011)(16526019)(81156014)(81166006)(476003)(2906002)(52116002)(2616005)(11346002)(58126008)(956004)(316002)(16576012)(97736004)(4326008)(26005)(39060400002)(6666003)(68736007)(23676004)(6486002)(186003)(486006)(53546011)(8936002)(386003)(446003)(77096007)(8676002)(52146003)(53936002)(478600001)(64126003)(66066001)(7736002)(105586002)(2486003)(50466002)(47776003)(305945005)(86362001)(14444005)(36756003)(31696002)(106356001)(230700001)(65826007)(65806001)(31686004)(229853002)(65956001)(6116002)(3846002)(25786009)(5660300001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB7PR08MB3259;H:[172.16.25.12];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjdQUjA4TUIzMjU5OzIzOnI4QXZ5bGVjSTZnYnZESjl4eGsvYjNvSStS?= =?utf-8?B?Nk1hQmJLTWdDbW5GcVpQcWQzbUhFQVVUNFVTK1pXMTdGOWlrVG14djB3cUZn?= =?utf-8?B?WXhobDgyeVRSeWwyRVhrTjVvVzdOQmI5WjlOQi9CTUpJSFVaT0R2M3djT05v?= =?utf-8?B?NUJIMUUyVWxNVE04WW52cmY3Nzd3TXBzdFhRd0dzM0FwSFBRRlJQbHgrUC9h?= =?utf-8?B?T3pmY1RFN0FxQ1hmejhzbzRSWnMvblRKSmZFdDFqZktIT0ZhNGI1U1BuMXFY?= =?utf-8?B?aTZ0OWRSbmUvMGNYWHRDZzVwNFBRcGdYTlNLVDFORFJTSjBlMktuenlHMC9a?= =?utf-8?B?RHdEOGhuTFVsZ1dXUXlmSU9Ub0QrTXI4dG4xZVk5QjZNbksvek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exchange-Diagnostics: 1;DB7PR08MB3259;20:RIi9SZbdBSFMFXcxA+Wy37UklQGp6DE87MnWCzkHUCB7lVf48SLnNW2ZgYV7PrWnt7LMAWKuAlO0NwrbzFMMktYkDFUk45OBBrXPCBkT3E3HkYz3EPNSaPbZDvjqd4pk3g6v33qQL0EnSI5ZmXvHHu0PqJlwQhI+2Zb1iazYxkk= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 09:36:54.8746 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83c71d33-924d-40b2-1313-08d61fa5c548 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3259 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/20/2018 10:12 PM, Souptick Joarder wrote: > There is a plan to replace vm_insert_page with new API > vmf_insert_page. As part of it, converting vm_insert_page > to use vmf_insert_page. > > Signed-off-by: Souptick Joarder > --- > kernel/kcov.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/kernel/kcov.c b/kernel/kcov.c > index 3ebd09e..8900d8e 100644 > --- a/kernel/kcov.c > +++ b/kernel/kcov.c > @@ -293,8 +293,9 @@ static int kcov_mmap(struct file *filep, struct vm_area_struct *vma) > spin_unlock(&kcov->lock); > for (off = 0; off < size; off += PAGE_SIZE) { > page = vmalloc_to_page(kcov->area + off); > - if (vm_insert_page(vma, vma->vm_start + off, page)) > - WARN_ONCE(1, "vm_insert_page() failed"); > + if (vmf_insert_page(vma, vma->vm_start + off, page) > + != VM_FAULT_NOPAGE) > + WARN_ONCE(1, "vmf_insert_page() failed"); Nack, don't see the reason for such change, it only makes code worse.