Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932268AbdIHHmR (ORCPT ); Fri, 8 Sep 2017 03:42:17 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:55835 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804AbdIHHmQ (ORCPT ); Fri, 8 Sep 2017 03:42:16 -0400 Date: Fri, 8 Sep 2017 00:42:16 -0700 From: Christoph Hellwig To: Tycho Andersen Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-hardening@lists.openwall.com, Marco Benatto , Juerg Haefliger Subject: Re: [PATCH v6 01/11] mm: add MAP_HUGETLB support to vm_mmap Message-ID: <20170908074216.GA4957@infradead.org> References: <20170907173609.22696-1-tycho@docker.com> <20170907173609.22696-2-tycho@docker.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170907173609.22696-2-tycho@docker.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 492 Lines: 13 On Thu, Sep 07, 2017 at 11:35:59AM -0600, Tycho Andersen wrote: > vm_mmap is exported, which means kernel modules can use it. In particular, > for testing XPFO support, we want to use it with the MAP_HUGETLB flag, so > let's support it via vm_mmap. > } else if (flags & MAP_HUGETLB) { > + file = map_hugetlb_setup(&len, flags); > if (IS_ERR(file)) > return PTR_ERR(file); > } It seems like you should remove this hunk entirely and make all MAP_HUGETLB calls go through vm_mmap.