From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: [RFC PATCH v4 24/27] mm/mmap: Create a guard area between VMAs Date: Tue, 2 Oct 2018 22:36:15 -0700 Message-ID: References: <20180921150351.20898-1-yu-cheng.yu@intel.com> <20180921150351.20898-25-yu-cheng.yu@intel.com> <20181003045611.GB22724@asgard.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <20181003045611.GB22724@asgard.redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: Eugene Syromiatnikov Cc: Yu-cheng Yu , 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 List-Id: linux-arch.vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com ([209.85.221.67]:39193 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726552AbeJCMXS (ORCPT ); Wed, 3 Oct 2018 08:23:18 -0400 Received: by mail-wr1-f67.google.com with SMTP id 61-v6so3858062wrb.6 for ; Tue, 02 Oct 2018 22:36:28 -0700 (PDT) MIME-Version: 1.0 References: <20180921150351.20898-1-yu-cheng.yu@intel.com> <20180921150351.20898-25-yu-cheng.yu@intel.com> <20181003045611.GB22724@asgard.redhat.com> In-Reply-To: <20181003045611.GB22724@asgard.redhat.com> From: Andy Lutomirski Date: Tue, 2 Oct 2018 22:36:15 -0700 Message-ID: Subject: Re: [RFC PATCH v4 24/27] mm/mmap: Create a guard area between VMAs Content-Type: text/plain; charset="UTF-8" Sender: linux-arch-owner@vger.kernel.org List-ID: To: Eugene Syromiatnikov Cc: Yu-cheng Yu , 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" Message-ID: <20181003053615.klFdV_Wzm_UiopblpGS1AvEJnlmamUl39p_OzJw7xW4@z> 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