linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -part1 0/3] mm: improve handling of mm->exe_file
@ 2015-02-19  0:10 Davidlohr Bueso
  2015-02-19  0:10 ` [PATCH 1/3] kernel/audit: consolidate " Davidlohr Bueso
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Davidlohr Bueso @ 2015-02-19  0:10 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, dave

From: Davidlohr Bueso <dave@stgolabs.net>

This series is the first in a few where I'm planning on removing
the mmap_sem need for exe_file serialization. This is absurd and
needs to have its own locking. Anyway, this is the final goal, and
this series is just the first of a few that deals with unifying users
of exe_file.

For now we only deal with audit and tomoyo, the most obvious naughty
users, which only take the mmap_sem for exe_file. Over the years,
relying on the mmap_sem for exe_file has made some callers increasingly
messy and it is not as straightforward.

Essentially, we want to convert:

down_read(&mm->mmap_sem);
do_something_with(mm->exe_file);
up_read(&mm->mmap_sem);

to:

exe_file = get_mm_exe_file(mm); <--- mmap_sem is only held here.
do_something_with(mm->exe_file);
fput(exe_file);

On its own, these patches already have value in that we reduce mmap_sem hold
times and critical region. Once all users are standardized, converting the
lock rules will be much easier.

Thanks!

Davidlohr Bueso (3):
  kernel/audit: consolidate handling of mm->exe_file
  kernel/audit: robustify handling of mm->exe_file
  security/tomoyo: robustify handling of mm->exe_file

 kernel/audit.c           |  9 +--------
 kernel/audit.h           | 20 ++++++++++++++++++++
 kernel/auditsc.c         |  9 +--------
 security/tomoyo/common.c | 41 ++++++++++++++++++++++++++++++++++++++---
 security/tomoyo/common.h |  1 -
 security/tomoyo/util.c   | 22 ----------------------
 6 files changed, 60 insertions(+), 42 deletions(-)

-- 
2.1.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2015-03-04 17:35 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19  0:10 [PATCH -part1 0/3] mm: improve handling of mm->exe_file Davidlohr Bueso
2015-02-19  0:10 ` [PATCH 1/3] kernel/audit: consolidate " Davidlohr Bueso
2015-02-19  3:23   ` Paul Moore
2015-02-21  1:23     ` Davidlohr Bueso
2015-02-21 13:45       ` Paul Moore
2015-02-21 15:00         ` Davidlohr Bueso
2015-02-22 13:14           ` Paul Moore
2015-02-23  2:20   ` [PATCH v2 " Davidlohr Bueso
2015-02-23 21:59     ` Paul Moore
2015-02-23 22:02       ` Davidlohr Bueso
2015-02-23 22:24         ` Paul Moore
2015-02-19  0:10 ` [PATCH 2/3] kernel/audit: robustify " Davidlohr Bueso
2015-02-23  2:20   ` [PATCH v2 2/3] kernel/audit: reduce mmap_sem hold for mm->exe_file Davidlohr Bueso
2015-02-23 21:59     ` Paul Moore
2015-02-19  0:10 ` [PATCH 3/3] tomoyo: robustify handling of mm->exe_file Davidlohr Bueso
2015-02-19  5:38   ` Davidlohr Bueso
2015-02-19 11:07     ` Tetsuo Handa
2015-02-19 18:22       ` Davidlohr Bueso
2015-02-19 22:11         ` Tetsuo Handa
2015-02-20 16:28           ` Davidlohr Bueso
2015-02-24  2:45             ` Davidlohr Bueso
2015-02-24 11:35             ` Tetsuo Handa
2015-02-24 19:42               ` [PATCH v3 3/3] tomoyo: reduce mmap_sem hold for mm->exe_file Davidlohr Bueso
2015-02-25 11:40                 ` Tetsuo Handa
2015-02-25 17:39                   ` Davidlohr Bueso
2015-03-04 17:35                   ` Davidlohr Bueso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox