Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1905397imm; Thu, 12 Jul 2018 09:41:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdsmJnQ0Zo4ee13OmCqXXwVKEPzMtk01m6W+YnrKlVe3KWQ/hBuA2PjJV56Zr67qc9iDqBV X-Received: by 2002:a17:902:422:: with SMTP id 31-v6mr2835245ple.320.1531413666207; Thu, 12 Jul 2018 09:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531413666; cv=none; d=google.com; s=arc-20160816; b=VqKnHt4jzCCXwXk9xl/vf8V3dclMtdbJ1fxsPA8NaBoQW6LQNE2UCfwber00SlmhB0 wDn5cxAnud6jqb8QgifsXc2pKrLw5WtYX9g2Ge1drjiIBO7RbD6+GW0iECcxdMIUoIcu iAiaRxQlEmIOZfUR5r4AtyRdcy7tmYA4VRmx3wnFJKXpTu4FDY2p3C9xpN/B1kfPp7d7 m0nLhJAohVh3+KfpI0kY75SN1di9sZO3IpZRJoc8+zGW7WKBBq+UmhffFYl2nESyqgX1 1SRgpX7wLOj+nDO5WdncECmz8frr4ugDoCX2fXY+xk6JUsiJKcc1ccTmYmgH5KI+oJO1 oA4g== 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=mk3A1cwPF37A1Bxi0PustfwVrggIYpfYYY5+Q2B8LAc=; b=kobm/qmfTxvc2MGIKU0Mp4SG5Crw62ebAEwrnFb6XooSAiirvwirb/er3Aq5Swh8tc iHMGUyDOkx/OkHuhF8QJB+EJ5gIFpNMpoIchKY7jb+oSCt172pHBZk6KHOfVNyM2vUNw OwTnrkJueUlniiuNUbiz6yfJ6jY1QReeOLHC1ImbqqzS+wYpoXwugmOh4M1y2ONV2RBx 4ZzhgwGwO8rlMkHEjwPHGDGhG00kYEt8ufVo6yXvptYCzC8k/f43n0JxuyZi6xIYD3vt H0BP6tn4S5wZJ6Wx3vubl/Qsgma+rOY5Ipt+fgYWsk5VvJ1hPsYB2+ttgIsZ2Kshp+uW GQfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=VawajPHe; 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 l190-v6si20868806pgl.198.2018.07.12.09.40.43; Thu, 12 Jul 2018 09:41:06 -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=VawajPHe; 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 S1732289AbeGLQtk (ORCPT + 99 others); Thu, 12 Jul 2018 12:49:40 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:45543 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726912AbeGLQtk (ORCPT ); Thu, 12 Jul 2018 12:49:40 -0400 Received: by mail-pf0-f175.google.com with SMTP id i26-v6so9496507pfo.12 for ; Thu, 12 Jul 2018 09:39:22 -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=mk3A1cwPF37A1Bxi0PustfwVrggIYpfYYY5+Q2B8LAc=; b=VawajPHeXJ+GPQmVIi3kvpBekSBgmQFuGFDHPSfsLPy9nJ44OT1cP9HJ7qeE5HoKrw 5+eVCM1tPeXTKO/jzu/La96tRPnmnkz0OARmhDiRDh2sG975xjLAxFVGnDsjCeN5ILdm kY8GK2uFmPJMjnNGaNWvfCwY0TRFJyYN8NX2U4jAyffiYyp4PaFsGpe4GMhFC4KCdf6u 4uarBbtcfvo6vZeSipQAPtXWZ59jJYyBoZHMIcKSykTCBdWACln4fQuWNJlnhf8rCKcD 5I94Jy0XVQiFt4mu97ykIyogtMvt2N7Bn3x+6tsxqcvGCoLILykZj/xEMNj7VfYFJqGs zqgA== 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=mk3A1cwPF37A1Bxi0PustfwVrggIYpfYYY5+Q2B8LAc=; b=YIUBFMihGIme/A7vPlNxkA6TY6xGZy84k+HpSGrhLuOlbWdUubnAH1L4ZPI+bC8HlW 3sUUXjW/hq3IjbKptffKbg6FXhRlKDW46xp6QFzkiSCUxl6KfX3fkD//AcqPqWJTwm1E EDEaqyD/PqEfLcRzUZmS+ythkHt4Mc7/jW/nEdUQsQ51NShLnawrXEQn9ke/EdAoX8Mx Ah5jnhvpvxMBg+ghXeeKk19P7si3G0cnlguIYXmc+lZHbDxrXkq2hM2Pfzw3yqLaRrjr yEGEY60uNbSQUtEDeVB04ruri8deJ9YnCVZmYbZiAFsf0uKtiyJ6zM8/ouKova06cbzp UptQ== X-Gm-Message-State: AOUpUlGUvBuksa7HzxKpCcIB5mPKVS9RS/NHLvSsLBgPINWWJnAbuAhg ycJ80BFn83LhIR+JEtderQjwCpe9 X-Received: by 2002:a62:9bc5:: with SMTP id e66-v6mr3175887pfk.84.1531413561977; Thu, 12 Jul 2018 09:39:21 -0700 (PDT) Received: from kshutemo-mobl1.localdomain ([134.134.139.83]) by smtp.gmail.com with ESMTPSA id v30-v6sm56090431pgn.80.2018.07.12.09.39.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 09:39:21 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 641E830029E; Thu, 12 Jul 2018 19:39:16 +0300 (+03) Date: Thu, 12 Jul 2018 19:39:16 +0300 From: "Kirill A. Shutemov" To: Oleg Nesterov Cc: "Kirill A. Shutemov" , Andrew Morton , Dmitry Vyukov , Andrea Arcangeli , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCHv2 1/2] mm: Fix vma_is_anonymous() false-positives Message-ID: <20180712163916.pzewd3nhane7af3u@kshutemo-mobl1> References: <20180712145626.41665-1-kirill.shutemov@linux.intel.com> <20180712145626.41665-2-kirill.shutemov@linux.intel.com> <20180712162039.GA16175@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180712162039.GA16175@redhat.com> User-Agent: NeoMutt/20180622 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 06:20:39PM +0200, Oleg Nesterov wrote: > Kirill, I am not trying to review this change (but it looks good to me), > just a silly question... > > On 07/12, Kirill A. Shutemov wrote: > > > > This can be fixed by assigning anonymous VMAs own vm_ops and not relying > > on it being NULL. > > I agree, this makes sense, but... > > > If ->mmap() failed to set ->vm_ops, mmap_region() will set it to > > dummy_vm_ops. > > Shouldn't this change alone fix the problem? Unfortunately, no. I've tried it before. Mapping /dev/zero with MAP_PRIVATE hast to produce anonymous VMA. The trick with dummy_vm_ops wouldn't be able to handle the situation. -- Kirill A. Shutemov