1. 14 Mar, 2018 2 commits
    • John Johansen's avatar
      apparmor: remove POLICY_MEDIATES_SAFE · b9590ad4
      John Johansen authored
      The unpack code now makes sure every profile has a dfa so the safe
      version of POLICY_MEDIATES is no longer needed.
      Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
      b9590ad4
    • John Johansen's avatar
      apparmor: add base infastructure for socket mediation · 56974a6f
      John Johansen authored
      version 2 - Force an abi break. Network mediation will only be
                  available in v8 abi complaint policy.
      
      Provide a basic mediation of sockets. This is not a full net mediation
      but just whether a spcific family of socket can be used by an
      application, along with setting up some basic infrastructure for
      network mediation to follow.
      
      the user space rule hav the basic form of
        NETWORK RULE = [ QUALIFIERS ] 'network' [ DOMAIN ]
                       [ TYPE | PROTOCOL ]
      
        DOMAIN = ( 'inet' | 'ax25' | 'ipx' | 'appletalk' | 'netrom' |
                   'bridge' | 'atmpvc' | 'x25' | 'inet6' | 'rose' |
      	     'netbeui' | 'security' | 'key' | 'packet' | 'ash' |
      	     'econet' | 'atmsvc' | 'sna' | 'irda' | 'pppox' |
      	     'wanpipe' | 'bluetooth' | 'netlink' | 'unix' | 'rds' |
      	     'llc' | 'can' | 'tipc' | 'iucv' | 'rxrpc' | 'isdn' |
      	     'phonet' | 'ieee802154' | 'caif' | 'alg' | 'nfc' |
      	     'vsock' | 'mpls' | 'ib' | 'kcm' ) ','
      
        TYPE = ( 'stream' | 'dgram' | 'seqpacket' |  'rdm' | 'raw' |
                 'packet' )
      
        PROTOCOL = ( 'tcp' | 'udp' | 'icmp' )
      
      eg.
        network,
        network inet,
      Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
      Acked-by: default avatarSeth Arnold <seth.arnold@canonical.com>
      56974a6f
  2. 09 Feb, 2018 29 commits
  3. 28 Jan, 2018 8 commits
  4. 27 Jan, 2018 1 commit
    • Thomas Gleixner's avatar
      hrtimer: Reset hrtimer cpu base proper on CPU hotplug · d5421ea4
      Thomas Gleixner authored
      The hrtimer interrupt code contains a hang detection and mitigation
      mechanism, which prevents that a long delayed hrtimer interrupt causes a
      continous retriggering of interrupts which prevent the system from making
      progress. If a hang is detected then the timer hardware is programmed with
      a certain delay into the future and a flag is set in the hrtimer cpu base
      which prevents newly enqueued timers from reprogramming the timer hardware
      prior to the chosen delay. The subsequent hrtimer interrupt after the delay
      clears the flag and resumes normal operation.
      
      If such a hang happens in the last hrtimer interrupt before a CPU is
      unplugged then the hang_detected flag is set and stays that way when the
      CPU is plugged in again. At that point the timer hardware is not armed and
      it cannot be armed because the hang_detected flag is still active, so
      nothing clears that flag. As a consequence the CPU does not receive hrtimer
      interrupts and no timers expire on that CPU which results in RCU stalls and
      other malfunctions.
      
      Clear the flag along with some other less critical members of the hrtimer
      cpu base to ensure starting from a clean state when a CPU is plugged in.
      
      Thanks to Paul, Sebastian and Anna-Maria for their help to get down to the
      root cause of that hard to reproduce heisenbug. Once understood it's
      trivial and certainly justifies a brown paperbag.
      
      Fixes: 41d2e494 ("hrtimer: Tune hrtimer_interrupt hang logic")
      Reported-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sebastian Sewior <bigeasy@linutronix.de>
      Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801261447590.2067@nanos
      d5421ea4