Re: [PATCH 3/3] SELinux: Add network port SID cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux