From: Stephen Smalley <sds@tycho.nsa.gov>
To: HarryCiao <harrytaurus2002@hotmail.com>
Cc: method@manicmethod.com, selinux-mailing-list <selinux@tycho.nsa.gov>
Subject: RE: A few questions about module compile/link source code
Date: Mon, 23 May 2011 09:46:32 -0400 [thread overview]
Message-ID: <1306158392.2262.11.camel@moss-pluto> (raw)
In-Reply-To: <SNT139-w89229AB55B95D9E7630B7AB720@phx.gbl>
On Mon, 2011-05-23 at 13:15 +0000, HarryCiao wrote:
> Hi Joshua,
>
> Many thanks for your response! Hope you had an enjoyable vacation :-)
>
> Well, for the init_parser() problem, so far I am new to lex & yacc, I
> am most puzzled that some rules are handled when pass == 1 and the id
> queue is purged when pass == 2, whereas some other rules are
> handled when pass == 2 and the id queue got cleaned up when pass == 1.
>
> Who decides when a particular rule should be processed and when the id
> queue should be cleaned ? and does it and how does it relate with the
> syntax of a certain rule ?
Hi Harry,
The 2nd pass in checkpolicy was introduced long ago (the original CVS
tree shows it as happening 2000.09.19) in order to relax some of the
ordering requirements in the policy configuration. It allows
checkpolicy to collect up some definitions in the first pass before it
performs any rule expansion, e.g. so that all type attributes are known
before any allow rules are expanded. More traditionally this would be
done by generating an AST and then just walking the AST for subsequent
passes rather than re-parsing the original source on each pass.
--
Stephen Smalley
National Security Agency
--
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.
prev parent reply other threads:[~2011-05-23 13:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-12 9:58 A few questions about module compile/link source code HarryCiao
2011-05-20 1:13 ` Joshua Brindle
2011-05-23 13:15 ` HarryCiao
2011-05-23 13:46 ` Stephen Smalley [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=1306158392.2262.11.camel@moss-pluto \
--to=sds@tycho.nsa.gov \
--cc=harrytaurus2002@hotmail.com \
--cc=method@manicmethod.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.