Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4574537imm; Mon, 30 Jul 2018 18:02:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpckasMjyKA111WoXB0ML5+kTsIJ6/E9fsnFu+C5RvWrwelRdmoBWs/qP8zjdSkbzuuvgAiA X-Received: by 2002:a63:ab4c:: with SMTP id k12-v6mr18090047pgp.386.1532998963643; Mon, 30 Jul 2018 18:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532998963; cv=none; d=google.com; s=arc-20160816; b=ggLDbFCZOrmqZ5R/kAcvuyoUN/+j8WTEd33s0pKih43lkrFI8Oe/S1g1k6XWe3YWTD iqyABI0TwPhDuE1LuogD9QPznBUw+ziCvCBcyPq9qOVObYJQLFGWyxPfbUktPFBRUK1w OtPxEtAtTO6EfgosKugK6YUwkbN5ZPUG6l7ityKF0N7naosnuoiANBSZpkeNbHN+nuL6 wm8Enn5V8nFlZ29bTp3dQurld0hiYy+sJjq0hTPsXa3Ga4EfDj73PjwmhHSHg9hQtkBw Zcnr4G/cDFZ3khL+JY150pZO/2mLmHq9xRk0YfGRynFxvzA5WVyMdtQp7spCydP+8hax 5hUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=qMIrY39jnvjuHnif9V0lvi1L35mBfXD8cG6ibX8alWc=; b=yEAXFdt2aKfJzWsRzGFOMCJN3Z9Hhr3A26ApKyZlUu+v7fxaVwoO4Rd5bVm7R6+HQQ 1uNpDH7wgi0OYJ6eReyl5aw9crOvokOkOrsY1cxbxlCMERIJiZpLCUGxB92MzzKbAQdU fuf7Re4kxhIaxJPiPNQcRV65QVgjzIGxVCzFjQ8A/WcZ6TG1FMWPdkDhYCpd6UEJXl/U bgHxQd2C3T3y+A21ZY8D2rnSZcBqSqwXFgfe0XqCRitSkj3V3X8kgxRJl8gO7zplt/pL oBFo4P03fUPe1ks4bZ13CHyUSTtdV6ri4QBMPbYzxy71i7IU9i7ZMAodGMzvTjm0NlXX nz1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="VqU/yUzi"; 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 l185-v6si12861558pfl.134.2018.07.30.18.02.28; Mon, 30 Jul 2018 18:02:43 -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=@linux-foundation.org header.s=google header.b="VqU/yUzi"; 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 S1731150AbeGaCjS (ORCPT + 99 others); Mon, 30 Jul 2018 22:39:18 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:34003 "EHLO mail-it0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727478AbeGaCjR (ORCPT ); Mon, 30 Jul 2018 22:39:17 -0400 Received: by mail-it0-f51.google.com with SMTP id d70-v6so10858988ith.1 for ; Mon, 30 Jul 2018 18:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qMIrY39jnvjuHnif9V0lvi1L35mBfXD8cG6ibX8alWc=; b=VqU/yUziouyLYU/Ug3f3jnPbOlUeY59d64t/5fdYgcOAamLciU1ekSul+E5B0NEj2f 2cayBoQ6oX2Nbd5SqiDkZ4JIckfysHnCxIt7tir5EjrdrKrpxCVZGy3X9QlyIkWt9el9 awnRE9iwG1GhcIJ3tkmGUUc5BASHzcG07CaNc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qMIrY39jnvjuHnif9V0lvi1L35mBfXD8cG6ibX8alWc=; b=cve++TbiaKSQihYLAUfnhDRJXmKIYHHnkYzMNS8Yb4pv3Y10MzZLUVjDg37IFzEmzN 1P6NpJ4RTlb0UkBf4GOh8hz6M1ORBRHWdGYwn0BwrbIL4qkbKYdpdNtt651qi19nUiPd uTkOusOEEDS8JIld2H4wM6RMqpJrC/fHmiQ3s7d/qkoZXNkhLTmDt9AcOXizQ38MN/4q kleVXc+4h/6Bx3qur/TKBKVZoIC47n6xpHSEjo1Iqf0m4Xa88mqYGR0unQYQM8tftGTK VMrIZwqtQfNoroYUFNKteRcFJPGB5kgvRtMgNEqvoPZJBtO8TxwvtiUiNq7QKN/NnkfV R6oA== X-Gm-Message-State: AOUpUlF9WTRniLRNl97pYRxTQKe05lUFV38mLri571HfszwW5edbSmJd GldKLSC/RpEgabcm7NM25SFmWxniesKGc/9RxY4= X-Received: by 2002:a24:94f:: with SMTP id 76-v6mr1267567itm.113.1532998898145; Mon, 30 Jul 2018 18:01:38 -0700 (PDT) MIME-Version: 1.0 References: <20180730130134.yvn5tcmoavuxtwt5@kshutemo-mobl1> In-Reply-To: From: Linus Torvalds Date: Mon, 30 Jul 2018 18:01:26 -0700 Message-ID: Subject: Re: Linux 4.18-rc7 To: Hugh Dickins Cc: "Kirill A. Shutemov" , Matthew Wilcox , Amit Pundir , "Kirill A. Shutemov" , Andrew Morton , Dmitry Vyukov , Oleg Nesterov , Andrea Arcangeli , Greg Kroah-Hartman , John Stultz , linux-mm , Linux Kernel Mailing List , youling257@gmail.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 30, 2018 at 2:53 PM Hugh Dickins wrote: > > I have no problem with reverting -rc7's vma_is_anonymous() series. I don't think we need to revert the whole series: I think the rest are all fairly obvious cleanups, and shouldn't really have any semantic changes. It's literally only that last patch in the series that then changes that meaning of "vm_ops". And I don't really _mind_ that last step either, but since we don't know exactly what it was that it broke, and we're past rc7, I don't think we really have any option but the revert it. And if we revert it, I think we need to just remove the VM_BUG_ON_VMA() that it was supposed to fix. Because I do think that it is quite likely that the real bug is that overzealous BUG_ON(), since I can't see any reason why anonymous mappings should be special there. But I'm certainly also ok with re-visiting that commit later. I just think that right _now_ the above is my preferred plan. Kirill? > I'm all for deleting that VM_BUG_ON_VMA() in zap_pmd_range(), it was > just a compromise with those who wanted to keep something there; > I don't think we even need a WARN_ON_ONCE() now. So to me it looks like a historical check that simply doesn't "normally" trigger, but there's no reason I can see why we should care about the case it tests against. > (It remains quite interesting how exit_mmap() does not come that way, > and most syscalls split the vma beforehand in vma_adjust(): it's mostly > about madvise(,,MADV_DONTNEED), perhaps others now, which zap ptes > without prior splitting.) Well, in this case it's the ftruncate() path, which fundamentally doesn't split the vma at all (prior *or* later). But yes, madvise() is in the same boat - it doesn't change the vma at all, it just changes the contents of the vma. And exit_mmap() is special because it just tears down everything. So we do have three very distinct cases: (a) changing and thus splitting the vma itself (mprotect, munmap/mmap, mlock), (b) not changing the vma, but changing the underlying mapping (truncate and madvise(MADV_DONTNEED) (c) tearing down everything, and no locking needed because it's the last user (exit_mmap). that are different for what I think are good reasons. Linus