From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759321AbcKCR00 (ORCPT ); Thu, 3 Nov 2016 13:26:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46016 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754218AbcKCR0Y (ORCPT ); Thu, 3 Nov 2016 13:26:24 -0400 Date: Thu, 3 Nov 2016 19:24:39 +0100 From: Oleg Nesterov To: Jann Horn Cc: security@kernel.org, Alexander Viro , Paul Moore , Stephen Smalley , Eric Paris , James Morris , "Serge E. Hallyn" , mchong@google.com, Andy Lutomirski , Ingo Molnar , Nick Kralevich , Janis Danisevskis , linux-security-module@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/3] fs/exec: don't force writing memory access Message-ID: <20161103182439.GC11212@redhat.com> References: <1478142286-18427-1-git-send-email-jann@thejh.net> <1478142286-18427-4-git-send-email-jann@thejh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478142286-18427-4-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.27]); Thu, 03 Nov 2016 17:26:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/03, Jann Horn wrote: > > This shouldn't change behavior in any way - at this point, there should be > no non-writable mappings, only the initial stack mapping -, So this FOLL_FORCE just adds the unnecessary confusion, > but this change > makes it easier to reason about the correctness of the following commits > that place restrictions on forced memory writes. and to me it looks like a good cleanup regardless. Exactly because it is not clear why do we need FOLL_FORCE. > Signed-off-by: Jann Horn > Reviewed-by: Janis Danisevskis Acked-by: Oleg Nesterov