[apparmor] [patch] Fix dfa minimization
John Johansen
john.johansen at canonical.com
Tue Dec 24 21:05:47 UTC 2013
On 12/24/2013 09:06 AM, Tyler Hicks wrote:
> This patch doesn't seem to be against trunk. It applies with fuzz and
> needs this additional change to build:
>
> diff --git a/parser/parser_common.c b/parser/parser_common.c
> index 53a3e70..8d780e0 100644
> --- a/parser/parser_common.c
> +++ b/parser/parser_common.c
> @@ -34,7 +34,7 @@ int names_only = 0;
> int current_lineno = 1;
> int option = OPTION_ADD;
>
> -dfaflags_t dfaflags = (dfaflags_t)(DFA_CONTROL_TREE_NORMAL | DFA_CONTROL_TREE_SIMPLE | DFA_CONTROL_MINIMIZE | DFA_CONTROL_MINIMIZE_HASH_TRANS);
> +dfaflags_t dfaflags = (dfaflags_t)(DFA_CONTROL_TREE_NORMAL | DFA_CONTROL_TREE_SIMPLE | DFA_CONTROL_MINIMIZE);
>
oops sorry I did it on top of the diff-encoding patch which when enabled even
makes the numbers look better
2.8 parser: 4.607s 1007267 bytes
dev head: 3.48s 1007267 bytes
min fix: 2.68s 549603 bytes
min+diff: 2.56s 349651 bytes
>> ---
>
> Acked-by: Tyler Hicks <tyhicks at canonical.com>
>
> I have to admit to not being very familiar with this area of the parser.
> The changes look sane to me, but I don't really understand everything
> that is going on.
>
right, I am going to hold off on committing this until I have a few
more tests to help verify every thing
> That said, I've tested it and I'll try to add some equality.sh tests
> today.
>
nice, thanks. I'll work on adding some more
> There's one minor spelling change that I pointed out below.
>
thanks
More information about the AppArmor
mailing list