All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Gyurdiev <ivg2@cornell.edu>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov, Karl MacMillan <kmacmillan@tresys.com>
Subject: Synchronization/Caching
Date: Tue, 04 Oct 2005 11:52:23 -0400	[thread overview]
Message-ID: <4342A537.7030300@cornell.edu> (raw)
In-Reply-To: <1128437587.26285.397.camel@moss-spartans.epoch.ncsc.mil>


>> The other problem is the connection object - module_conn_t. I put that 
>> in modules.h, because it said "module", but it doesn't look like it 
>> belongs there. Karl, where should I move this? Should it go into 
>> direct_api.h ? I see the semanage_store makes use of that... is the 
>> semanage_store specific to the direct API?
>>
>> On a related note, where can I put policydb pointers - I need two of 
>> them for starters - ACTIVE, and LOCAL_MOD... the actual policydb objects 
>> will be created on demand (say when the user decides to query 
>> something), or when commit decides to re-create the active policy from 
>> scratch, but I need the pointers to them in a data structure linked into 
>> the handle (that's specific to direct api?) Should this go into 
>> conn.module (renaming that to conn.direct ?)
>>     
>
> Merged.  Karl, did you have any opinions on the above questions?
>   
I am still interested in the answer to the first question (where should 
conn be placed?).

The second question.... is a bit more complicated than I originally 
thought, because having a policydb in memory (or a linked list in memory 
for the contents of a file) is kind of a problem - it requires 
synchronization. It brings up the issue of whether queries will be done 
outside of transaction, on the active sandbox (and if so, what kind of 
cache procedures will be implemented (none - drop the cache on function 
exit?)), or inside of transaction, on the tmp sandbox, with the 
transaction lock held. Also, I'm not sure when and where the read lock 
is to be used.

Also, I don't particularly like the way the current direct_databse takes 
a pointer to a policydb elsewhere - that's kind of a hack, that's 
intended to get multiple dbase views to share the same in-memory 
policydb object, but I doubt it's going to work, so I think I'll get rid 
of it for now, and figure out how to implement this properly - will we 
even have a persistent cache of policy/files across functions outside of 
transaction mode?


--
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:[~2005-10-04 15:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-30 20:30 [10 / 9] [ SEMANAGE ] FIx placement of function table Ivan Gyurdiev
2005-09-30 20:28 ` Stephen Smalley
2005-09-30 20:56   ` Ivan Gyurdiev
2005-10-01  0:19     ` [ SEMANAGE ] [ SEPOL ] Backend iterate function Ivan Gyurdiev
2005-10-01  1:49       ` [ SEMANAGE ] Break up interfaces.h, implement parsing helpers Ivan Gyurdiev
2005-10-04 14:54         ` Stephen Smalley
2005-10-04 14:53       ` [ SEMANAGE ] [ SEPOL ] Backend iterate function Stephen Smalley
2005-10-03 13:47   ` [10 / 9] [ SEMANAGE ] FIx placement of function table Karl MacMillan
2005-10-04 14:53 ` Stephen Smalley
2005-10-04 15:52   ` Ivan Gyurdiev [this message]

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=4342A537.7030300@cornell.edu \
    --to=ivg2@cornell.edu \
    --cc=kmacmillan@tresys.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.