Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2161241imm; Tue, 2 Oct 2018 22:37:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV60TRi+q7esKdz3d0TUNxcuQuXexxXvUoMdN6WMt9icCTJ4PTesKNhFJODoQ+/KzuteYrZZh X-Received: by 2002:a65:4882:: with SMTP id n2-v6mr16449677pgs.225.1538545023617; Tue, 02 Oct 2018 22:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538545023; cv=none; d=google.com; s=arc-20160816; b=GJv4t4cvO+cfTKfTwnktX9Eq+hO00r0pgveMZ47M9UP2S4WcRZRR4PfoZIOAAP0LrB QfpWSOMGc4/jk5vdOUDz27rffz2IM4Yab5WuTqa0wZ90wawZSAnwffz1An6KC38tDlkg dOdDhxLoeHMslRvyGa2geJ+Gmjp/GHdGseefaTSsr72oCBqrdvpB9+RL2PllDA5ZCcpG KhbepREAYFrGLjWiM07hS8OZcSln0qkRKsEb+6Q6lBWL+6mGSDlZESj8Iq/NA7aGVHcW 9PiPh54X4mM+KyI6yxsyCC2SsMtdSgzILRPaxEPwRd7u0QMU4JZtshzcv6ha9eP0OMwp PxGw== 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; bh=b5IzN2R0b3fgX4LTca8jf3J3eYSg2AdZODTPbmmS80Q=; b=EiyEA9nUMgJeqIlyWCgVsqYvs1cRvIRsEuf9BmG8AtU3NkdV3H3IjvfqKnHoCX3mnY uorRLsFyPJXxKILdPK0hA2cGwb/gF3CrR9LhwPNiW6W6QnXOEpiz+1zmiTdhmf1OwJ6c owafa21qUh5d4rXrhQb/whUXpqXxxGomptj2qYbg+IUeNrMix3UZinKRFWOlFnnJkc9Z S9p6GjpCjZoyRrodrqLnC3H5Kuck/Ikk+faR0motdiL+6rjlmdQFDYtGqFvemLmhOxLN JyjFriwBjgiL75cIdQjPdrRvVijcl1X6y0UXE1sdxemaKzdXtwYuAMsKtmTcLZpH+MpJ FX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=2MjOynBL; 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 t192-v6si235304pgc.485.2018.10.02.22.36.47; Tue, 02 Oct 2018 22:37:03 -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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=2MjOynBL; 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 S1726710AbeJCMXS (ORCPT + 99 others); Wed, 3 Oct 2018 08:23:18 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:32888 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726543AbeJCMXS (ORCPT ); Wed, 3 Oct 2018 08:23:18 -0400 Received: by mail-wr1-f67.google.com with SMTP id e4-v6so4618400wrs.0 for ; Tue, 02 Oct 2018 22:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b5IzN2R0b3fgX4LTca8jf3J3eYSg2AdZODTPbmmS80Q=; b=2MjOynBLTduMQnaavvY8b6/cEF8UMICLYw1uA/OK8j/EfXTlXm73GzcpPHBTIKbpJZ Tbqbn1wOM+10GZLBBHWy2oyLLTTx7C0sQp6NbT8LIJlGuPWpHXQqTtWWsz3+HcvRbQAK FNcF9tPznE5Av8KMYgd9t8Tjvr2auUUw6OFTu3fVFJo1JQPzxhT2x4bs34dcKP8l8c2N ZS6/Uxqic6nY+tCr+AngbAZMVxtrP5LxiSIx6JUCPT0khmkxiqSZQsgmrHYw4cepR09F VpVM5pu2Sn0mcN2jhYhkrU4DhS7yOyz1IEWB3C8bhQ4VWmwwZ898NjxPIfd+00Ffrx8u 2/dA== 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=b5IzN2R0b3fgX4LTca8jf3J3eYSg2AdZODTPbmmS80Q=; b=uZAbi63mxZpoNmbG5Mcdb+QXwxohosscYvDb2ATGA5+Qcw6+fQ0PQwMDP/vRpFUcYa Przj75nSKf5GS2Yyt9bmMMYvRDU1ktvAarmFXl2AqoKJzYgVffgKg4XWX3wT2/zmpIcv 9pbOKVqpHi338zAefajrnFp/Fz/qWOyvH/k63SDTHW4Yo6t4mJmhBoNEJhniWxL76CaN /NHYVJr4yXNxnxrcWNwJrwpmaUjtmzxN4w1jqLXL04UOoNN1MisUVK9qb/+UftqZ4FN4 lHR1Vs5j/7MsJUXBi3hXB1orRRv7geOKjaRD53krUV08DkWBopgdqF5YiRwI0BaqQwTE ozeg== X-Gm-Message-State: ABuFfogVxq7VBj6e19zOtoUt1HXtu4EJTrwp1mQSh1HPaXxK1ZdCzzBy n7LMQ9KHWlAq/yOqMS9oR0tZnguVdvH326Euykcziw== X-Received: by 2002:a5d:610a:: with SMTP id v10-v6mr12787049wrt.308.1538544987362; Tue, 02 Oct 2018 22:36:27 -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 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" 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 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