All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov
Subject: Re: [PATCH 3/3] SELinux: Add network port SID cache
Date: Wed, 9 Apr 2008 13:37:07 -0400	[thread overview]
Message-ID: <200804091337.07861.paul.moore@hp.com> (raw)
In-Reply-To: <1207761331.21223.475.camel@moss-spartans.epoch.ncsc.mil>

On Wednesday 09 April 2008 1:15:31 pm Stephen Smalley wrote:
> On Mon, 2008-04-07 at 19:11 -0400, Paul Moore wrote:
> > Much like we added a network node cache, this patch adds a network
> > port cache. The design is taken almost completely from the network
> > node cache which in turn was taken from the network interface
> > cache.  The basic idea is to cache entries in a hash table based on
> > protocol/port information.  The hash function only takes the port
> > number into account since the number of different protocols in use
> > at any one time is expected to be relatively small.
>
> Not necessarily an obstacle to merging, but I was wondering if it
> would be worthwhile to investigating unifying these caches into a
> single code base with a more general interface, or if that would be a
> loss overall.

Yeah, I thought of that too when I was doing the network node cache but 
I convinced myself it would probably do more harm than good.  The core 
problem is that all of the hashing and lookup functions are slightly 
different.  Not fatal, we can workaround it via case statments, a 
function table, or something similar but all of these solutions will 
impose some additional overhead.  For something which is supposed to be 
fast I thought it better to not go down this path.

I'm open to suggestions if you have any.

-- 
paul moore
linux @ hp

--
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.

  reply	other threads:[~2008-04-09 17:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07 23:10 [PATCH 0/3] Some SELinux patches for 2.6.26 Paul Moore
2008-04-07 23:11 ` [PATCH 1/3] SELinux: Cleanup the secid/secctx conversion functions Paul Moore
2008-04-08 14:38   ` Stephen Smalley
2008-04-08 14:43   ` Stephen Smalley
2008-04-08 21:13     ` Paul Moore
2008-04-09 17:27       ` Stephen Smalley
2008-04-07 23:11 ` [PATCH 2/3] SELinux: Made netnode cache adds faster Paul Moore
2008-04-09 17:08   ` Stephen Smalley
2008-04-09 17:41     ` Paul Moore
2008-04-10 12:29       ` Stephen Smalley
2008-04-10 13:46         ` Paul Moore
2008-04-07 23:11 ` [PATCH 3/3] SELinux: Add network port SID cache Paul Moore
2008-04-09 17:15   ` Stephen Smalley
2008-04-09 17:37     ` Paul Moore [this message]
2008-04-09 18:08       ` Stephen Smalley

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=200804091337.07861.paul.moore@hp.com \
    --to=paul.moore@hp.com \
    --cc=sds@tycho.nsa.gov \
    --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.