lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Oct 2007 07:13:57 +0200
From:	Max Kellermann <max@...mpel.org>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] /proc Security Hooks

On 2007/10/16 21:54, Arjan van de Ven <arjan@...radead.org> wrote:
> On Tue, 16 Oct 2007 21:38:50 +0200
> Max Kellermann <mk@...all.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists