All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: SE-Linux <selinux@tycho.nsa.gov>, Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: matchfilecon (the program) vs matchfilecon (the libselinux1 fn)
Date: Mon, 2 Aug 2004 21:10:16 +0100	[thread overview]
Message-ID: <20040802201016.GO4194@lkcl.net> (raw)
In-Reply-To: <1091474356.23449.272.camel@moss-spartans.epoch.ncsc.mil>

On Mon, Aug 02, 2004 at 03:19:16PM -0400, Stephen Smalley wrote:
> On Mon, 2004-08-02 at 15:12, Luke Kenneth Casson Leighton wrote:
> > On Mon, Aug 02, 2004 at 10:52:05AM -0400, Stephen Smalley wrote:
> > > What's the objection to patching udev to directly invoke matchpathcon(3)
> > > and setfscreatecon(3) prior to creating each device node?
> >  
> >  time!  how long do those function calls take?
> > 
> >  using /sbin/restorecon, which is the present hack, each device node
> >  creation takes around a quarter of a second (!!)
> 
> Directly invoking the library functions has to be faster than exec'ing a
> separate helper program (restorecon) that then invokes the library
> functions.  Further, restorecon has to re-lookup the device node in the
> filesystem, whereas udev can set up its context upon initial creation. 
> Further, matchpathcon() caches the file context specification upon the
> first call, so if the udev process stays around for multiple device
> creations, then subsequent matchpathcon() calls will be a bit faster
> (although pathname regex matching is still going to take time).
 
 this would probably explain why the selinux support in udev-024 was
 so slow: it was a separate program with functionality pretty much
 identical to /sbin/restorecon.

 l.


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  parent reply	other threads:[~2004-08-02 22:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-01 17:27 matchfilecon (the program) vs matchfilecon (the libselinux1 fn) Luke Kenneth Casson Leighton
2004-08-02 14:00 ` Stephen Smalley
2004-08-02 14:57   ` Luke Kenneth Casson Leighton
2004-08-02 14:52     ` Stephen Smalley
2004-08-02 15:00       ` Stephen Smalley
2004-08-02 19:12       ` Luke Kenneth Casson Leighton
2004-08-02 19:19         ` Stephen Smalley
2004-08-02 20:00           ` Luke Kenneth Casson Leighton
2004-08-02 20:10           ` Luke Kenneth Casson Leighton [this message]
2004-08-02 21:12           ` Luke Kenneth Casson Leighton
2004-08-02 21:12             ` Luke Kenneth Casson Leighton
2004-08-03 11:11             ` Stephen Smalley
2004-08-03 11:11               ` Stephen Smalley
2004-08-03 13:37               ` Luke Kenneth Casson Leighton
2004-08-03 13:37                 ` Luke Kenneth Casson Leighton
2004-08-06 12:05             ` Russell Coker
2004-08-06 12:05               ` Russell Coker
2004-08-07 12:23               ` Luke Kenneth Casson Leighton
2004-08-07 12:23                 ` Luke Kenneth Casson Leighton
2004-08-02 21:25           ` Luke Kenneth Casson Leighton
2004-08-02 21:25             ` Luke Kenneth Casson Leighton

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=20040802201016.GO4194@lkcl.net \
    --to=lkcl@lkcl.net \
    --cc=dwalsh@redhat.com \
    --cc=sds@epoch.ncsc.mil \
    --cc=selinux@tycho.nsa.gov \
    /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.