Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp875609imm; Wed, 11 Jul 2018 12:31:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdXInxVs5aeEdx9f3YD7Xy8Bo7If8YQ8DqzjpULokvtWErng24MkmHduuWmx1HEwj+tigvp X-Received: by 2002:a63:5d58:: with SMTP id o24-v6mr26506433pgm.349.1531337483349; Wed, 11 Jul 2018 12:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531337483; cv=none; d=google.com; s=arc-20160816; b=nwUS19B2u8qcIFdog9HuxoYg7bZmIqu89iJbgdcR0ePsQ+oq+aFhfQu9oe76ptxE+g oZx8rbFXMcx9AoSCuEBigsrCe1BVTtMYp5kC5+xGYsZ9O0NOHEsqou4uRd2xG+jJN0jI Cj/RNPYn6/2fbIEDOHhYH0LzXh2wmdn4g9R3qKfMctvN46t1X6kWukOmX7iLiapoQUrD zf90WqW0wOpxjaMR2KMZATubdyO+TGj/DzwNkrybOWrQ0edDubqQB2dm65YpGg8Qj6f0 Bn/oJRzUdlm8oCaZpBckVuF3E2LSbxGR6hEZtfLCYkkr97rmP1eZsMihoWpObDIGi3PP 0zLQ== 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:to:from:subject:message-id :arc-authentication-results; bh=YdU4PXaux12F5ugQyURMLGVu6Skia/oEfWLrNkkRd5w=; b=WNkIj1Y8ltNUNTsyzb1LGaXOPsrwafnZ0mIWTs9/m/54yTNM1tuIgfT9/4X5zIKg9L TEVNml9f59/zDgMUd/90otqoKyQo+ZgRrFyubi4fu48DVOxc9HLg94qgaMviMQ56JdXS 4o0QgfFFzYicZuvXASldQYXbM/ZSiuHg3K4HbqNfqqSNamGudXzceXh0Ov5ydtnAQk47 PRrYrTO2pMXAPKNw9LRA4rafgIMF8iL9XmIRP1XVABmI6ctnONFBTYcK+j2o4J1wg3S8 o7GN0sIwi2zxTypNqptdiT2FU2KlkZPjwGxB2+N5o/vgcQsLvKHD7skMcy4u7aJ1l8y/ BJWQ== 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 j67-v6si5013960pfg.34.2018.07.11.12.31.07; Wed, 11 Jul 2018 12:31:23 -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 S2389951AbeGKRF1 (ORCPT + 99 others); Wed, 11 Jul 2018 13:05:27 -0400 Received: from mga17.intel.com ([192.55.52.151]:50649 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388233AbeGKRF1 (ORCPT ); Wed, 11 Jul 2018 13:05:27 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 10:00:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,338,1526367600"; d="scan'208";a="56113029" Received: from 2b52.sc.intel.com ([143.183.136.52]) by orsmga008.jf.intel.com with ESMTP; 11 Jul 2018 10:00:05 -0700 Message-ID: <1531328187.13297.35.camel@intel.com> Subject: Re: [RFC PATCH v2 23/27] mm/mmap: Add IBT bitmap size to address space limit check From: Yu-cheng Yu 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 Zijlstra , "Ravi V. Shankar" , Vedvyas Shanbhogue Date: Wed, 11 Jul 2018 09:56:27 -0700 In-Reply-To: <7cdadb28-a9aa-550b-9e31-30691b64b504@linux.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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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