Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2784180imm; Wed, 3 Oct 2018 09:07:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV62lCdYeJF0f2X7rAleV9x8/gp4BHy/y5FkiqWxoMXbYjwDzF/MeZcE4oCM1l9H4eyR2Jdpk X-Received: by 2002:a17:902:b81:: with SMTP id 1-v6mr2319562plr.319.1538582835473; Wed, 03 Oct 2018 09:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538582835; cv=none; d=google.com; s=arc-20160816; b=xkj7HTQuuIPol5xmAQ1CxOu20HsO7TaSITLc6oyZMxKcpa6GUoklGrkICnsP2xZQp3 ANPaL+zBVuCqIHDo2QM/U5SfgtIOuvci7yAYJ4fXI9DbOuIWsCxI8gEcsYBUlzG5x8GP cNJdG9VIqhckNPTU1yMYWJ5enUciAqEsqFEzm4lCh2Rsp2cu8k4OCKmcgweJDJg75Xyc VgrdqNnnHKln4xFn1IKbt5QQNgnckkpnmUmTsGqLpKMy69OnzQF1Zt4z4yGGcENmi/AZ 1Yrn+cyYUcYBZc50DuIoiwBXE1ALI009WcIgn97aVPujYlcIxP5mBAPBKpz8T6mWJrrr 7M+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=V0cAwfXQxhGi2SVZpomkIGO4/cxn83hVIsvNt/Gftgs=; b=iX5Dj93iCRBmtJ8NJjJDYoqQUHq00fvyQnpXFa2z+I8HrC9zDJfkpoY1jVvdyOcjzY ENFPCOwejNbwOZxfQKeZiK4FHxdxBh3lqlEyv9RwyNaKLd4JyGiIJgISXgXHWypSk8r7 +s3z3GP5jTnus+VwD3TUrdlHyXO43zBs6ChgYdBE4rP1KkJ5Xq53UwDDvGUTnTDaxj3R uuKrhh2UyMgChsyHoAi+L33ct0024spjPmjIYLmgNE7hSrIk1P8SWv6fHgJF17CaaNDg /jN1y0bQILn2q9+SUNxNYbapzxOumag5IP+a+9eAwAvzjsnYmtV9GjcRZxPA4yM5fVXj 3Z5w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7-v6si1931885pgl.345.2018.10.03.09.06.57; Wed, 03 Oct 2018 09:07:15 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726950AbeJCWzr (ORCPT + 99 others); Wed, 3 Oct 2018 18:55:47 -0400 Received: from mga09.intel.com ([134.134.136.24]:16572 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726811AbeJCWzr (ORCPT ); Wed, 3 Oct 2018 18:55:47 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2018 09:06:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,336,1534834800"; d="scan'208";a="75122244" Received: from 2b52.sc.intel.com ([143.183.136.147]) by fmsmga007.fm.intel.com with ESMTP; 03 Oct 2018 09:04:44 -0700 Message-ID: <5ddb0ad33298d1858e530fce9c9ea2788b2fac81.camel@intel.com> Subject: Re: [RFC PATCH v4 24/27] mm/mmap: Create a guard area between VMAs From: Yu-cheng Yu To: Andy Lutomirski , Eugene Syromiatnikov Cc: X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , Linux API , Arnd Bergmann , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Florian Weimer , "H. J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , "Shanbhogue, Vedvyas" Date: Wed, 03 Oct 2018 09:00:04 -0700 In-Reply-To: References: <20180921150351.20898-1-yu-cheng.yu@intel.com> <20180921150351.20898-25-yu-cheng.yu@intel.com> <20181003045611.GB22724@asgard.redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-10-02 at 22:36 -0700, Andy Lutomirski wrote: > On Tue, Oct 2, 2018 at 9:55 PM Eugene Syromiatnikov wrote: > > > > On Fri, Sep 21, 2018 at 08:03:48AM -0700, Yu-cheng Yu wrote: > > > Create a guard area between VMAs, to detect memory corruption. > > > > Do I understand correctly that with this patch a user space program > > no longer be able to place two mappings back to back? If it is so, > > it will likely break a lot of things; for example, it's a common ring > > buffer implementations technique, to map buffer memory twice back > > to back in order to avoid special handling of items wrapping its end. > > I haven't checked what the patch actually does, but it shouldn't have > any affect on MAP_FIXED or the new no-replace MAP_FIXED variant. > > --Andy I did some mmap tests with/without MAP_FIXED, and it works as intended. In addition to the ring buffer, are there other test cases? Yu-cheng