+ coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph.patch added to -mm tree
Subsystems (3)
Subject: + coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 19 Nov 2013 14:22:15 -0800
The patch titled
Subject: coredump: make __get_dumpable/get_dumpable inline, kill fs/coredump.h
has been added to the -mm tree. Its filename is
coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Oleg Nesterov <[email protected]>
Subject: coredump: make __get_dumpable/get_dumpable inline, kill fs/coredump.h
1. Remove fs/coredump.h. It is not clear why do we need it, it only declares __get_dumpable(), signal.c includes it for no reason.
2. Now that get_dumpable() and __get_dumpable() are really trivial make them inline in linux/sched.h.
---
fs/coredump.c | 1 - fs/coredump.h | 6 ------ fs/exec.c | 18 ------------------ include/linux/sched.h | 21 +++++++++++++++++---- 4 files changed, 17 insertions(+), 29 deletions(-)
fs/coredump.c renamed from fs/coredump.c~coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph +0 -1
@@ -40,7 +40,6 @@#include <trace/events/task.h> #include "internal.h" -#include "coredump.h" #include <trace/events/sched.h>
fs/coredump.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _FS_COREDUMP_H -#define _FS_COREDUMP_H - -extern int __get_dumpable (unsigned long mm_flags); - -#endif
fs/exec.c renamed from fs/exec.c~coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph +0 -18
@@ -62,7 +62,6 @@#include <trace/events/task.h> #include "internal.h" -#include "coredump.h" #include <trace/events/sched.h>
@@ -1612,7 +1611,6 @@ void set_binfmt(struct linux_binfmt *newif (new)__module_get (new->module); } -EXPORT_SYMBOL (set_binfmt);/*
@@ -1631,22 +1629,6 @@ void set_dumpable(struct mm_struct *mm, }while (cmpxchg (&mm->flags, old, new) != old); } -int __get_dumpable (unsigned long mm_flags) -{ -return mm_flags &MMF_DUMPABLE_MASK ; -} - -/* -* This returns the actual value of the suid_dumpable flag. For things -* that are using this for checking for privilege transitions, it must -* test against SUID_DUMP_USER rather than treating it as a boolean -* value. -*/ -int get_dumpable (struct mm_struct *mm) -{ -return __get_dumpable (mm->flags); -} - SYSCALL_DEFINE3(execve, const char __user *, filename, const char __user *const __user *, argv,
include/linux/sched.h renamed from include/linux/sched.h~coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph +17 -4
@@ -327,10 +327,6 @@ arch_get_unmapped_area_topdown(struct fistatic inline void arch_pick_mmap_layout (struct mm_struct *mm) {}#endif - -extern void set_dumpable (struct mm_struct *mm,int value); -extern int get_dumpable (struct mm_struct *mm); -#define SUID_DUMP_DISABLE 0/* No setuid dumping */ #define SUID_DUMP_USER 1/* Dump as user of process */ #define SUID_DUMP_ROOT 2/* Dump as root */
@@ -341,6 +337,23 @@ extern int get_dumpable(struct mm_struct#define MMF_DUMPABLE_BITS 2#define MMF_DUMPABLE_MASK ((1 << MMF_DUMPABLE_BITS) - 1) +extern void set_dumpable (struct mm_struct *mm,int value); +/* +* This returns the actual value of the suid_dumpable flag. For things +* that are using this for checking for privilege transitions, it must +* test against SUID_DUMP_USER rather than treating it as a boolean +* value. +*/ +static inline int __get_dumpable (unsigned long mm_flags) +{ +return mm_flags &MMF_DUMPABLE_MASK ; +} + +static inline int get_dumpable (struct mm_struct *mm) +{ +return __get_dumpable (mm->flags); +} +/* coredump filter bits */ #define MMF_DUMP_ANON_PRIVATE 2#define MMF_DUMP_ANON_SHARED 3
_
Patches currently in -mm which might be from [email protected] are
origin.patch autofs4-allow-autofs-to-work-outside-the-initial-pid-namespace.patch autofs4-translate-pids-to-the-right-namespace-for-the-daemon.patch coredump-set_dumpable-fix-the-theoretical-race-with-itself.patch coredump-kill-mmf_dumpable-and-mmf_dump_securely.patch coredump-make-__get_dumpable-get_dumpable-inline-kill-fs-coredumph.patch linux-next.patch