From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755562AbcI2QKM (ORCPT ); Thu, 29 Sep 2016 12:10:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48560 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753890AbcI2QKJ (ORCPT ); Thu, 29 Sep 2016 12:10:09 -0400 Date: Thu, 29 Sep 2016 18:09:01 +0200 From: Oleg Nesterov To: Jann Horn Cc: security@kernel.org, Alexander Viro , Paul Moore , Stephen Smalley , Eric Paris , James Morris , "Serge E. Hallyn" , Nick Kralevich , Janis Danisevskis , linux-security-module@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] fs/exec: don't force writing memory access Message-ID: <20160929160901.GB30031@redhat.com> References: <1475103281-7989-1-git-send-email-jann@thejh.net> <1475103281-7989-2-git-send-email-jann@thejh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1475103281-7989-2-git-send-email-jann@thejh.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 29 Sep 2016 16:10:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/29, Jann Horn wrote: > > @@ -204,7 +204,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, > * doing the exec and bprm->mm is the new process's mm. > */ > ret = get_user_pages_remote(current, bprm->mm, pos, 1, write, > - 1, &page, NULL); > + 0, &page, NULL); To me this looks like a reasonable cleanup regardless, FOLL_FORCE just adds the unnecessary confusion here. Oleg.