All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge@hallyn.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: lizf@cn.fujitsu.com, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] TOMOYO: Clarify lock protected section.
Date: Mon, 1 Jun 2009 21:43:06 -0500	[thread overview]
Message-ID: <20090602024306.GB21564@hallyn.com> (raw)
In-Reply-To: <200906020230.n522UjfJ013581@www262.sakura.ne.jp>

Quoting Tetsuo Handa (penguin-kernel@i-love.sakura.ne.jp):
> Li Zefan wrote:
> > Tetsuo Handa wrote:
> > > Enclose reader section in
> > > 	/***** READER SECTION START *****/
> > > and
> > > 	/***** READER SECTION END *****/
> > > and writer section in
> > > 	/***** WRITER SECTION START *****/
> > > and
> > > 	/***** WRITER SECTION END *****/
> > > in order to avoid oversighting lock protected section.
> > > 
> > 
> > This makes me a bit uncomfortable..
> > 
> > IMHO this seems ugly, useless, and even harmful. If it's helpful,
> > we'd be doing this for the whole kernel tree, which is crazy..
> > 
> > Or does tomoyo do this for it's special reason?
> 
> I intended to help reviewers to visualize the range of protected section
> at a glance. But if reviewers feel noisy, I can remove these markers.

No, the real problem is that you have "protected sections" at all.

You should be locking data, not code.  (Apparently a quote to be attributed
to Alan Cox - huh)

See the bottom of:
http://www.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/x376.html

-serge

  parent reply	other threads:[~2009-06-02  2:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02  1:43 [PATCH 2/5] TOMOYO: Clarify lock protected section Tetsuo Handa
2009-06-02  2:21 ` Li Zefan
2009-06-02  2:30   ` Tetsuo Handa
2009-06-02  2:37     ` Li Zefan
2009-06-02  2:43     ` Serge E. Hallyn [this message]
2009-06-02  3:42       ` Tetsuo Handa
2009-06-02  5:08     ` James Morris
2009-06-02  5:23       ` Tetsuo Handa
2009-06-02 21:51         ` James Morris

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=20090602024306.GB21564@hallyn.com \
    --to=serge@hallyn.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.