From: Max Kellermann <max@duempel.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] /proc Security Hooks
Date: Wed, 17 Oct 2007 07:13:57 +0200 [thread overview]
Message-ID: <20071017051357.GA4515@roonstrasse.net> (raw)
In-Reply-To: <20071016125403.40ec5c18@laptopd505.fenrus.org>
On 2007/10/16 21:54, Arjan van de Ven <arjan@infradead.org> wrote:
> On Tue, 16 Oct 2007 21:38:50 +0200
> Max Kellermann <mk@cm4all.com> wrote:
> > This patch attempts to unify duplicated code found in modules like
> > Linux VServer.
>
> can you please merge this patch only when you also merge the first
> user
> of it? That's the only way we can keep the LSM hooks sane... is to
> see
> them in thew conect of a user.
I wrote a module which uses this, but it's non-free and only used on
my employer's servers. But I could have a closer look at the Vserver
code and try to make it use my patch.
> > +#ifdef CONFIG_SECURITY_PROC
> > + if (security_proc_task(task) != 0)
> > + continue;
> > +#endif
>
> please don't use an ifdef like this; just make security_proc_task()
> be
> a define to 0 in the header for that CONFIG_ ..
> In addition, why is this a separate config option? LSM should really
> only be one big switch... microswitches like this don't make any
> sense.
Right, I initially wrote this patch some time ago when
linux/security.h didn't have an "#ifdef CONFIG_SECURITY". I'll adapt
that.
> > +#ifdef CONFIG_SECURITY_PROC
> > + if (security_proc_generic(de) != 0)
> > +
> > goto skip;
> > +#endif
>
> as does this one... but the goto looks horrid to me
I'm all against gotos, but seeing gotos all over the kernel, and my
code being in an #ifdef, this one goto looked "normal" to me. You're
right, I should change it.
Max
next prev parent reply other threads:[~2007-10-17 5:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 19:38 [PATCH] /proc Security Hooks Max Kellermann
2007-10-16 19:54 ` Arjan van de Ven
2007-10-17 5:13 ` Max Kellermann [this message]
2007-10-17 5:21 ` Arjan van de Ven
2007-10-17 5:38 ` Greg KH
2007-10-16 20:20 ` Serge E. Hallyn
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=20071017051357.GA4515@roonstrasse.net \
--to=max@duempel.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.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