public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] sched: mark parent and real_parent as __rcu
Date: Thu, 15 Dec 2011 08:20:59 +0100	[thread overview]
Message-ID: <20111215072058.GA23205@elte.hu> (raw)
In-Reply-To: <CAGXu5jLEiB4i1_WCkDz3MDM=LBKKWB_cqhOWcpzEYAon0YZp8w@mail.gmail.com>


* Kees Cook <keescook@chromium.org> wrote:

> On Wed, Dec 14, 2011 at 11:08 PM, Ingo Molnar <mingo@elte.hu> wrote:
> > * Kees Cook <keescook@chromium.org> wrote:
> >
> >> The parent and real_parent pointers should be considered __rcu, since
> >> they should be held under either tasklist_lock or rcu_read_lock.
> >>
> >> Signed-off-by: Kees Cook <keescook@chromium.org>
> >> ---
> >>  include/linux/sched.h |    4 ++--
> >>  1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > Did you get some warning that alerted you to this problem? If
> > yes then please include it in the changelog, so that people
> > hitting the message can easily find it.
> >
> > Same consideration applies the second patch as well.
> 
> No, this was via code inspection related to reviews of the 
> Yama LSM's use of these structures and comparing the RCU and 
> tasklist_lock behavior/requirements seen in the rest of the 
> kernel. Most attempts at using sparse after this change were 
> not very successful due to the high volume of unrelated noise 
> currently seen with "make C=2", but I was able to confirm that 
> the apparmor and tomoyo patches were flagged by sparse, at 
> least. When this __rcu marking is in place, if there is a 
> place that might need rcu_dereference, it would show up as 
> "warning: dereference of noderef expression".

ok - i'll apply the first patch, please send the second one 
against -tip, it does not apply anymore. (scheduler got moved to 
kernel/sched/)

Thanks,

	Ingo

  reply	other threads:[~2011-12-15  7:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 22:39 [PATCH] sched: mark parent and real_parent as __rcu Kees Cook
2011-12-15  7:08 ` Ingo Molnar
2011-12-15  7:20   ` Kees Cook
2011-12-15  7:20     ` Ingo Molnar [this message]
2011-12-15  9:56 ` [tip:sched/core] sched: Mark " tip-bot for Kees Cook

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=20111215072058.GA23205@elte.hu \
    --to=mingo@elte.hu \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=viro@zeniv.linux.org.uk \
    /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