[apparmor] [patch] Fix dfa minimization

Steve Beattie steve at nxnw.org
Fri Jan 10 00:34:01 UTC 2014


On Tue, Dec 24, 2013 at 01:05:47PM -0800, John Johansen wrote:
> 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

So based on the review and testing that I've done (that resulted in the
other fixes), I'm okay with this patch (with Tyler's touchups
incorporated) as well, so Acked-by: Steve Beattie <steve at nxnw.org>.

Thanks!
-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140109/abd0c7cf/attachment.pgp>


More information about the AppArmor mailing list