apparmor/parser
John Johansen 18821b079b To reduce memory overhead of dfa creation convert to using a Node Vector
instead of a NodeSet.

We need to store sets of Nodes, to compute the dfa but the C++ set is
not the most efficient way to do this as, it has a has a lot of overhead
just to store a single pointer.

Instead we can use an array of tightly packed pointers + a some header
information.  We can do this because once the Set is finalized it will
not change, we just need to be able to reference and compare to it.

We don't use C++ Vectors as they have more overhead than a plain array
and we don't need their additional functionality.

We only replace the use of hashedNodeSets for non-accepting states as
these sets are only used in the dfa construction, and dominate the memory
usage.  The accepting states still may need to be modified during
minimization and there are only a small number of entries (20-30), so
it does not make sense to convert them.

Also introduce a NodeVec cache that serves the same purpose as the NodeSet
cache that was introduced earlier.

This is not abstracted this out as nicely as might be desired but avoiding
the use of a custom iterator and directly iterating on the Node array
allows for a small performance gain, on larger sets.

This patch reduces the amount of heap memory used by dfa creation by about
4x - overhead.  So for small dfas the savings is only 2-3x but on larger
dfas the savings become more and more pronounced.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 05:16:03 -08:00
..
libapparmor_re To reduce memory overhead of dfa creation convert to using a Node Vector 2011-12-15 05:16:03 -08:00
po Fix list email typo 2011-02-23 15:57:36 -08:00
tst It's possible that git doesn't like to create empty directories, so 2011-08-09 01:10:19 -07:00
apparmor-parser.spec.in Add an example parser.conf file 2011-10-07 14:43:54 -07:00
apparmor.d.pod apparmor.d.pod: 2011-04-01 20:35:14 +02:00
apparmor.pod as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
apparmor.vim.pod as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
apparmor_parser.pod Add the ability for the parser to have a basic conf file, that defaults 2011-08-09 06:52:43 -07:00
COPYING.GPL rpmlint complains about an outdated FSF address in parser/COPYING.GPL. 2011-11-27 13:52:06 +01:00
frob_slack_rc as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
immunix.h Update x conflict failure message 2011-02-22 03:47:03 -08:00
Makefile Author: Michael (kensington) 2011-11-10 09:36:52 -08:00
parser.conf Commit the example parser.conf file that was supposed to be part of 2011-10-09 20:15:03 -07:00
parser.h [v2: added clean-ups, backed off on some of the build silencing] 2011-05-13 02:12:49 -07:00
parser_alias.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
parser_common.c [v2: added clean-ups, backed off on some of the build silencing] 2011-05-13 02:12:49 -07:00
parser_include.c This patch adds a couple of additional lineno reporting testcases: 2010-06-25 12:43:48 -07:00
parser_include.h [v2: added clean-ups, backed off on some of the build silencing] 2011-05-13 02:12:49 -07:00
parser_interface.c From: Jeff Mahoney <jeffm@suse.com> 2011-01-14 17:44:51 -06:00
parser_lex.l Update apparmor's handling of rlimits for cpu limit and more natural units 2011-08-10 15:53:39 -07:00
parser_main.c Provide a more user friendly error message when cache is 2011-10-07 14:42:55 -07:00
parser_merge.c Fix compilation errors that slipped in. Yes, I realize this breaks the 2011-02-23 14:40:07 -08:00
parser_misc.c openSUSE patch klog-needs-CAP_SYSLOG 2011-08-18 23:54:24 +02:00
parser_policy.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
parser_regex.c [v2: added clean-ups, backed off on some of the build silencing] 2011-05-13 02:12:49 -07:00
parser_symtab.c [v2: added clean-ups, backed off on some of the build silencing] 2011-05-13 02:12:49 -07:00
parser_variable.c [v2: added clean-ups, backed off on some of the build silencing] 2011-05-13 02:12:49 -07:00
parser_yacc.y Allow passing of DEBUG from make into the compile 2011-09-01 11:57:54 -07:00
rc.aaeventd.redhat as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rc.aaeventd.suse openSUSE patch to remove the "-f" parameter from startproc in rc.aaeventd.suse / 2011-08-13 14:22:35 +02:00
rc.apparmor.debian as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rc.apparmor.functions Author: Michael (kensington) 2011-11-10 09:43:10 -08:00
rc.apparmor.redhat as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rc.apparmor.slackware as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rc.apparmor.suse It looks like rc.apparmor.functions renamed "aa_log_action_begin()" to 2011-09-15 20:20:23 +02:00
README Remove pcre and update tests where necessary 2010-07-31 16:00:52 -07:00
subdomain.conf Here's an update to rename another chunk of things that still used 2011-01-13 13:58:26 -08:00
subdomain.conf.pod as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
techdoc.tex From: Jeff Mahoney <jeffm@suse.com> 2011-02-09 14:29:05 -08:00

The apparmor_parser allows you to add, replace, and remove AppArmor
policy through the use of command line options. The default is to add.
`apparmor_parser --help` shows what the command line options are.

You can also find more information at
<http://forge.novell.com/modules/xfmod/project/?apparmor>.

Please send all complaints, bug reports, feature requests, rants about the
software, and questions to apparmor-general@forge.novell.com. Security
issues should be directed to security@suse.de or secure@novell.com,
where we will attempt to conform to the RFP vulnerability disclosure
protocol: http://www.wiretrip.net/rfp/policy.html

Thanks.

-- The AppArmor development team