Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1332315imm; Wed, 1 Aug 2018 14:07:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeNX4/q0RvNiB5IraUxREPz47PH1zUkfBgu8JhKPWlpJzRbwafK9b2ZgkldqjBjrDRA0y27 X-Received: by 2002:a63:4703:: with SMTP id u3-v6mr25419730pga.405.1533157661599; Wed, 01 Aug 2018 14:07:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533157661; cv=none; d=google.com; s=arc-20160816; b=fxwtWFMNXG38IMuQHbW10dDlsi1Oyt1D+sRrLDxBdV2N8B17UrRg1P7d+Cx51Rjglp LdWQJj0r5P+QLRSkTZ5i2b/jz/UBIhR0PmMpgIv4zW0H9vvh9G5Bo5Cvc+ydVnXe7Xky 1NS+UNYT2rK40BFUqCKjBigR33XTGiZ5g3IcMX2TOnvZOw5NvUfZz3j1Oz5IixS/B88P x5eeitdknS7o0gUYevbfKexlBeRsTIAeVTNaG59DAoulRSrv6WVN7OAnaMOVfAz3KuLz aKTTg/tgckHYg9sAAQAivubywhRdFM2h3rQoD+VsqILJ0LTec08TQvBkfIygQQLkxgdL ayHQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=iH+DA0dU8hNg6Y0IhJ0IkWVsazpHAR/aOqKMgnJ0C4s=; b=XCDuVpPkN96ajRNJBhf7o2zTqFd3XDjvZ4RNFsh1CWJcAPnbAVMtBoU77yCQIJXahH 5GkNqvLlcbc+7XUEyPBbB9e8tmhgEoOxX9j76xsbA5qfngIyNOSW4BLYhjgVSoUZbhIM uQLGHAGLS4rY7tyluVydExbNifUSwR+5vfQ3EPIfqLSVmGPpVNAEhzJlZN3+vAUL0jYb Z+eh5sTMH9nB5Qbprn2hLEmNbrby4/++4mz88d5fVsZLW7IhpWre+fOcJQk3EganppV1 7dasQ7Vq57FACIFZs6biybCigQZsAUISKsKSpSQ0rHx3nTpciqvOaJ+LTvxxTIOdamyd eVfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="R/yizYsB"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6-v6si18364459pfk.287.2018.08.01.14.07.26; Wed, 01 Aug 2018 14:07:41 -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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="R/yizYsB"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387451AbeHAWqd (ORCPT + 99 others); Wed, 1 Aug 2018 18:46:33 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:37138 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725986AbeHAWqd (ORCPT ); Wed, 1 Aug 2018 18:46:33 -0400 Received: by mail-pf1-f195.google.com with SMTP id a26-v6so8473720pfo.4 for ; Wed, 01 Aug 2018 13:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=iH+DA0dU8hNg6Y0IhJ0IkWVsazpHAR/aOqKMgnJ0C4s=; b=R/yizYsBbTGp3u9N6BxX1CGDFuSfoLziffj6/jEZEXlVy66m3KBDl/8hTCZhfJSubO vyFF+DidXRgs8lPkHt5N+mXTriu4dGFkPsupeFvlh/9+YjC82LUH0ffWYJ4JMljyJW0g wMwCPS5eVnhg2U0r4CJV0NKETeO1RqZtYo4m43eQU6e8pClflvR7Uhw+7Hlu3ralSHEB RW5tIsOXgBTuMWXBEvMhyde1gHi2cRCrBKJYWrX20gNWH48VkbSR1Mc7d4MBRhSEBQP8 CVL43N20cnRZCuS6CLcRuXMntcRlnEQPhryt3mHjc+DAjWOkmZ5frm6atzOh5uyDtLSr pdlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=iH+DA0dU8hNg6Y0IhJ0IkWVsazpHAR/aOqKMgnJ0C4s=; b=iOaa3FckCufmIlbMf0Q9K0A5tgR4/c1MEttXWj3mh3iAVQPI7sJYYPYuWhMyQZmD/p JV6rydyWWLHBT0N98khAaISu0M/yNl51TUB1u88PkB+aNrCebw/TpfL2jN0QMTChfDHj Wh2rCnPSKvIx+Gik8dCV7+8IlEyHo48ZQUfwY8/svvq/cP31YqfCNByIbZw6EEnzeORz TBZv4Xk6IpxKy11N14irWf82mGRaltW4/0TLElp8KGJtpGgdFDSUpQHWpIp6k/qlm2/z 7+AqIMHaem6CjgagNeCn6H5+Ce2VHGFvwFdsbZzuxL8Z0RxN4UWPfsPyo1Dlz9aSXv8Q OzDQ== X-Gm-Message-State: AOUpUlHiWCQlZZ7xBXG/Hig0GKMX/8bZag+WcIt1LhMcSWMgaI9orHbU EYwE3y5A46wyxv05v6cHYjrOsw== X-Received: by 2002:a62:fccd:: with SMTP id e196-v6mr8807323pfh.245.1533157134617; Wed, 01 Aug 2018 13:58:54 -0700 (PDT) Received: from kshutemo-mobl1.localdomain ([192.55.54.42]) by smtp.gmail.com with ESMTPSA id q81-v6sm4465pfd.15.2018.08.01.13.58.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Aug 2018 13:58:54 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 1660E3002A5; Wed, 1 Aug 2018 23:58:49 +0300 (+03) Date: Wed, 1 Aug 2018 23:58:49 +0300 From: "Kirill A. Shutemov" To: Hugh Dickins Cc: Linus Torvalds , Tony Luck , Amit Pundir , John Stultz , Matthew Wilcox , "Kirill A. Shutemov" , Andrew Morton , Dmitry Vyukov , Oleg Nesterov , Andrea Arcangeli , Greg Kroah-Hartman , linux-mm , Linux Kernel Mailing List , youling 257 , Joel Fernandes , Colin Cross Subject: Re: Linux 4.18-rc7 Message-ID: <20180801205848.6mgcfux4b63svj3n@kshutemo-mobl1> References: <20180731170328.ocb5oikwhwtkyzrj@kshutemo-mobl1> <20180731174349.GA12944@agluck-desk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 01, 2018 at 11:31:52AM -0700, Hugh Dickins wrote: > On Wed, 1 Aug 2018, Linus Torvalds wrote: > > > > Anyway, the upshot of all this is that I think I know what the ia64 > > problem was, and John sent the patch for the ashmem case, and I'm > > going to hold off reverting that vma_is_anonymous() false-positives > > commit after all. > > I'd better send deletion of zap_pmd_range()'s VM_BUG_ON_VMA(): below > (but I've no proprietorial interest, if you prefer to do your own). Agreed. Acked-by: Kirill A. Shutemov > John's patch is good, and originally I thought it was safe from that > VM_BUG_ON_VMA(), because the /dev/ashmem fd exposed to the user is > disconnected from the vm_file in the vma, and madvise(,,MADV_REMOVE) > insists on VM_SHARED. But afterwards read John's earlier mail, > drawing attention to the vfs_fallocate() in there: I may be wrong, > and I don't know if Android has THP in the config anyway, but it looks > to me like an unmap_mapping_range() from ashmem's vfs_fallocate() > could hit precisely the VM_BUG_ON_VMA(), once it's vma_is_anonymous(). > > (I'm not familiar with ashmem, and I certainly don't understand the > role of MAP_PRIVATE ashmem mappings - hole-punch's zap_pte_range() > should end up leaving any anon pages in place; but the presence of > the BUG is requiring us all to understand too much too quickly.) Hugh, do you see any reason why ashmem shouldn't have vm_ops == shmem_vm_ops? I don't understand ashmem, but I feel uncomfortable that we have this sneaky way to create an anonymous VMA. It feels wrong to me. -- Kirill A. Shutemov