1. 01 Aug, 2020 3 commits
  2. 29 Jul, 2020 4 commits
    • Valentin Schneider's avatar
      arm, arm64: Fix selection of CONFIG_SCHED_THERMAL_PRESSURE · fcd7c9c3
      Valentin Schneider authored
      Qian reported that the current setup forgoes the Kconfig dependencies and
      results in warnings such as:
      
        WARNING: unmet direct dependencies detected for SCHED_THERMAL_PRESSURE
          Depends on [n]: SMP [=y] && CPU_FREQ_THERMAL [=n]
          Selected by [y]:
          - ARM64 [=y]
      
      Revert commit
      
        e17ae7fe ("arm, arm64: Select CONFIG_SCHED_THERMAL_PRESSURE")
      
      and re-implement it by making the option default to 'y' for arm64 and arm,
      which respects Kconfig dependencies (i.e. will remain 'n' if
      CPU_FREQ_THERMAL=n).
      
      Fixes: e17ae7fe ("arm, arm64: Select CONFIG_SCHED_THERMAL_PRESSURE")
      Reported-by: default avatarQian Cai <cai@lca.pw>
      Signed-off-by: default avatarValentin Schneider <valentin.schneider@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: https://lkml.kernel.org/r/20200729135718.1871-1-valentin.schneider@arm.com
      fcd7c9c3
    • Qais Yousef's avatar
      Documentation/sysctl: Document uclamp sysctl knobs · 1f73d1ab
      Qais Yousef authored
      Uclamp exposes 3 sysctl knobs:
      
      	* sched_util_clamp_min
      	* sched_util_clamp_max
      	* sched_util_clamp_min_rt_default
      
      Document them in sysctl/kernel.rst.
      Signed-off-by: default avatarQais Yousef <qais.yousef@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: https://lkml.kernel.org/r/20200716110347.19553-3-qais.yousef@arm.com
      1f73d1ab
    • Qais Yousef's avatar
      sched/uclamp: Add a new sysctl to control RT default boost value · 13685c4a
      Qais Yousef authored
      RT tasks by default run at the highest capacity/performance level. When
      uclamp is selected this default behavior is retained by enforcing the
      requested uclamp.min (p->uclamp_req[UCLAMP_MIN]) of the RT tasks to be
      uclamp_none(UCLAMP_MAX), which is SCHED_CAPACITY_SCALE; the maximum
      value.
      
      This is also referred to as 'the default boost value of RT tasks'.
      
      See commit 1a00d999 ("sched/uclamp: Set default clamps for RT tasks").
      
      On battery powered devices, it is desired to control this default
      (currently hardcoded) behavior at runtime to reduce energy consumed by
      RT tasks.
      
      For example, a mobile device manufacturer where big.LITTLE architecture
      is dominant, the performance of the little cores varies across SoCs, and
      on high end ones the big cores could be too power hungry.
      
      Given the diversity of SoCs, the new knob allows manufactures to tune
      the best performance/power for RT tasks for the particular hardware they
      run on.
      
      They could opt to further tune the value when the user selects
      a different power saving mode or when the device is actively charging.
      
      The runtime aspect of it further helps in creating a single kernel image
      that can be run on multiple devices that require different tuning.
      
      Keep in mind that a lot of RT tasks in the system are created by the
      kernel. On Android for instance I can see over 50 RT tasks, only
      a handful of which created by the Android framework.
      
      To control the default behavior globally by system admins and device
      integrator, introduce the new sysctl_sched_uclamp_util_min_rt_default
      to change the default boost value of the RT tasks.
      
      I anticipate this to be mostly in the form of modifying the init script
      of a particular device.
      
      To avoid polluting the fast path with unnecessary code, the approach
      taken is to synchronously do the update by traversing all the existing
      tasks in the system. This could race with a concurrent fork(), which is
      dealt with by introducing sched_post_fork() function which will ensure
      the racy fork will get the right update applied.
      
      Tested on Juno-r2 in combination with the RT capacity awareness [1].
      By default an RT task will go to the highest capacity CPU and run at the
      maximum frequency, which is particularly energy inefficient on high end
      mobile devices because the biggest core[s] are 'huge' and power hungry.
      
      With this patch the RT task can be controlled to run anywhere by
      default, and doesn't cause the frequency to be maximum all the time.
      Yet any task that really needs to be boosted can easily escape this
      default behavior by modifying its requested uclamp.min value
      (p->uclamp_req[UCLAMP_MIN]) via sched_setattr() syscall.
      
      [1] 804d402f: ("sched/rt: Make RT capacity-aware")
      Signed-off-by: default avatarQais Yousef <qais.yousef@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: https://lkml.kernel.org/r/20200716110347.19553-2-qais.yousef@arm.com
      13685c4a
    • Qais Yousef's avatar
      sched/uclamp: Fix a deadlock when enabling uclamp static key · e65855a5
      Qais Yousef authored
      The following splat was caught when setting uclamp value of a task:
      
        BUG: sleeping function called from invalid context at ./include/linux/percpu-rwsem.h:49
      
         cpus_read_lock+0x68/0x130
         static_key_enable+0x1c/0x38
         __sched_setscheduler+0x900/0xad8
      
      Fix by ensuring we enable the key outside of the critical section in
      __sched_setscheduler()
      
      Fixes: 46609ce2 ("sched/uclamp: Protect uclamp fast path code with static key")
      Signed-off-by: default avatarQais Yousef <qais.yousef@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: https://lkml.kernel.org/r/20200716110347.19553-4-qais.yousef@arm.com
      e65855a5
  3. 28 Jul, 2020 1 commit
  4. 27 Jul, 2020 1 commit
  5. 25 Jul, 2020 1 commit
  6. 22 Jul, 2020 11 commits
  7. 19 Jul, 2020 10 commits
    • Linus Torvalds's avatar
      Linux 5.8-rc6 · ba47d845
      Linus Torvalds authored
      ba47d845
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-2020-07-19' of... · 92188b41
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into master
      
      Pull perf tooling fixes from Arnaldo Carvalho de Melo:
      
       - Update hashmap.h from libbpf and kvm.h from x86's kernel UAPI.
      
       - Set opt->set in libsubcmd's OPT_CALLBACK_SET(). This fixes
         'perf record --switch-output-event event-name' usage"
      
      * tag 'perf-tools-fixes-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        tools arch kvm: Sync kvm headers with the kernel sources
        perf tools: Sync hashmap.h with libbpf's
        libsubcmd: Fix OPT_CALLBACK_SET()
      92188b41
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-07-19' of... · efb9666e
      Linus Torvalds authored
      Merge tag 'x86-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into master
      
      Pull x86 fixes from Thomas Gleixner:
       "A pile of fixes for x86:
      
         - Fix the I/O bitmap invalidation on XEN PV, which was overlooked in
           the recent ioperm/iopl rework. This caused the TSS and XEN's I/O
           bitmap to get out of sync.
      
         - Use the proper vectors for HYPERV.
      
         - Make disabling of stack protector for the entry code work with GCC
           builds which enable stack protector by default. Removing the option
           is not sufficient, it needs an explicit -fno-stack-protector to
           shut it off.
      
         - Mark check_user_regs() noinstr as it is called from noinstr code.
           The missing annotation causes it to be placed in the text section
           which makes it instrumentable.
      
         - Add the missing interrupt disable in exc_alignment_check()
      
         - Fixup a XEN_PV build dependency in the 32bit entry code
      
         - A few fixes to make the Clang integrated assembler happy
      
         - Move EFI stub build to the right place for out of tree builds
      
         - Make prepare_exit_to_usermode() static. It's not longer called from
           ASM code"
      
      * tag 'x86-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Don't add the EFI stub to targets
        x86/entry: Actually disable stack protector
        x86/ioperm: Fix io bitmap invalidation on Xen PV
        x86: math-emu: Fix up 'cmp' insn for clang ias
        x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV
        x86/entry: Add compatibility with IAS
        x86/entry/common: Make prepare_exit_to_usermode() static
        x86/entry: Mark check_user_regs() noinstr
        x86/traps: Disable interrupts in exc_aligment_check()
        x86/entry/32: Fix XEN_PV build dependency
      efb9666e
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2020-07-19' of... · 66e4b636
      Linus Torvalds authored
      Merge tag 'timers-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into master
      
      Pull timer fixes from Thomas Gleixner:
       "Two fixes for the timer wheel:
      
         - A timer which is already expired at enqueue time can set the
           base->next_expiry value backwards. As a consequence base->clk can
           be set back as well. This can lead to timers expiring early. Add a
           sanity check to prevent this.
      
         - When a timer is queued with an expiry time beyond the wheel
           capacity then it should be queued in the bucket of the last wheel
           level which is expiring last.
      
           The code adjusted the expiry time to the maximum wheel capacity,
           which is only correct when the wheel clock is 0. Aside of that the
           check whether the delta is larger than wheel capacity does not
           check the delta, it checks the expiry value itself. As a result
           timers can expire at random.
      
           Fix this by checking the right variable and adjust expiry time so
           it becomes base->clock plus capacity which places it into the
           outmost bucket in the last wheel level"
      
      * tag 'timers-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        timer: Fix wheel index calculation on last level
        timer: Prevent base->clk from moving backward
      66e4b636
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2020-07-19' of... · 43768f7c
      Linus Torvalds authored
      Merge tag 'sched-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into master
      
      Pull scheduler fixes from Thomas Gleixner:
       "A set of scheduler fixes:
      
         - Plug a load average accounting race which was introduced with a
           recent optimization casing load average to show bogus numbers.
      
         - Fix the rseq CPU id initialization for new tasks. sched_fork() does
           not update the rseq CPU id so the id is the stale id of the parent
           task, which can cause user space data corruption.
      
         - Handle a 0 return value of task_h_load() correctly in the load
           balancer, which does not decrease imbalance and therefore pulls
           until the maximum number of loops is reached, which might be all
           tasks just created by a fork bomb"
      
      * tag 'sched-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: handle case of task_h_load() returning 0
        sched: Fix unreliable rseq cpu_id for new tasks
        sched: Fix loadavg accounting race
      43768f7c
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2020-07-19' of... · 9413cd77
      Linus Torvalds authored
      Merge tag 'irq-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into master
      
      Pull irq fixes from Thomas Gleixner:
       "Two fixes for the interrupt subsystem:
      
         - Make the handling of the firmware node consistent and do not free
           the node after the domain has been created successfully. The core
           code stores a pointer to it which can lead to a use after free or
           double free.
      
           This used to "work" because the pointer was not stored when the
           initial code was written, but at some point later it was required
           to store it. Of course nobody noticed that the existing users break
           that way.
      
         - Handle affinity setting on inactive interrupts correctly when
           hierarchical irq domains are enabled.
      
           When interrupts are inactive with the modern hierarchical irqdomain
           design, the interrupt chips are not necessarily in a state where
           affinity changes can be handled. The legacy irq chip design allowed
           this because interrupts are immediately fully initialized at
           allocation time. X86 has a hacky workaround for this, but other
           implementations do not.
      
           This cased malfunction on GIC-V3. Instead of playing whack a mole
           to find all affected drivers, change the core code to store the
           requested affinity setting and then establish it when the interrupt
           is allocated, which makes the X86 hack go away"
      
      * tag 'irq-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/affinity: Handle affinity setting on inactive interrupts correctly
        irqdomain/treewide: Keep firmware node unconditionally allocated
      9413cd77
    • Linus Torvalds's avatar
      Merge tag 'usb-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb into master · ce20d7bf
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a few small USB fixes, and one thunderbolt fix, for 5.8-rc6.
      
        Nothing huge in here, just the normal collection of gadget, dwc2/3,
        serial, and other minor USB driver fixes and id additions. Full
        details are in the shortlog.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: serial: iuu_phoenix: fix memory corruption
        USB: c67x00: fix use after free in c67x00_giveback_urb
        usb: gadget: function: fix missing spinlock in f_uac1_legacy
        usb: gadget: udc: atmel: fix uninitialized read in debug printk
        usb: gadget: udc: atmel: remove outdated comment in usba_ep_disable()
        usb: dwc2: Fix shutdown callback in platform
        usb: cdns3: trace: fix some endian issues
        usb: cdns3: ep0: fix some endian issues
        usb: gadget: udc: gr_udc: fix memleak on error handling path in gr_ep_init()
        usb: gadget: fix langid kernel-doc warning in usbstring.c
        usb: dwc3: pci: add support for the Intel Jasper Lake
        usb: dwc3: pci: add support for the Intel Tiger Lake PCH -H variant
        usb: chipidea: core: add wakeup support for extcon
        USB: serial: option: add Quectel EG95 LTE modem
        thunderbolt: Fix path indices used in USB3 tunnel discovery
        USB: serial: ch341: add new Product ID for CH340
        USB: serial: option: add GosunCn GM500 series
        USB: serial: cypress_m8: enable Simply Automated UPB PIM
      ce20d7bf
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-5.8-6' of git://git.infradead.org/users/hch/dma-mapping into master · 8c18fc63
      Linus Torvalds authored
      Pull dma-mapping fixes from Christoph Hellwig:
       "Ensure we always have fully addressable memory in the dma coherent
        pool (Nicolas Saenz Julienne)"
      
      * tag 'dma-mapping-5.8-6' of git://git.infradead.org/users/hch/dma-mapping:
        dma-pool: do not allocate pool memory from CMA
        dma-pool: make sure atomic pool suits device
        dma-pool: introduce dma_guess_pool()
        dma-pool: get rid of dma_in_atomic_pool()
        dma-direct: provide function to check physical memory area validity
      8c18fc63
    • Arvind Sankar's avatar
      x86/boot: Don't add the EFI stub to targets · da05b143
      Arvind Sankar authored
      vmlinux-objs-y is added to targets, which currently means that the EFI
      stub gets added to the targets as well. It shouldn't be added since it
      is built elsewhere.
      
      This confuses Makefile.build which interprets the EFI stub as a target
      	$(obj)/$(objtree)/drivers/firmware/efi/libstub/lib.a
      and will create drivers/firmware/efi/libstub/ underneath
      arch/x86/boot/compressed, to hold this supposed target, if building
      out-of-tree. [0]
      
      Fix this by pulling the stub out of vmlinux-objs-y into efi-obj-y.
      
      [0] See scripts/Makefile.build near the end:
          # Create directories for object files if they do not exist
      Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
      Link: https://lkml.kernel.org/r/20200715032631.1562882-1-nivedita@alum.mit.edu
      da05b143
    • Kees Cook's avatar
      x86/entry: Actually disable stack protector · 58ac3154
      Kees Cook authored
      Some builds of GCC enable stack protector by default. Simply removing
      the arguments is not sufficient to disable stack protector, as the stack
      protector for those GCC builds must be explicitly disabled. Remove the
      argument removals and add -fno-stack-protector. Additionally include
      missed x32 argument updates, and adjust whitespace for readability.
      
      Fixes: 20355e5f ("x86/entry: Exclude low level entry code from sanitizing")
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/202006261333.585319CA6B@keescook
      58ac3154
  8. 18 Jul, 2020 6 commits
  9. 17 Jul, 2020 3 commits
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.8-3' of git://git.linux-nfs.org/projects/anna/linux-nfs into master · 6a70f89c
      Linus Torvalds authored
      Pull NFS client fixes from Anna Schumaker:
       "A few more NFS client bugfixes for Linux 5.8:
      
        NFS:
         - Fix interrupted slots by using the SEQUENCE operation
      
        SUNRPC:
         - revert d03727b2 to fix unkillable IOs
      
        xprtrdma:
         - Fix double-free in rpcrdma_ep_create()
         - Fix recursion into rpcrdma_xprt_disconnect()
         - Fix return code from rpcrdma_xprt_connect()
         - Fix handling of connect errors
         - Fix incorrect header size calculations"
      
      * tag 'nfs-for-5.8-3' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        SUNRPC reverting d03727b2 ("NFSv4 fix CLOSE not waiting for direct IO compeletion")
        xprtrdma: fix incorrect header size calculations
        NFS: Fix interrupted slots by sending a solo SEQUENCE operation
        xprtrdma: Fix handling of connect errors
        xprtrdma: Fix return code from rpcrdma_xprt_connect()
        xprtrdma: Fix recursion into rpcrdma_xprt_disconnect()
        xprtrdma: Fix double-free in rpcrdma_ep_create()
      6a70f89c
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc into master · 630c183b
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "This time there are a number of actual code fixes, plus a small set of
        device tree issues getting addressed:
      
        Renesas:
      
          - one defconfig cleanup to allow a later Kconfig change
      
        Intel socfpga:
      
          - enable QSPI devices on some machines
      
          - fix DTC validation warnings
      
        TI OMAP:
      
          - Two DEBUG_ATOMIC_SLEEP fixes for ti-sysc interconnect target
            module driver
      
          - A regression fix for ti-sysc no-idle handling that caused issues
            compared to earlier platform data based booting
      
          - A fix for memory leak for omap_hwmod_allocate_module
      
          - Fix d_can driver probe for am437x
      
        NXP i.MX:
      
          - A couple of fixes on i.MX platform device registration code to
            stop the use of invalid IRQ 0.
      
          - Fix a regression seen on ls1021a platform, caused by commit
            52102a3b ("soc: imx: move cpu code to drivers/soc/imx").
      
          - Fix a misconfiguration of audio SSI on imx6qdl-gw551x board.
      
        Amlogic Meson:
      
          - misc DT fixes
      
          - SoC ID fixes to detect all chips correctly"
      
      * tag 'arm-fixes-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: dts: spcfpga: Align GIC, NAND and UART nodenames with dtschema
        ARM: dts: socfpga: Align L2 cache-controller nodename with dtschema
        arm64: dts: stratix10: increase QSPI reg address in nand dts file
        arm64: dts: stratix10: add status to qspi dts node
        arm64: dts: agilex: add status to qspi dts node
        ARM: dts: Fix dcan driver probe failed on am437x platform
        ARM: OMAP2+: Fix possible memory leak in omap_hwmod_allocate_module
        arm64: defconfig: Enable CONFIG_PCIE_RCAR_HOST
        soc: imx: check ls1021a
        ARM: imx: Remove imx_add_imx_dma() unused irq_err argument
        ARM: imx: Provide correct number of resources when registering gpio devices
        ARM: dts: imx6qdl-gw551x: fix audio SSI
        bus: ti-sysc: Do not disable on suspend for no-idle
        bus: ti-sysc: Fix sleeping function called from invalid context for RTC quirk
        bus: ti-sysc: Fix wakeirq sleeping function called from invalid context
        ARM: dts: meson: Align L2 cache-controller nodename with dtschema
        arm64: dts: meson-gxl-s805x: reduce initial Mali450 core frequency
        arm64: dts: meson: add missing gxl rng clock
        soc: amlogic: meson-gx-socinfo: Fix S905X3 and S905D3 ID's
      630c183b
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into master · a570f419
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "A batch of arm64 fixes.
      
        Although the diffstat is a bit larger than we'd usually have at this
        stage, a decent amount of it is the addition of comments describing
        our syscall tracing behaviour, and also a sweep across all the modular
        arm64 PMU drivers to make them rebust against unloading and unbinding.
      
        There are a couple of minor things kicking around at the moment (CPU
        errata and module PLTs for very large modules), but I'm not expecting
        any significant changes now for us in 5.8.
      
         - Fix kernel text addresses for relocatable images booting using EFI
           and with KASLR disabled so that they match the vmlinux ELF binary.
      
         - Fix unloading and unbinding of PMU driver modules.
      
         - Fix generic mmiowb() when writeX() is called from preemptible
           context (reported by the riscv folks).
      
         - Fix ptrace hardware single-step interactions with signal handlers,
           system calls and reverse debugging.
      
         - Fix reporting of 64-bit x0 register for 32-bit tasks via
           'perf_regs'.
      
         - Add comments describing syscall entry/exit tracing ABI"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        drivers/perf: Prevent forced unbinding of PMU drivers
        asm-generic/mmiowb: Allow mmiowb_set_pending() when preemptible()
        arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP
        arm64: ptrace: Use NO_SYSCALL instead of -1 in syscall_trace_enter()
        arm64: syscall: Expand the comment about ptrace and syscall(-1)
        arm64: ptrace: Add a comment describing our syscall entry/exit trap ABI
        arm64: compat: Ensure upper 32 bits of x0 are zero on syscall return
        arm64: ptrace: Override SPSR.SS when single-stepping is enabled
        arm64: ptrace: Consistently use pseudo-singlestep exceptions
        drivers/perf: Fix kernel panic when rmmod PMU modules during perf sampling
        efi/libstub/arm64: Retain 2MB kernel Image alignment if !KASLR
      a570f419