From: Ivan Gyurdiev <ivg2@cornell.edu>
To: selinux@tycho.nsa.gov
Cc: dwalsh@redhat.com
Subject: Re: [ 7/9 ] [ SEMANAGE ] Backend separation (Init 3)
Date: Fri, 30 Sep 2005 09:45:59 -0400 [thread overview]
Message-ID: <433D4197.3010100@cornell.edu> (raw)
In-Reply-To: <433CAD8A.8040004@cornell.edu>
I think this patch is definitely on the right track to separating the
cached dbase/list from its backend. Also, remember that I initially
wanted to iterate the flat file per function call. I later decided this
was a bad idea, after talking to Karl, but pointed out that in some
cases we don't want to load the whole database in memory, because it
might be too large.
One such case are rules. In particular, rule tables are compressed
within the policydb (via pointers to strings that are shared), and you
can't really implement a list() function based on records and keep that
compression at the same time - it's an internal policy detail and those
records are specifically designed _not_ to expose those - each record
should be standalone from the policy/other records.
In the general case, what we really want is... an iterate() function in
the backend. This addresses the concern of loading a large database in
memory by pushing the work to the backend. We still need the iterate()
function on the list in memory, because that's faster. However, we
should add the ability to mark a dbase "noncachable", and then look at
that in dbase_* functions, and if it says noncachable, we should not
attempt to construct a memory cache of the database, but instead should
use the backend iterate() function. Of course, if what you're really
doing is calling the list() function (as opposed to
query/count/exists/iterate/*), this won't gain you anything, but
really, for rules, who wants to look at the entire ruleset of a zillion
rules? What we probably want is a method to loop over them, and apply
programmatic changes or analyze them. I can add noncachable support on
certain functions one by one - no need to cover all of them now.. no
need to implement this on the FILE case either, which is what I was
doing initially...
I think this is one of my planned architecture changes before I try to
implement operations on a rule record.
--
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.
next prev parent reply other threads:[~2005-09-30 13:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-30 2:49 [ 1/9 ] [ SEPOL ] Eliminate struct pointer typedefs Ivan Gyurdiev
2005-09-30 2:52 ` [ 2/9 ] [ SEMANAGE ] Restore sepol compatibility Ivan Gyurdiev
2005-09-30 2:55 ` [ 3/9 ] [ SEMANAGE ] Rename files Ivan Gyurdiev
2005-09-30 3:02 ` [ 4/9 ] [ SEMANAGE ] Database initialization Stage 1 Ivan Gyurdiev
2005-09-30 18:42 ` Ivan Gyurdiev
2005-09-30 3:04 ` [ 5/9 ] [ SEMANAGE ] Change database to singly-linked list Ivan Gyurdiev
2005-09-30 3:07 ` [ 6/9 ] [ SEMANAGE ] Database Initialization Stage 2 Ivan Gyurdiev
2005-09-30 3:14 ` [ 7/9 ] [ SEMANAGE ] Backend separation (Init 3) Ivan Gyurdiev
2005-09-30 13:45 ` Ivan Gyurdiev [this message]
2005-09-30 3:16 ` [ 8/9 ] [ SEMANAGE ] Eliminate struct pointer typedefs Ivan Gyurdiev
2005-09-30 3:26 ` [ 9/9 ] [ SEPOL ] User list function, Bugfixes Ivan Gyurdiev
2005-09-30 3:29 ` Memory leaks Ivan Gyurdiev
2005-09-30 6:01 ` Ivan Gyurdiev
2005-09-30 3:34 ` Linking to semanage Ivan Gyurdiev
2005-09-30 5:56 ` Ivan Gyurdiev
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=433D4197.3010100@cornell.edu \
--to=ivg2@cornell.edu \
--cc=dwalsh@redhat.com \
--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.