Upstream patch is here:
https://gitlab.com/apparmor/apparmor/merge_requests/385

** Changed in: apparmor
       Status: New => In Progress

** Changed in: apparmor (Ubuntu)
       Status: New => Triaged

** Also affects: apparmor (Ubuntu Eoan)
   Importance: Undecided
       Status: Triaged

** Also affects: apparmor (Ubuntu Disco)
   Importance: Undecided
       Status: New

** Changed in: apparmor (Ubuntu Eoan)
     Assignee: (unassigned) => Jamie Strandboge (jdstrand)

** Changed in: apparmor (Ubuntu Disco)
     Assignee: (unassigned) => Jamie Strandboge (jdstrand)

** Changed in: apparmor (Ubuntu Eoan)
       Status: Triaged => In Progress

** Changed in: apparmor (Ubuntu Disco)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apparmor in Ubuntu.
https://bugs.launchpad.net/bugs/1820068

Title:
  specifying -O no-expr-simplify results in cache miss

Status in AppArmor:
  In Progress
Status in apparmor package in Ubuntu:
  In Progress
Status in apparmor source package in Disco:
  Triaged
Status in apparmor source package in Eoan:
  In Progress

Bug description:
  With 2.13.2 and the most recent testsuite patches from the 2.13
  branch, I find that the cache works correctly when no options are
  specified. Eg

  # setup
  $ mkdir -p /tmp/aa/cache /tmp/aa/profiles
  $ cp /etc/apparmor.d/sbin.dhclient /tmp/aa/profiles/

  # no options, no cache, expect a miss and to write
  $ /sbin/apparmor_parser -k --write-cache --cache-loc=/tmp/aa/cache 
--skip-kernel-load --add -- /tmp/aa/profiles
  Cache: added primary location '/tmp/aa/cache'
  Cache miss: /tmp/aa/profiles/sbin.dhclient
  Wrote cache: /tmp/aa/cache/26b63962.0/sbin.dhclient

  # no options, cache, expect a hit
  $ /sbin/apparmor_parser -k --write-cache --cache-loc=/tmp/aa/cache 
--skip-kernel-load --add -- /tmp/aa/profiles
  Cache: added primary location '/tmp/aa/cache'
  Cache hit: /tmp/aa/cache/26b63962.0/sbin.dhclient

  # reset
  $ rm -rf /tmp/aa/cache/*

  # options, no cache, expect a miss and to write
  $ /sbin/apparmor_parser -k --write-cache --cache-loc=/tmp/aa/cache 
--skip-kernel-load -O no-expr-simplify --add -- /tmp/aa/profiles
  Cache: added primary location '/tmp/aa/cache'
  Cache miss: /tmp/aa/profiles/sbin.dhclient
  Wrote cache: /tmp/aa/cache/26b63962.0/sbin.dhclient

  # options, cache, expect a hit
  $ /sbin/apparmor_parser -k --write-cache --cache-loc=/tmp/aa/cache 
--skip-kernel-load -O no-expr-simplify --add -- /tmp/aa/profiles
  Cache: added primary location '/tmp/aa/cache'
  Cache miss: /tmp/aa/profiles/sbin.dhclient     # SHOULD BE A HIT
  Wrote cache: /tmp/aa/cache/26b63962.0/sbin.dhclient

  Same thing happens if omitting -O no-expr-simplify but add Optimize
  =no-expr-simplify to /etc/apparmor/parser.conf.

To manage notifications about this bug go to:
https://bugs.launchpad.net/apparmor/+bug/1820068/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to