Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2064268ybx; Thu, 7 Nov 2019 22:39:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzZeE4ZL11tezRJe3y57G+Oz4HzyGHWRk/UH/b8dciUmd2TfGWjI8vLdAHEhlSntiWnkVuH X-Received: by 2002:a50:a7a1:: with SMTP id i30mr8254344edc.94.1573195174743; Thu, 07 Nov 2019 22:39:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573195174; cv=none; d=google.com; s=arc-20160816; b=csJPT4SkDJZ3TTxTt8avDeV1XdBlCXaWzFqULobj09Wa6noLC8D8bcuHL82Oi+60hN 7juzc2E8NbE00op2ykpR62a/P4yEy2T3RtMGa0CELIR0nu2H7TtGhox7ArqUKQ5kgiqD ZzBm0yoofGkXTOvG8YvS9gf2STV3kogRsT4KyvFmjPof1QAA2ShIMTNAP2/KnLO9m45C pTQgSW4WwQuzz1gxsVutGVEPA18p+2BaN+vRBxbFssXKhcCFpRqrYRsoYm0CsRr4QcSh H9A6Eqk5Dd2EqnMf6X8aMRu+ElbyV5quq3xCtxV16gB6qDZo2Cd4zTGj9teCQwGmMvA9 CmrA== 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:dkim-signature; bh=OTIhBqsQSzJVzy10oOpNSKBotbyVoxZEunt4DW4jq/A=; b=arnRLMPoAB9jKQOx6q1r3ofvDJ+DSmEJ/H7sdvIaReXP+v0HSVFZnYJoK8q1rMuU6F 0CJLdaFIiPDao2Rox6qkCyk2PYTq57D1d83C6BAiWYPjvpugHkJzz/s7EXLRUKAIsKF1 SKFB82kOJb6gHtVocQiSEJ1ktE+Su6L8j2Ngs8X9Lbq0FY0IjqQ1Ag5/jFklYy612cX1 9FQdW88ZCKJ/kCbbq6h9+PsmvHQpF54d2/u6+BlSewC18Vi5TCFViqoe34he9AyktBZ9 wAXPuKXma7eSk4XYimN7anYmL3z6Kveu7JrXr75LaI0QUbxongZwcNmHUF9nw+moJO94 D2Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LlvNmAWE; 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 b29si3519157ede.118.2019.11.07.22.39.10; Thu, 07 Nov 2019 22:39:34 -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; dkim=pass header.i=@kernel.org header.s=default header.b=LlvNmAWE; 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 S1727017AbfKHGhT (ORCPT + 99 others); Fri, 8 Nov 2019 01:37:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:57496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbfKHGhT (ORCPT ); Fri, 8 Nov 2019 01:37:19 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6CA421882; Fri, 8 Nov 2019 06:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573195038; bh=sXe/lKnHWXWz0aIej4oPyDwjQIRvSAnRd4dPdmDpkII=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LlvNmAWEIFV3DOIrxKnv8p/Io0xVltpUHrWIziebLbV98yw0fcsZwyxSmE25Af5V8 lCAriWwM88CjnNik4h37rJD5I1XjJYSR0YIZdq/vgelAa8ihvdPvFW8FOf3VIdZNCg QIjP4MEv3UaTX2KWtlJdvJUdrv5bRc0tOXixTUxM= Date: Fri, 8 Nov 2019 07:37:15 +0100 From: Greg KH To: Joel Fernandes Cc: Andrew Morton , linux-kernel@vger.kernel.org, Nicolas Geoffray , kernel-team@android.com, Hugh Dickins , linux-kselftest@vger.kernel.org, linux-mm@kvack.org, Shuah Khan Subject: Re: [PATCH 1/2] memfd: Fix COW issue on MAP_PRIVATE and F_SEAL_FUTURE_WRITE mappings Message-ID: <20191108063715.GA513315@kroah.com> References: <20191107195355.80608-1-joel@joelfernandes.org> <20191107170023.0695732bb67eb80acd4caee5@linux-foundation.org> <20191108020614.GA99567@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191108020614.GA99567@google.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 07, 2019 at 09:06:14PM -0500, Joel Fernandes wrote: > On Thu, Nov 07, 2019 at 05:00:23PM -0800, Andrew Morton wrote: > > On Thu, 7 Nov 2019 14:53:54 -0500 "Joel Fernandes (Google)" wrote: > > > > > F_SEAL_FUTURE_WRITE has unexpected behavior when used with MAP_PRIVATE: > > > A private mapping created after the memfd file that gets sealed with > > > F_SEAL_FUTURE_WRITE loses the copy-on-write at fork behavior, meaning > > > children and parent share the same memory, even though the mapping is > > > private. > > > > That sounds fairly serious. Should this be backported into -stable kernels? > > Yes, it should be. The F_SEAL_FUTURE_WRITE feature was introduced in v5.1 so > v5.3.x stable kernels would need a backport. I can submit a backport tomorrow > unless we are Ok with stable automatically picking it up (I believe the > stable folks "auto select" fixes which should detect this is a fix since I > have said it is a fix in the subject line). Never rely on "auto select" to pick up a patch for stable if you already know it should go to stable. Just mark it as such, or tell stable@vger after the fact. thanks, greg k-h