From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754461AbdHDXon (ORCPT ); Fri, 4 Aug 2017 19:44:43 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:38547 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753787AbdHDXok (ORCPT ); Fri, 4 Aug 2017 19:44:40 -0400 Date: Sat, 5 Aug 2017 02:44:35 +0300 From: "Kirill A. Shutemov" To: riel@redhat.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, fweimer@redhat.com, colm@allcosts.net, akpm@linux-foundation.org, rppt@linux.vnet.ibm.com, keescook@chromium.org, luto@amacapital.net, wad@chromium.org, mingo@kernel.org Subject: Re: [PATCH 0/2] mm,fork,security: introduce MADV_WIPEONFORK Message-ID: <20170804234435.lkblljl3f3ud2spm@node.shutemov.name> References: <20170804190730.17858-1-riel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170804190730.17858-1-riel@redhat.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 04, 2017 at 03:07:28PM -0400, riel@redhat.com wrote: > [resend because half the recipients got dropped due to IPv6 firewall issues] > > Introduce MADV_WIPEONFORK semantics, which result in a VMA being > empty in the child process after fork. This differs from MADV_DONTFORK > in one important way. > > If a child process accesses memory that was MADV_WIPEONFORK, it > will get zeroes. The address ranges are still valid, they are just empty. I feel like we are repeating mistake we made with MADV_DONTNEED. MADV_WIPEONFORK would require a specific action from kernel, ignoring the /advise/ would likely lead to application misbehaviour. Is it something we really want to see from madvise()? -- Kirill A. Shutemov