mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
This is patch tries to reduce the number of dynamic_cast<>s needed during normalization by pushing the operations of normalize_tree() into the expr-tree classes themselves rather than perform it as an external function. This eliminates the need for dynamic_cast<> checks on the current object under inspection and reduces the number of checks needing to be performed on child Nodes as well. In non-strict benchmarking, doing the dynamic_cast<> reduction for just the tree normalization operation resulted in a ~10-15% improvement in overall time on a couple of different hosts (amd64, armel), as measured against apparmor_parser -Q. Valgrind's callgrind tool indicated a reduction in the number of calls to dynamic_cast<> on the tst/simple_tests/vars/dbus_vars_9.sd test profile from ~19 million calls to ~12 million. In comparisons with dumped expr trees over both the entire tst/simple_tests/ tree and from 1000 randomly generated profiles via stress.rb, the generated trees were identical. Patch history: v1: initial version of patch v2: update patch to take into account the infinite loop fix in trunk rev 1975 and refresh against current code. v3: no change Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Seth Arnold <seth.arnold@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com>
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://wiki.apparmor.net Please send all complaints, feature requests, rants about the software, and questions to the apparmor@lists.ubuntu.com mailing list. Bug reports can be filed against the AppArmor project on launchpad.net at https://launchpad.net/apparmor or reported to the mailing list directly for those who wish not to register for an account on launchpad. Security issues can be filed as security bugs on launchpad or directed to security@ubuntu.com. We will attempt to conform to the RFP vulnerability disclosure protocol: http://www.wiretrip.net/rfp/policy.html Thanks. -- The AppArmor development team