1. 27 Jan, 2020 6 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-devfreq' · c102671a
      Rafael J. Wysocki authored
      * pm-devfreq: (24 commits)
        PM / devfreq: Add debugfs support with devfreq_summary file
        PM / devfreq: exynos: Rename Exynos to lowercase
        PM / devfreq: imx8m-ddrc: Fix inconsistent IS_ERR and PTR_ERR
        PM / devfreq: exynos-bus: Add error log when fail to get devfreq-event
        PM / devfreq: exynos-bus: Disable devfreq-event device when fails
        PM / devfreq: rk3399_dmc: Disable devfreq-event device when fails
        PM / devfreq: imx8m-ddrc: Remove unused defines
        PM / devfreq: exynos-bus: Reduce goto statements and remove unused headers
        PM / devfreq: rk3399_dmc: Add COMPILE_TEST and HAVE_ARM_SMCCC dependency
        PM / devfreq: rockchip-dfi: Convert to devm_platform_ioremap_resource
        PM / devfreq: rk3399_dmc: Add missing of_node_put()
        PM / devfreq: rockchip-dfi: Add missing of_node_put()
        PM / devfreq: Fix multiple kernel-doc warnings
        PM / devfreq: exynos-bus: Extract exynos_bus_profile_init_passive()
        PM / devfreq: exynos-bus: Extract exynos_bus_profile_init()
        PM / devfreq: Move declaration of DEVICE_ATTR_RW(min_freq)
        PM / devfreq: Move statistics to separate struct devfreq_stats
        PM / devfreq: Add clearing transitions stats
        PM / devfreq: Change time stats to 64-bit
        PM / devfreq: Add new name attribute for sysfs
        ...
      c102671a
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-core', 'powercap', 'pm-opp', 'pm-avs' and 'pm-misc' · c95d9c14
      Rafael J. Wysocki authored
      * pm-core:
        PM-runtime: add tracepoints for usage_count changes
      
      * powercap:
        powercap/intel_rapl: add support for JasperLake
        x86/cpu: Add Jasper Lake to Intel family
        powercap/intel_rapl: add support for TigerLake Mobile
      
      * pm-opp:
        opp: Replace list_kref with a local counter
        opp: Free static OPPs on errors while adding them
      
      * pm-avs:
        power: avs: qcom-cpr: remove duplicated include from qcom-cpr.c
        power: avs: fix uninitialized error return on failed cpr_read_fuse_uV() call
        power: avs: qcom-cpr: make cpr_get_opp_hz_for_req() static
        power: avs: qcom-cpr: remove set but unused variable
        power: avs: qcom-cpr: make sure that regmap is available
        power: avs: qcom-cpr: fix unsigned expression compared with zero
        power: avs: qcom-cpr: fix invalid printk specifier in debug print
        power: avs: Add support for CPR (Core Power Reduction)
        dt-bindings: power: avs: Add support for CPR (Core Power Reduction)
      
      * pm-misc:
        mailmap: Add entry for <rjw@sisk.pl>
      c95d9c14
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq' and 'pm-sleep' · 245224d1
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: loongson2_cpufreq: adjust cpufreq uses of LOONGSON_CHIPCFG
        cpufreq: brcmstb-avs: fix imbalance of cpufreq policy refcount
        cpufreq: intel_pstate: fix spelling mistake: "Whethet" -> "Whether"
        cpufreq: s3c: fix unbalances of cpufreq policy refcount
        cpufreq: imx-cpufreq-dt: Add i.MX8MP support
        cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading
        cpufreq: tegra186: convert to devm_platform_ioremap_resource
        cpufreq: kirkwood: convert to devm_platform_ioremap_resource
        cpufreq: CPPC: put ACPI table after using it
        cpufreq : CPPC: Break out if HiSilicon CPPC workaround is matched
      
      * pm-sleep:
        PM: suspend: Add sysfs attribute to control the "sync on suspend" behavior
        PM: hibernate: fix spelling mistake "shapshot" -> "snapshot"
        PM: hibernate: Add more logging on hibernation failure
        PM: hibernate: improve arithmetic division in preallocate_highmem_fraction()
        PM: wakeup: Show statistics for deleted wakeup sources again
        PM: sleep: Switch to rtc_time64_to_tm()/rtc_tm_to_time64()
      245224d1
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' · 5b82ba70
      Rafael J. Wysocki authored
      * pm-cpuidle: (27 commits)
        intel_idle: Clean up irtl_2_usec()
        intel_idle: Move 3 functions closer to their callers
        intel_idle: Annotate initialization code and data structures
        intel_idle: Move and clean up intel_idle_cpuidle_devices_uninit()
        intel_idle: Rearrange intel_idle_cpuidle_driver_init()
        intel_idle: Clean up NULL pointer check in intel_idle_init()
        intel_idle: Fold intel_idle_probe() into intel_idle_init()
        intel_idle: Eliminate __setup_broadcast_timer()
        cpuidle: fix cpuidle_find_deepest_state() kerneldoc warnings
        cpuidle: sysfs: fix warnings when compiling with W=1
        cpuidle: coupled: fix warnings when compiling with W=1
        Documentation: admin-guide: PM: Add intel_idle document
        cpuidle: arm: Enable compile testing for some of drivers
        cpuidle: Drop unused cpuidle_driver_ref/unref() functions
        intel_idle: Use ACPI _CST on server systems
        intel_idle: Add module parameter to prevent ACPI _CST from being used
        intel_idle: Allow ACPI _CST to be used for selected known processors
        cpuidle: Allow idle states to be disabled by default
        intel_idle: Use ACPI _CST for processor models without C-state tables
        intel_idle: Refactor intel_idle_cpuidle_driver_init()
        ...
      5b82ba70
    • Rafael J. Wysocki's avatar
      Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm · c267930f
      Rafael J. Wysocki authored
      Pull operating performance points (OPP) framework updates for v5.6
      from Viresh Kumar:
      
      "This  contains a single patchset to fix reference counting of OPP
       table structures."
      
      * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
        opp: Replace list_kref with a local counter
        opp: Free static OPPs on errors while adding them
      c267930f
    • Rafael J. Wysocki's avatar
      Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm · 0a9db0a0
      Rafael J. Wysocki authored
      Pull cpufreq material for v5.6 from Viresh Kumar:
      
      "This contains:
      
      - Update to imx cpufreq driver to add support for i.MX8MP platform.
      
      - Blacklists few NVIDIA SoCs from cpufreq-dt-platdev layer.
      
      - Convertion of few platform drivers to use
        devm_platform_ioremap_resource().
      
      - Fixed refcount imbalance in few drivers."
      
      * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
        cpufreq: brcmstb-avs: fix imbalance of cpufreq policy refcount
        cpufreq: s3c: fix unbalances of cpufreq policy refcount
        cpufreq: imx-cpufreq-dt: Add i.MX8MP support
        cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading
        cpufreq: tegra186: convert to devm_platform_ioremap_resource
        cpufreq: kirkwood: convert to devm_platform_ioremap_resource
      0a9db0a0
  2. 23 Jan, 2020 5 commits
    • Linus Torvalds's avatar
      Merge tag 'pm-5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 3a83c8c8
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "Prevent the kernel from crashing during resume from hibernation if
        free pages contain leftover data from the restore kernel and
        init_on_free is set (Alexander Potapenko)"
      
      * tag 'pm-5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM: hibernate: fix crashes with init_on_free=1
      3a83c8c8
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.5-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · a572582b
      Linus Torvalds authored
      Pull PCI fix from Bjorn Helgaas:
       "Mark ATS as broken on AMD Navi14 GPU rev 0xc5 (Alex Deucher)"
      
      * tag 'pci-v5.5-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken
      a572582b
    • Linus Torvalds's avatar
      readdir: make user_access_begin() use the real access range · 3c2659bd
      Linus Torvalds authored
      In commit 9f79b78e ("Convert filldir[64]() from __put_user() to
      unsafe_put_user()") I changed filldir to not do individual __put_user()
      accesses, but instead use unsafe_put_user() surrounded by the proper
      user_access_begin/end() pair.
      
      That make them enormously faster on modern x86, where the STAC/CLAC
      games make individual user accesses fairly heavy-weight.
      
      However, the user_access_begin() range was not really the exact right
      one, since filldir() has the unfortunate problem that it needs to not
      only fill out the new directory entry, it also needs to fix up the
      previous one to contain the proper file offset.
      
      It's unfortunate, but the "d_off" field in "struct dirent" is _not_ the
      file offset of the directory entry itself - it's the offset of the next
      one.  So we end up backfilling the offset in the previous entry as we
      walk along.
      
      But since x86 didn't really care about the exact range, and used to be
      the only architecture that did anything fancy in user_access_begin() to
      begin with, the filldir[64]() changes did something lazy, and even
      commented on it:
      
      	/*
      	 * Note! This range-checks 'previous' (which may be NULL).
      	 * The real range was checked in getdents
      	 */
      	if (!user_access_begin(dirent, sizeof(*dirent)))
      		goto efault;
      
      and it all worked fine.
      
      But now 32-bit ppc is starting to also implement user_access_begin(),
      and the fact that we faked the range to only be the (possibly not even
      valid) previous directory entry becomes a problem, because ppc32 will
      actually be using the range that is passed in for more than just "check
      that it's user space".
      
      This is a complete rewrite of Christophe's original patch.
      
      By saving off the record length of the previous entry instead of a
      pointer to it in the filldir data structures, we can simplify the range
      check and the writing of the previous entry d_off field.  No need for
      any conditionals in the user accesses themselves, although we retain the
      conditional EINTR checking for the "was this the first directory entry"
      signal handling latency logic.
      
      Fixes: 9f79b78e ("Convert filldir[64]() from __put_user() to unsafe_put_user()")
      Link: https://lore.kernel.org/lkml/a02d3426f93f7eb04960a4d9140902d278cab0bb.1579697910.git.christophe.leroy@c-s.fr/
      Link: https://lore.kernel.org/lkml/408c90c4068b00ea8f1c41cca45b84ec23d4946b.1579783936.git.christophe.leroy@c-s.fr/Reported-and-tested-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3c2659bd
    • Linus Torvalds's avatar
      readdir: be more conservative with directory entry names · 2c6b7bcd
      Linus Torvalds authored
      Commit 8a23eb80 ("Make filldir[64]() verify the directory entry
      filename is valid") added some minimal validity checks on the directory
      entries passed to filldir[64]().  But they really were pretty minimal.
      
      This fleshes out at least the name length check: we used to disallow
      zero-length names, but really, negative lengths or oevr-long names
      aren't ok either.  Both could happen if there is some filesystem
      corruption going on.
      
      Now, most filesystems tend to use just an "unsigned char" or similar for
      the length of a directory entry name, so even with a corrupt filesystem
      you should never see anything odd like that.  But since we then use the
      name length to create the directory entry record length, let's make sure
      it actually is half-way sensible.
      
      Note how POSIX states that the size of a path component is limited by
      NAME_MAX, but we actually use PATH_MAX for the check here.  That's
      because while NAME_MAX is generally the correct maximum name length
      (it's 255, for the same old "name length is usually just a byte on
      disk"), there's nothing in the VFS layer that really cares.
      
      So the real limitation at a VFS layer is the total pathname length you
      can pass as a filename: PATH_MAX.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2c6b7bcd
    • Rafael J. Wysocki's avatar
  3. 22 Jan, 2020 22 commits
  4. 21 Jan, 2020 1 commit
  5. 20 Jan, 2020 3 commits
  6. 19 Jan, 2020 3 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv/for-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 7008ee12
      Linus Torvalds authored
      Pull RISC-V fixes from Paul Walmsley:
       "Three fixes for RISC-V:
      
         - Don't free and reuse memory containing the code that CPUs parked at
           boot reside in.
      
         - Fix rv64 build problems for ubsan and some modules by adding
           logical and arithmetic shift helpers for 128-bit values. These are
           from libgcc and are similar to what's present for ARM64.
      
         - Fix vDSO builds to clean up their own temporary files"
      
      * tag 'riscv/for-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Less inefficient gcc tishift helpers (and export their symbols)
        riscv: delete temporary files
        riscv: make sure the cores stay looping in .Lsecondary_park
      7008ee12
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 11a82729
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix non-blocking connect() in x25, from Martin Schiller.
      
       2) Fix spurious decryption errors in kTLS, from Jakub Kicinski.
      
       3) Netfilter use-after-free in mtype_destroy(), from Cong Wang.
      
       4) Limit size of TSO packets properly in lan78xx driver, from Eric
          Dumazet.
      
       5) r8152 probe needs an endpoint sanity check, from Johan Hovold.
      
       6) Prevent looping in tcp_bpf_unhash() during sockmap/tls free, from
          John Fastabend.
      
       7) hns3 needs short frames padded on transmit, from Yunsheng Lin.
      
       8) Fix netfilter ICMP header corruption, from Eyal Birger.
      
       9) Fix soft lockup when low on memory in hns3, from Yonglong Liu.
      
      10) Fix NTUPLE firmware command failures in bnxt_en, from Michael Chan.
      
      11) Fix memory leak in act_ctinfo, from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (91 commits)
        cxgb4: reject overlapped queues in TC-MQPRIO offload
        cxgb4: fix Tx multi channel port rate limit
        net: sched: act_ctinfo: fix memory leak
        bnxt_en: Do not treat DSN (Digital Serial Number) read failure as fatal.
        bnxt_en: Fix ipv6 RFS filter matching logic.
        bnxt_en: Fix NTUPLE firmware command failures.
        net: systemport: Fixed queue mapping in internal ring map
        net: dsa: bcm_sf2: Configure IMP port for 2Gb/sec
        net: dsa: sja1105: Don't error out on disabled ports with no phy-mode
        net: phy: dp83867: Set FORCE_LINK_GOOD to default after reset
        net: hns: fix soft lockup when there is not enough memory
        net: avoid updating qdisc_xmit_lock_key in netdev_update_lockdep_key()
        net/sched: act_ife: initalize ife->metalist earlier
        netfilter: nat: fix ICMP header corruption on ICMP errors
        net: wan: lapbether.c: Use built-in RCU list checking
        netfilter: nf_tables: fix flowtable list del corruption
        netfilter: nf_tables: fix memory leak in nf_tables_parse_netdev_hooks()
        netfilter: nf_tables: remove WARN and add NLA_STRING upper limits
        netfilter: nft_tunnel: ERSPAN_VERSION must not be null
        netfilter: nft_tunnel: fix null-attribute check
        ...
      11a82729
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 5f436443
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Two runtime PM fixes and one leak fix"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: iop3xx: Fix memory leak in probe error path
        i2c: tegra: Properly disable runtime PM on driver's probe error
        i2c: tegra: Fix suspending in active runtime PM state
      5f436443