1. Jun 01, 2020
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' · f1ecbf79
      Rafael J. Wysocki authored
      * pm-cpuidle:
        cpuidle: Fix three reference count leaks
        cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver
        Documentation: ABI: make current_governer_ro as a candidate for removal
        Documentation: cpuidle: update the document
        cpuidle: sysfs: Remove sysfs_switch and switch attributes
        cpuidle: Make cpuidle governor switchable to be the default behaviour
        cpuidle: sysfs: Accept governor name with 15 characters
        cpuidle: sysfs: Fix the overlap for showing available governors
        cpuidle: psci: Fixup execution order when entering a domain idle state
        cpuidle: sysfs: Minor coding style corrections
        cpuidle: sysfs: Remove the unused define_one_r(o/w) macros
      f1ecbf79
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-core' and 'pm-sleep' · be6018a4
      Rafael J. Wysocki authored
      * pm-core:
        PM: runtime: Replace pm_runtime_callbacks_present()
        PM: runtime: clk: Fix clk_pm_runtime_get() error path
        PM: runtime: Make clear what we do when conditions are wrong in rpm_suspend()
      
      * pm-sleep:
        PM: hibernate: Restrict writes to the resume device
        PM: hibernate: Split off snapshot dev option
        PM: hibernate: Incorporate concurrency handling
        PM: sleep: Helpful edits for devices.rst documentation
        Documentation: PM: sleep: Update driver flags documentation
        PM: sleep: core: Rename DPM_FLAG_LEAVE_SUSPENDED
        PM: sleep: core: Rename DPM_FLAG_NEVER_SKIP
        PM: sleep: core: Rename dev_pm_smart_suspend_and_suspended()
        PM: sleep: core: Rename dev_pm_may_skip_resume()
        PM: sleep: core: Rework the power.may_skip_resume handling
        PM: sleep: core: Do not skip callbacks in the resume phase
        PM: sleep: core: Fold functions into their callers
        PM: sleep: core: Simplify the SMART_SUSPEND flag handling
      be6018a4
  2. May 30, 2020
  3. May 27, 2020
    • Domenico Andreoli's avatar
      PM: hibernate: Restrict writes to the resume device · ad1e4f74
      Domenico Andreoli authored
      
      
      Hibernation via snapshot device requires write permission to the swap
      block device, the one that more often (but not necessarily) is used to
      store the hibernation image.
      
      With this patch, such permissions are granted iff:
      
       1) snapshot device config option is enabled
       2) swap partition is used as resume device
      
      In other circumstances the swap device is not writable from userspace.
      
      In order to achieve this, every write attempt to a swap device is
      checked against the device configured as part of the uswsusp API [0]
      using a pointer to the inode struct in memory. If the swap device being
      written was not configured for resuming, the write request is denied.
      
      NOTE: this implementation works only for swap block devices, where the
      inode configured by swapon (which sets S_SWAPFILE) is the same used
      by SNAPSHOT_SET_SWAP_AREA.
      
      In case of swap file, SNAPSHOT_SET_SWAP_AREA indeed receives the inode
      of the block device containing the filesystem where the swap file is
      located (+ offset in it) which is never passed to swapon and then has
      not set S_SWAPFILE.
      
      As result, the swap file itself (as a file) has never an option to be
      written from userspace. Instead it remains writable if accessed directly
      from the containing block device, which is always writeable from root.
      
      [0] Documentation/power/userland-swsusp.rst
      
      v2:
       - rename is_hibernate_snapshot_dev() to is_hibernate_resume_dev()
       - fix description so to correctly refer to the resume device
      
      Signed-off-by: default avatarDomenico Andreoli <domenico.andreoli@linux.com>
      Acked-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ad1e4f74
  4. May 26, 2020
  5. May 25, 2020
  6. May 24, 2020