1. 08 9月, 2012 1 次提交
    • M
      ima: add appraise action keywords and default rules · 07f6a794
      Mimi Zohar 提交于
      Unlike the IMA measurement policy, the appraise policy can not be dependent
      on runtime process information, such as the task uid, as the 'security.ima'
      xattr is written on file close and must be updated each time the file changes,
      regardless of the current task uid.
      
      This patch extends the policy language with 'fowner', defines an appraise
      policy, which appraises all files owned by root, and defines 'ima_appraise_tcb',
      a new boot command line option, to enable the appraise policy.
      
      Changelog v3:
      - separate the measure from the appraise rules in order to support measuring
        without appraising and appraising without measuring.
      - change appraisal default for filesystems without xattr support to fail
      - update default appraise policy for cgroups
      
      Changelog v1:
      - don't appraise RAMFS (Dmitry Kasatkin)
      - merged rest of "ima: ima_must_appraise_or_measure API change" commit
        (Dmtiry Kasatkin)
      
        ima_must_appraise_or_measure() called ima_match_policy twice, which
        searched the policy for a matching rule.  Once for a matching measurement
        rule and subsequently for an appraisal rule. Searching the policy twice
        is unnecessary overhead, which could be noticeable with a large policy.
      
        The new version of ima_must_appraise_or_measure() does everything in a
        single iteration using a new version of ima_match_policy().  It returns
        IMA_MEASURE, IMA_APPRAISE mask.
      
        With the use of action mask only one efficient matching function
        is enough.  Removed other specific versions of matching functions.
      
      Changelog:
      - change 'owner' to 'fowner' to conform to the new LSM conditions posted by
        Roberto Sassu.
      - fix calls to ima_log_string()
      Signed-off-by: NMimi Zohar <zohar@us.ibm.com>
      Signed-off-by: NDmitry Kasatkin <dmitry.kasatkin@intel.com>
      07f6a794
  2. 23 8月, 2012 1 次提交
  3. 31 7月, 2012 2 次提交
    • J
      [media] Documentation: Add newline at end-of-file to files lacking one · 79980d9c
      Jesper Juhl 提交于
      This patch simply adds a newline character at end-of-file to those
      files in Documentation/ that currently lack one.
      
      This is done for a few different reasons:
      
      A) It's rather annoying when you do "cat some_file.txt" that your
         prompt/cursor ends up at the end of the last line of output rather
         than on a new line.
      
      B) Some tools that process files line-by-line may get confused by the
         lack of a newline on the last line.
      
      C) The "\ No newline at end of file" line in diffs annoys me for some
         reason.
      
      So, let's just add the missing newline once and for all.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      79980d9c
    • A
      rbd: create pool_id device attribute · 9bb2f334
      Alex Elder 提交于
      Add an entry under /sys/bus/rbd/devices/<N>/ named "pool_id" that
      provides the id for the pool the rbd image is assocatied with.  This
      is in addition to the pool name already provided.
      
      Rename the "poolid" field in struct rbd_device  to be "pool_id".
      
      Update the documentation to reflect the addition of this new entry.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      9bb2f334
  4. 28 7月, 2012 1 次提交
    • A
      asus-wmi: enable resume on lid open · c0b91b6d
      AceLan Kao 提交于
      According to the ASUS WMI spec., to enable resume on lid open should
      use the device ID(0x00120032), but it doesn't work indeed.
      
      After discussing with ASUS' BIOS engineer, they say wake on lid open
      doesn't have a uniq device ID(0x00120032) in the BIOS. It shares the same
      device ID with deep S3(0x00120031), and the deep S3(resume on lid open)
      is disable by default.
      
      Adding this option in asus wmi sysfs
         /sys/devices/platform/<platform>/lid_resume
      so that userspace apps can enable/disable this feature by themselves.
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      c0b91b6d
  5. 21 7月, 2012 1 次提交
    • J
      Documentation: Add newline at end-of-file to files lacking one · f9028317
      Jesper Juhl 提交于
      This patch simply adds a newline character at end-of-file to those
      files in Documentation/ that currently lack one.
      
      This is done for a few different reasons:
      
      A) It's rather annoying when you do "cat some_file.txt" that your
         prompt/cursor ends up at the end of the last line of output rather
         than on a new line.
      
      B) Some tools that process files line-by-line may get confused by the
         lack of a newline on the last line.
      
      C) The "\ No newline at end of file" line in diffs annoys me for some
         reason.
      
      So, let's just add the missing newline once and for all.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f9028317
  6. 20 7月, 2012 2 次提交
  7. 17 7月, 2012 1 次提交
    • K
      kmsg - export "continuation record" flag to /dev/kmsg · d39f3d77
      Kay Sievers 提交于
      In some cases we are forced to store individual records for a continuation
      line print.
      
      Export a flag to allow the external re-construction of the line. The flag
      allows us to apply a similar logic externally which is used internally when
      the console, /proc/kmsg or the syslog() output is printed.
      
        $ cat /dev/kmsg
        4,165,0,-;Free swap  = 0kB
        4,166,0,-;Total swap = 0kB
        6,167,0,c;[
        4,168,0,+;0
        4,169,0,+;1
        4,170,0,+;2
        4,171,0,+;3
        4,172,0,+;]
        6,173,0,-;[0 1 2 3 ]
        6,174,0,-;Console: colour VGA+ 80x25
        6,175,0,-;console [tty0] enabled
      Signed-off-by: NKay Sievers <kay@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d39f3d77
  8. 11 7月, 2012 1 次提交
  9. 08 7月, 2012 1 次提交
  10. 06 7月, 2012 1 次提交
  11. 01 7月, 2012 1 次提交
  12. 28 6月, 2012 1 次提交
  13. 25 6月, 2012 1 次提交
    • A
      iommu: IOMMU Groups · d72e31c9
      Alex Williamson 提交于
      IOMMU device groups are currently a rather vague associative notion
      with assembly required by the user or user level driver provider to
      do anything useful.  This patch intends to grow the IOMMU group concept
      into something a bit more consumable.
      
      To do this, we first create an object representing the group, struct
      iommu_group.  This structure is allocated (iommu_group_alloc) and
      filled (iommu_group_add_device) by the iommu driver.  The iommu driver
      is free to add devices to the group using it's own set of policies.
      This allows inclusion of devices based on physical hardware or topology
      limitations of the platform, as well as soft requirements, such as
      multi-function trust levels or peer-to-peer protection of the
      interconnects.  Each device may only belong to a single iommu group,
      which is linked from struct device.iommu_group.  IOMMU groups are
      maintained using kobject reference counting, allowing for automatic
      removal of empty, unreferenced groups.  It is the responsibility of
      the iommu driver to remove devices from the group
      (iommu_group_remove_device).
      
      IOMMU groups also include a userspace representation in sysfs under
      /sys/kernel/iommu_groups.  When allocated, each group is given a
      dynamically assign ID (int).  The ID is managed by the core IOMMU group
      code to support multiple heterogeneous iommu drivers, which could
      potentially collide in group naming/numbering.  This also keeps group
      IDs to small, easily managed values.  A directory is created under
      /sys/kernel/iommu_groups for each group.  A further subdirectory named
      "devices" contains links to each device within the group.  The iommu_group
      file in the device's sysfs directory, which formerly contained a group
      number when read, is now a link to the iommu group.  Example:
      
      $ ls -l /sys/kernel/iommu_groups/26/devices/
      total 0
      lrwxrwxrwx. 1 root root 0 Apr 17 12:57 0000:00:1e.0 ->
      		../../../../devices/pci0000:00/0000:00:1e.0
      lrwxrwxrwx. 1 root root 0 Apr 17 12:57 0000:06:0d.0 ->
      		../../../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0
      lrwxrwxrwx. 1 root root 0 Apr 17 12:57 0000:06:0d.1 ->
      		../../../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.1
      
      $ ls -l  /sys/kernel/iommu_groups/26/devices/*/iommu_group
      [truncating perms/owner/timestamp]
      /sys/kernel/iommu_groups/26/devices/0000:00:1e.0/iommu_group ->
      					../../../kernel/iommu_groups/26
      /sys/kernel/iommu_groups/26/devices/0000:06:0d.0/iommu_group ->
      					../../../../kernel/iommu_groups/26
      /sys/kernel/iommu_groups/26/devices/0000:06:0d.1/iommu_group ->
      					../../../../kernel/iommu_groups/26
      
      Groups also include several exported functions for use by user level
      driver providers, for example VFIO.  These include:
      
      iommu_group_get(): Acquires a reference to a group from a device
      iommu_group_put(): Releases reference
      iommu_group_for_each_dev(): Iterates over group devices using callback
      iommu_group_[un]register_notifier(): Allows notification of device add
              and remove operations relevant to the group
      iommu_group_id(): Return the group number
      
      This patch also extends the IOMMU API to allow attaching groups to
      domains.  This is currently a simple wrapper for iterating through
      devices within a group, but it's expected that the IOMMU API may
      eventually make groups a more integral part of domains.
      
      Groups intentionally do not try to manage group ownership.  A user
      level driver provider must independently acquire ownership for each
      device within a group before making use of the group as a whole.
      This may change in the future if group usage becomes more pervasive
      across both DMA and IOMMU ops.
      
      Groups intentionally do not provide a mechanism for driver locking
      or otherwise manipulating driver matching/probing of devices within
      the group.  Such interfaces are generic to devices and beyond the
      scope of IOMMU groups.  If implemented, user level providers have
      ready access via iommu_group_for_each_dev and group notifiers.
      
      iommu_device_group() is removed here as it has no users.  The
      replacement is:
      
      	group = iommu_group_get(dev);
      	id = iommu_group_id(group);
      	iommu_group_put(group);
      
      AMD-Vi & Intel VT-d support re-added in following patches.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      d72e31c9
  14. 20 6月, 2012 1 次提交
  15. 16 6月, 2012 2 次提交
  16. 13 6月, 2012 1 次提交
  17. 12 6月, 2012 2 次提交
  18. 08 6月, 2012 1 次提交
  19. 05 6月, 2012 5 次提交
  20. 31 5月, 2012 1 次提交
  21. 30 5月, 2012 2 次提交
    • J
      leds: add LM3533 LED driver · 401dea7f
      Johan Hovold 提交于
      Add sub-driver for the LEDs on National Semiconductor / TI LM3533 lighting
      power chips.
      
      The chip provides 256 brightness levels, hardware accelerated blinking as
      well as ambient-light-sensor and pwm input control.
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Rob Landley <rob@landley.net>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Jonathan Cameron <jic23@cam.ac.uk>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      401dea7f
    • J
      backlight: add LM3533 backlight driver · 7f26c970
      Johan Hovold 提交于
      Add sub-driver for the backlights on National Semiconductor / TI LM3533
      lighting power chips.
      
      The chip provides 256 brightness levels and ambient-light-sensor and pwm
      input control.
      
      [akpm@linux-foundation.org: fix warning]
      [akpm@linux-foundation.org: fix the type of `mode']
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Rob Landley <rob@landley.net>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Jonathan Cameron <jic23@cam.ac.uk>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7f26c970
  22. 23 5月, 2012 1 次提交
    • R
      [SCSI] libfcoe: Add fcoe_sysfs · 9a74e884
      Robert Love 提交于
      This patch adds a 'fcoe bus' infrastructure to the kernel
      that is driven by changes to libfcoe which allow LLDs to
      present FIP (FCoE Initialization Protocol) discovered
      entities and their attributes to user space via sysfs.
      
      This patch adds the following APIs-
      
      fcoe_ctlr_device_add
      fcoe_ctlr_device_delete
      fcoe_fcf_device_add
      fcoe_fcf_device_delete
      
      They allow the LLD to expose the FCoE ENode Controller
      and any discovered FCFs (Fibre Channel Forwarders, e.g.
      FCoE switches) to the user. Each of these new devices
      has their own bus_type so that they are grouped together
      for easy lookup from a user space application. Each
      new class has an attribute_group to expose attributes
      for any created instances. The attributes are-
      
      fcoe_ctlr_device
      * fcf_dev_loss_tmo
      * lesb_link_fail
      * lesb_vlink_fail
      * lesb_miss_fka
      * lesb_symb_err
      * lesb_err_block
      * lesb_fcs_error
      
      fcoe_fcf_device
      * fabric_name
      * switch_name
      * priority
      * selected
      * fc_map
      * vfid
      * mac
      * fka_peroid
      * fabric_state
      * dev_loss_tmo
      
      A device loss infrastructre similar to the FC Transport's
      is also added by this patch. It is nice to have so that a
      link flapping adapter doesn't continually advance the count
      used to identify the discovered FCF. FCFs will exist in a
      "Disconnected" state until either the timer expires or the
      FCF is rediscovered and becomes "Connected."
      
      This patch generates a few checkpatch.pl WARNINGS that
      I'm not sure what to do about. They're macros modeled
      around the FC Transport attribute building macros, which
      have the same 'feature' where the caller can ommit a cast
      in the argument list and no cast occurs in the code. I'm
      not sure how to keep the code condensed while keeping the
      macros. Any advice would be appreciated.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      9a74e884
  23. 20 5月, 2012 1 次提交
  24. 17 5月, 2012 1 次提交
    • P
      sched: Remove stale power aware scheduling remnants and dysfunctional knobs · 8e7fbcbc
      Peter Zijlstra 提交于
      It's been broken forever (i.e. it's not scheduling in a power
      aware fashion), as reported by Suresh and others sending
      patches, and nobody cares enough to fix it properly ...
      so remove it to make space free for something better.
      
      There's various problems with the code as it stands today, first
      and foremost the user interface which is bound to topology
      levels and has multiple values per level. This results in a
      state explosion which the administrator or distro needs to
      master and almost nobody does.
      
      Furthermore large configuration state spaces aren't good, it
      means the thing doesn't just work right because it's either
      under so many impossibe to meet constraints, or even if
      there's an achievable state workloads have to be aware of
      it precisely and can never meet it for dynamic workloads.
      
      So pushing this kind of decision to user-space was a bad idea
      even with a single knob - it's exponentially worse with knobs
      on every node of the topology.
      
      There is a proposal to replace the user interface with a single
      3 state knob:
      
       sched_balance_policy := { performance, power, auto }
      
      where 'auto' would be the preferred default which looks at things
      like Battery/AC mode and possible cpufreq state or whatever the hw
      exposes to show us power use expectations - but there's been no
      progress on it in the past many months.
      
      Aside from that, the actual implementation of the various knobs
      is known to be broken. There have been sporadic attempts at
      fixing things but these always stop short of reaching a mergable
      state.
      
      Therefore this wholesale removal with the hopes of spurring
      people who care to come forward once again and work on a
      coherent replacement.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Vincent Guittot <vincent.guittot@linaro.org>
      Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/1326104915.2442.53.camel@twinsSigned-off-by: NIngo Molnar <mingo@kernel.org>
      8e7fbcbc
  25. 16 5月, 2012 1 次提交
  26. 15 5月, 2012 3 次提交
  27. 14 5月, 2012 3 次提交