Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753898AbdLFIyh (ORCPT ); Wed, 6 Dec 2017 03:54:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46892 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbdLFIyf (ORCPT ); Wed, 6 Dec 2017 03:54:35 -0500 Subject: Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE To: John Hubbard , Matthew Wilcox , Michael Ellerman Cc: Cyril Hrubis , Michal Hocko , Kees Cook , Linux API , Khalid Aziz , Andrew Morton , Russell King - ARM Linux , Andrea Arcangeli , Linux-MM , LKML , linux-arch , Abdul Haleem , Joel Stanley References: <20171129144219.22867-1-mhocko@kernel.org> <20171130065835.dbw4ajh5q5whikhf@dhcp22.suse.cz> <20171201152640.GA3765@rei> <87wp20e9wf.fsf@concordia.ellerman.id.au> <20171206045433.GQ26021@bombadil.infradead.org> <20171206070355.GA32044@bombadil.infradead.org> <5f4fc834-274a-b8f1-bda0-5bcddc5902ed@nvidia.com> <27ee1755-76d8-f086-5760-9c973b31108a@nvidia.com> From: Florian Weimer Message-ID: <66677640-5c4a-0758-9560-e45de2d5ba06@redhat.com> Date: Wed, 6 Dec 2017 09:54:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <27ee1755-76d8-f086-5760-9c973b31108a@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 06 Dec 2017 08:54:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 734 Lines: 23 On 12/06/2017 09:06 AM, John Hubbard wrote: > On 12/05/2017 11:35 PM, Florian Weimer wrote: >> On 12/06/2017 08:33 AM, John Hubbard wrote: >>> In that case, maybe: >>> >>>      MAP_EXACT >>> >>> ? ...because that's the characteristic behavior. >> >> Is that true?  mmap still silently rounding up the length to the page size, I assume, so even that name is misleading. > > Hi Florian, > > Not as far as I can tell, it's not doing that. > > For both MAP_FIXED, and this new flag, the documented (and actual) > behavior is *not* to do any such rounding. Instead, the requested > input address is required to be page-aligned itself, and mmap() > should be honoring the exact addr. I meant the length, not the address. Florian