From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 6C6736B025F for ; Fri, 11 Aug 2017 10:25:00 -0400 (EDT) Received: by mail-wm0-f70.google.com with SMTP id k68so6514761wmd.14 for ; Fri, 11 Aug 2017 07:25:00 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id o9si750888wrc.547.2017.08.11.07.24.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 11 Aug 2017 07:24:59 -0700 (PDT) Date: Fri, 11 Aug 2017 16:24:57 +0200 From: Michal Hocko Subject: Re: [PATCH v2 0/2] mm,fork,security: introduce MADV_WIPEONFORK Message-ID: <20170811142457.GP30811@dhcp22.suse.cz> References: <20170807134648.GI32434@dhcp22.suse.cz> <1502117991.6577.13.camel@redhat.com> <20170810130531.GS23863@dhcp22.suse.cz> <20170810153639.GB23863@dhcp22.suse.cz> <20170810170144.GA987@dhcp22.suse.cz> <20170811140653.GO30811@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Florian Weimer Cc: Colm =?iso-8859-1?Q?MacC=E1rthaigh?= , Kees Cook , Mike Kravetz , Rik van Riel , Will Drewry , akpm@linux-foundation.org, dave.hansen@intel.com, kirill@shutemov.name, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, luto@amacapital.net, mingo@kernel.org On Fri 11-08-17 16:11:44, Florian Weimer wrote: > On 08/11/2017 04:06 PM, Michal Hocko wrote: > > > I am sorry to look too insisting here (I have still hard time to reconcile > > myself with the madvise (ab)use) but if we in fact want minherit like > > interface why don't we simply add minherit and make the code which wants > > to use that interface easier to port? Is the only reason that hooking > > into madvise is less code? If yes is that a sufficient reason to justify > > the (ab)use of madvise? If there is a general consensus on that part I > > will shut up and won't object anymore. Arguably MADV_DONTFORK would fit > > into minherit API better as well. > > It does, OpenBSD calls it MAP_INHERIT_NONE. > > Could you implement MAP_INHERIT_COPY and MAP_INHERIT_SHARE as well? Or > is changing from MAP_SHARED to MAP_PRIVATE and back impossible? I haven't explored those two very much. Their semantic seems rather awkward, especially map_inherit_share one. I guess MAP_INHERIT_COPY would be doable. Do we have to support all modes or a missing support would disqualify the syscall completely? -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org