linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] fs/exec: don't force writing memory access
@ 2016-11-03  3:04 Jann Horn
  2016-11-03  3:04 ` [PATCH 2/3] mm: add LSM hook for writes to readonly memory Jann Horn
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Jann Horn @ 2016-11-03  3:04 UTC (permalink / raw)
  To: security, Alexander Viro, Paul Moore, Stephen Smalley,
	Eric Paris, James Morris, Serge E. Hallyn, mchong,
	Andy Lutomirski, Ingo Molnar, Oleg Nesterov, Nick Kralevich,
	Janis Danisevskis
  Cc: linux-security-module, linux-mm, linux-kernel

This shouldn't change behavior in any way - at this point, there should be
no non-writable mappings, only the initial stack mapping -, but this change
makes it easier to reason about the correctness of the following commits
that place restrictions on forced memory writes.

Signed-off-by: Jann Horn <jann@thejh.net>
Reviewed-by: Janis Danisevskis <jdanis@android.com>
---
 fs/exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/exec.c b/fs/exec.c
index 4e497b9ee71e..dbc2dd2f0829 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -191,7 +191,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
 {
 	struct page *page;
 	int ret;
-	unsigned int gup_flags = FOLL_FORCE;
+	unsigned int gup_flags = 0;
 
 #ifdef CONFIG_STACK_GROWSUP
 	if (write) {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-11-03 17:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-03  3:04 [PATCH 1/3] fs/exec: don't force writing memory access Jann Horn
2016-11-03  3:04 ` [PATCH 2/3] mm: add LSM hook for writes to readonly memory Jann Horn
2016-11-03 10:39   ` Jann Horn
2016-11-03  3:04 ` [PATCH 3/3] selinux: require EXECMEM for forced ptrace poke Jann Horn
2016-11-03  3:04 ` [PATCH v3 1/3] fs/exec: don't force writing memory access Jann Horn
2016-11-03 18:24   ` Oleg Nesterov
2016-11-03  3:04 ` [PATCH v3 2/3] mm: add LSM hook for writes to readonly memory Jann Horn
2016-11-03  3:10   ` Jann Horn
2016-11-03  3:04 ` [PATCH v3 3/3] selinux: require EXECMEM for forced ptrace poke Jann Horn
2016-11-03 13:21   ` Stephen Smalley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).