From: Davidlohr Bueso <davidlohr@hp.com>
To: Manfred Spraul <manfred@colorfullife.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Rik van Riel <riel@redhat.com>, Mike Galbraith <efault@gmx.de>,
sedat.dilek@gmail.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Davidlohr Bueso <davidlohr@hp.com>
Subject: [PATCH 0/4] ipc: shm and msg fixes
Date: Sun, 15 Sep 2013 20:04:33 -0700 [thread overview]
Message-ID: <1379300677-24188-1-git-send-email-davidlohr@hp.com> (raw)
This patchset deals with the selinux and rmid races Manfred found on
the ipc scaling work that has been going on. It specifically addresses
shared mem and msg queues. While semaphores still need updated, I want
to make sure these are correct first. Also, Manfred had already sent out
a patchset that deals with a race in sem complex operations. So any changes
should be on top of his.
Patches 1 and 2 deal with shared memory.
Patches 3 and 4 deal with msg queues.
Specific details about each race and its fix are in the corresponding
patches.
Note that Linus suggested a good alternative to patches 1 and 3: use
kfree_rcu() and delay the freeing of the security structure. I would
much prefer that approach to doing security checks with the lock held,
but I want to leave the patches out and ready in case we go with the
later solution.
I have tested these patches with IPC testcases from LTP on both my
quad-core laptop and on a 64 core NUMA server. In both cases, voluntary
and forced preemption have passed the tests -- note that I was not able
to reproduce any of these bugs in the first case, so these tests were
mostly to make sure I didn't further introduce any other issues.
Manfred, could you please give me your feedback on these, as I'd like
to make sure I'm not doing anything stupid.
Davidlohr Bueso (4):
ipc,shm: fix race with selinux
ipc,shm: prevent race with rmid in shmat(2)
ipc,msg: fix race with selinux
ipc,msg: prevent race with rmid in msgsnd,msgrcv
ipc/msg.c | 27 +++++++++++++++++++++------
ipc/shm.c | 31 ++++++++++++++++++++++---------
2 files changed, 43 insertions(+), 15 deletions(-)
--
1.7.11.7
next reply other threads:[~2013-09-16 3:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 3:04 Davidlohr Bueso [this message]
2013-09-16 3:04 ` [PATCH 1/4] ipc,shm: fix race with selinux Davidlohr Bueso
2013-09-16 9:23 ` Manfred Spraul
2013-09-16 3:04 ` [PATCH 2/4] ipc,shm: prevent race with rmid in shmat(2) Davidlohr Bueso
2013-09-27 5:45 ` Manfred Spraul
2013-09-27 23:40 ` Davidlohr Bueso
2013-09-16 3:04 ` [PATCH 3/4] ipc,msg: fix race with selinux Davidlohr Bueso
2013-09-16 3:04 ` [PATCH 4/4] ipc,msg: prevent race with rmid in msgsnd,msgrcv Davidlohr Bueso
2013-09-27 5:50 ` Manfred Spraul
2013-09-19 21:22 ` [PATCH 0/4] ipc: shm and msg fixes Davidlohr Bueso
2013-09-20 18:08 ` Eric Paris
2013-09-21 18:30 ` Davidlohr Bueso
2013-09-21 18:58 ` Linus Torvalds
2013-09-23 6:42 ` Davidlohr Bueso
2013-09-23 16:54 ` Linus Torvalds
2013-09-24 0:04 ` Davidlohr Bueso
2013-09-24 1:22 ` Linus Torvalds
2013-09-24 8:49 ` Manfred Spraul
2013-09-24 9:05 ` Manfred Spraul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379300677-24188-1-git-send-email-davidlohr@hp.com \
--to=davidlohr@hp.com \
--cc=akpm@linux-foundation.org \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=riel@redhat.com \
--cc=sedat.dilek@gmail.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®