Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753127AbdLMNfz (ORCPT ); Wed, 13 Dec 2017 08:35:55 -0500 Received: from mx2.suse.de ([195.135.220.15]:55011 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752751AbdLMNfv (ORCPT ); Wed, 13 Dec 2017 08:35:51 -0500 Date: Wed, 13 Dec 2017 14:35:47 +0100 From: Michal Hocko To: Pavel Machek Cc: Michael Kerrisk , linux-api@vger.kernel.org, Khalid Aziz , Michael Ellerman , Andrew Morton , Russell King - ARM Linux , Andrea Arcangeli , linux-mm@kvack.org, LKML , linux-arch@vger.kernel.org, Florian Weimer , John Hubbard , Matthew Wilcox , Jann Horn , Mike Rapoport , Cyril Hrubis Subject: Re: [PATCH 2/2] mmap.2: MAP_FIXED updated documentation Message-ID: <20171213133547.GK25185@dhcp22.suse.cz> References: <20171213092550.2774-1-mhocko@kernel.org> <20171213093110.3550-1-mhocko@kernel.org> <20171213093110.3550-2-mhocko@kernel.org> <20171213125540.GA18897@amd> <20171213130458.GI25185@dhcp22.suse.cz> <20171213130900.GA19932@amd> <20171213131640.GJ25185@dhcp22.suse.cz> <20171213132105.GA20517@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171213132105.GA20517@amd> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1795 Lines: 41 On Wed 13-12-17 14:21:05, Pavel Machek wrote: > On Wed 2017-12-13 14:16:40, Michal Hocko wrote: > > On Wed 13-12-17 14:09:00, Pavel Machek wrote: > > > On Wed 2017-12-13 14:04:58, Michal Hocko wrote: > > > > On Wed 13-12-17 13:55:40, Pavel Machek wrote: > > > > > On Wed 2017-12-13 10:31:10, Michal Hocko wrote: > > > > > > From: John Hubbard > > > > > > > > > > > > -- Expand the documentation to discuss the hazards in > > > > > > enough detail to allow avoiding them. > > > > > > > > > > > > -- Mention the upcoming MAP_FIXED_SAFE flag. > > > > > > > > > > Pretty map everyone agreed MAP_FIXED_SAFE was a bad > > > > > name. MAP_FIXED_NOREPLACE (IIRC) was best replacement. > > > > > > > > Please read http://lkml.kernel.org/r/20171213092550.2774-1-mhocko@kernel.org > > > > > > Please fix your patches according to the feedback... > > > > > > NACCKED-by: Pavel Machek > > > > Good luck pursuing this further then. I am not going to spend time on > > naming bikeheds. I have more pressing stuff to work on. > > You selected stupid name for a flag. Everyone and their dog agrees > with that. Not sure about your dog but mine says that a flag which fixes an _unsafe_ aspects of MAP_FIXED can be called MAP_FIXED_SAFE just fine. Anyway, I am not going to argue about this further. I've implemented the code, gathered uscases and fortified an in-kernel user which already led to a security issue in the past. I consider my part done here. I do not agree that MAP_FIXED_NOREPLACE would be so much better to respin and then deal with what about this MAP_$FOO. If there are really stong feelings about this then feel free to take these patches, do s@MAP_FIXED_SAFE@MAP_$FOO@ and try to upstream them yourself. -- Michal Hocko SUSE Labs