Received: by 10.223.164.202 with SMTP id h10csp4535333wrb; Wed, 29 Nov 2017 07:52:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMbq82onRB66+WsmtcJlp2LPEXzjzCjlTmfPfBraYqr2VMIp6s+13y7ITeRzSnEnDqKDm0xc X-Received: by 10.99.141.75 with SMTP id z72mr3137172pgd.73.1511970750423; Wed, 29 Nov 2017 07:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511970750; cv=none; d=google.com; s=arc-20160816; b=VZEdhuFFlBlYKZNHwmj4S47D4qDlnBCUAqGiu5NX/XZr8UCoSHx6tbWCiHZyXA45xu uxIKHDbuKqwALCL2yBh8BecpZ8lGTRxxqgi7zcNBrIhiU+NYJSi/Gjc6XVXIqOHm0q8z xcNdvM2pm126IU+DrE3p+T9O0VMfe0jNi7Czjg0ywimIg0UZl3ANe4A2un1gu+B6L2Bp Pjh7meHY/UQqGh6m/FpcYoqU8riZob3UuA0+6V3O3Qp1kgpIOIiSVPjTmMUyJCFRwht3 07eHeXw46FqF6Whpelc+ySML0Lw6oyj0mn3z7sHaamPPbgrbXqFpz9fMQu6Kx54l+mTm UqGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=PWJ6fkKJL0ZOdRTEzKRJxEpeyShiom0SRxti5x7t+tw=; b=Omqc7GWym6LgJhmVQhzBdNUrlSfsyMh+88zJ0MgcZUJcKoWqM1KwVk8xe2Ycj5imRW Nqde27q5pCVFNSBqM21fNnugBlvu/oV2ojHLHBl7b9d04Y99cSXobh4R6RMdP3J5zihU 6VTkHqLgF7O8qXWXqjQfxdjwPjlz69/b3xN6nF/6+wL73WsyVtN2xsOx9WQS0Ek24Vtp xdN3y0p8TMcwIKVqO46hA42JhkTKsR6A0IgPM+fUb+4P5BwBE733Z1UvlVDX3v+zWzGm EBwF8TsLPwsKLmoMh05UM4N+rKznQRdeECLtOy91zwQXy+MFGCJGDetn+Qc1fDuTlfX7 //Tw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f15si1452768plr.148.2017.11.29.07.52.20; Wed, 29 Nov 2017 07:52:30 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933506AbdK2PuP (ORCPT + 69 others); Wed, 29 Nov 2017 10:50:15 -0500 Received: from mx2.suse.de ([195.135.220.15]:42647 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933055AbdK2PuN (ORCPT ); Wed, 29 Nov 2017 10:50:13 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E5A60AD10; Wed, 29 Nov 2017 15:50:11 +0000 (UTC) Date: Wed, 29 Nov 2017 16:50:09 +0100 From: Michal Hocko To: Rasmus Villemoes Cc: 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 , Abdul Haleem , Joel Stanley , Kees Cook Subject: Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE Message-ID: <20171129155009.i5xai77rrapsyrd2@dhcp22.suse.cz> References: <20171129144219.22867-1-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 29-11-17 16:13:53, Rasmus Villemoes wrote: > On 2017-11-29 15:42, Michal Hocko wrote: [...] > >The flag is introduced as a completely > > new one rather than a MAP_FIXED extension because of the backward > > compatibility. We really want a never-clobber semantic even on older > > kernels which do not recognize the flag. Unfortunately mmap sucks wrt. > > flags evaluation because we do not EINVAL on unknown flags. On those > > kernels we would simply use the traditional hint based semantic so the > > caller can still get a different address (which sucks) but at least not > > silently corrupt an existing mapping. I do not see a good way around > > that. > > I think it would be nice if this rationale was in the 1/2 changelog, > along with the hint about what userspace that wants to be compatible > with old kernels will have to do (namely, check that it got what it > requested) - which I see you did put in the man page. OK, I've added there. -- Michal Hocko SUSE Labs From 1585411913295978731@xxx Wed Nov 29 14:43:42 +0000 2017 X-GM-THRID: 1585411913295978731 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread