[apparmor] [PATCH 09/11] Disable minimization permission hashing by default
John Johansen
john.johansen at canonical.com
Tue Oct 19 01:20:41 BST 2010
Do not user permission hashing for minimization by default. While this
improves minimization performance, it can slow down total creation time and
result in larger compressed dfas.
This is because it results in the dfa not being completely minimized which
with the current O(n^2) dfa table compression algorithm can result in slower
compressed dfa generation.
---
parser/libapparmor_re/regexp.y | 3 ++-
parser/parser_main.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/parser/libapparmor_re/regexp.y b/parser/libapparmor_re/regexp.y
index 88c08bd..2438b76 100644
--- a/parser/libapparmor_re/regexp.y
+++ b/parser/libapparmor_re/regexp.y
@@ -1812,7 +1812,8 @@ void DFA::minimize(dfaflags_t flags)
/* Remap the dfa so it uses the representative states
* Use the first state of a partition as the representative state
* At this point all states with in a partion have transitions
- * to states within the same partitions
+ * to states within the same partitions, however this can slow
+ * down compressed dfa compression as there are more states,
*/
for (list <Partition *>::iterator p = partitions.begin();
p != partitions.end(); p++) {
diff --git a/parser/parser_main.c b/parser/parser_main.c
index 6b02b73..664b2d2 100644
--- a/parser/parser_main.c
+++ b/parser/parser_main.c
@@ -69,7 +69,7 @@ int binary_input = 0;
int names_only = 0;
int dump_vars = 0;
int dump_expanded_vars = 0;
-dfaflags_t dfaflags = DFA_CONTROL_TREE_NORMAL | DFA_CONTROL_TREE_SIMPLE | DFA_CONTROL_MINIMIZE | DFA_CONTROL_MINIMIZE_HASH_TRANS | DFA_CONTROL_MINIMIZE_HASH_PERMS;
+dfaflags_t dfaflags = DFA_CONTROL_TREE_NORMAL | DFA_CONTROL_TREE_SIMPLE | DFA_CONTROL_MINIMIZE | DFA_CONTROL_MINIMIZE_HASH_TRANS;
int conf_verbose = 0;
int conf_quiet = 0;
int kernel_load = 1;
--
1.7.1
More information about the AppArmor
mailing list