Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbdHKOLt (ORCPT ); Fri, 11 Aug 2017 10:11:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48526 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752730AbdHKOLs (ORCPT ); Fri, 11 Aug 2017 10:11:48 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CFC12C099429 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer@redhat.com Subject: Re: [PATCH v2 0/2] mm,fork,security: introduce MADV_WIPEONFORK To: Michal Hocko , =?UTF-8?Q?Colm_MacC=c3=a1rthaigh?= Cc: 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 References: <20170806140425.20937-1-riel@redhat.com> <20170807132257.GH32434@dhcp22.suse.cz> <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> From: Florian Weimer Message-ID: Date: Fri, 11 Aug 2017 16:11:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170811140653.GO30811@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 11 Aug 2017 14:11:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 798 Lines: 18 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? Thanks, Florian