From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu-cheng Yu Subject: Re: [RFC PATCH v2 23/27] mm/mmap: Add IBT bitmap size to address space limit check Date: Wed, 11 Jul 2018 09:56:27 -0700 Message-ID: <1531328187.13297.35.camel@intel.com> References: <20180710222639.8241-1-yu-cheng.yu@intel.com> <20180710222639.8241-24-yu-cheng.yu@intel.com> <7cdadb28-a9aa-550b-9e31-30691b64b504@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <7cdadb28-a9aa-550b-9e31-30691b64b504@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org To: Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek Peter List-Id: linux-api@vger.kernel.org On Tue, 2018-07-10 at 16:57 -0700, Dave Hansen wrote: > On 07/10/2018 03:26 PM, Yu-cheng Yu wrote: > > > > The indirect branch tracking legacy bitmap takes a large address > > space.  This causes may_expand_vm() failure on the address limit > > check.  For a IBT-enabled task, add the bitmap size to the > > address limit. > This appears to require that we set up > current->thread.cet.ibt_bitmap_size _before_ calling may_expand_vm(). > What keeps the ibt_mmap() itself from hitting the address limit? Yes, that is overlooked.  I will fix it. Thanks, Yu-cheng