1. 13 Aug, 2020 1 commit
  2. 06 Aug, 2020 28 commits
    • Pawan Gupta's avatar
      x86/bugs/multihit: Fix mitigation reporting when VMX is not in use · f29dfa53
      Pawan Gupta authored
      On systems that have virtualization disabled or unsupported, sysfs
      mitigation for X86_BUG_ITLB_MULTIHIT is reported incorrectly as:
      
        $ cat /sys/devices/system/cpu/vulnerabilities/itlb_multihit
        KVM: Vulnerable
      
      System is not vulnerable to DoS attack from a rogue guest when
      virtualization is disabled or unsupported in the hardware. Change the
      mitigation reporting for these cases.
      
      Fixes: b8e8c830
      
       ("kvm: mmu: ITLB_MULTIHIT mitigation")
      Reported-by: default avatarNelson Dsouza <nelson.dsouza@linux.intel.com>
      Co-developed-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: default avatarPawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Reviewed-by: default avatarTony Luck <tony.luck@intel.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/0ba029932a816179b9d14a30db38f0f11ef1f166.1594925782.git.pawan.kumar.gupta@linux.intel.com
      f29dfa53
    • Kan Liang's avatar
      x86/fpu/xstate: Fix an xstate size check warning with architectural LBRs · 76d10256
      Kan Liang authored
      An xstate size check warning is triggered on machines which support
      Architectural LBRs.
      
          XSAVE consistency problem, dumping leaves
          WARNING: CPU: 0 PID: 0 at arch/x86/kernel/fpu/xstate.c:649 fpu__init_system_xstate+0x4d4/0xd0e
          Modules linked in:
          CPU: 0 PID: 0 Comm: swapper Not tainted intel-arch_lbr+
          RIP: 0010:fpu__init_system_xstate+0x4d4/0xd0e
      
      The xstate size check routine, init_xstate_size(), compares the size
      retrieved from the hardware with the size of task->fpu, which is
      calculated by the software.
      
      The size from the hardware is the total size of the enabled xstates in
      XCR0 | IA32_XSS. Architectural LBR state is a dynamic supervisor
      feature, which sets the corresponding bit in the IA32_XSS at boot time.
      The size from the hardware includes the size of the Architectural LBR
      state.
      
      However, a dynamic supervisor feature doesn't allocate a buffer in the
      task->fpu. The size of task->fpu doesn't include the size of the
      Architectural LBR state. The mismatch will trigger the warning.
      
      Three options as below were considered to fix the issue:
      
      - Correct the size from the hardware by subtracting the size of the
        dynamic supervisor features.
        The purpose of the check is to compare the size CPU told with the size
        of the XSAVE buffer, which is calculated by the software. If the
        software mucks with the number from hardware, it removes the value of
        the check.
        This option is not a good option.
      
      - Prevent the hardware from counting the size of the dynamic supervisor
        feature by temporarily removing the corresponding bits in IA32_XSS.
        Two extra MSR writes are required to flip the IA32_XSS. The option is
        not pretty, but it is workable. The check is only called once at early
        boot time. The synchronization or context-switching doesn't need to be
        worried.
        This option is implemented here.
      
      - Remove the check entirely, because the check hasn't found any real
        problems. The option may be an alternative as option 2.
        This option is not implemented here.
      
      Add a new function, get_xsaves_size_no_dynamic(), which retrieves the
      total size without the dynamic supervisor features from the hardware.
      The size will be used to compare with the size of task->fpu.
      
      Fixes: f0dccc9d
      
       ("x86/fpu/xstate: Support dynamic supervisor feature for LBR")
      Reported-by: default avatarChang S. Bae <chang.seok.bae@intel.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Reviewed-by: default avatarDave Hansen <dave.hansen@intel.com>
      Link: https://lore.kernel.org/r/1595253051-75374-1-git-send-email-kan.liang@linux.intel.com
      76d10256
    • Pingfan Liu's avatar
      x86/purgatory: Don't generate debug info for purgatory.ro · 52416ffc
      Pingfan Liu authored
      
      
      Purgatory.ro is a standalone binary that is not linked against the rest of
      the kernel.  Its image is copied into an array that is linked to the
      kernel, and from there kexec relocates it wherever it desires.
      
      Unlike the debug info for vmlinux, which can be used for analyzing crash
      such info is useless in purgatory.ro. And discarding them can save about
      200K space.
      
       Original:
         259080  kexec-purgatory.o
       Stripped debug info:
          29152  kexec-purgatory.o
      
      Signed-off-by: default avatarPingfan Liu <kernelfans@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Reviewed-by: default avatarSteve Wahl <steve.wahl@hpe.com>
      Acked-by: default avatarDave Young <dyoung@redhat.com>
      Link: https://lore.kernel.org/r/1596433788-3784-1-git-send-email-kernelfans@gmail.com
      52416ffc
    • Dilip Kota's avatar
      x86/tsr: Fix tsc frequency enumeration bug on Lightning Mountain SoC · 7d985858
      Dilip Kota authored
      Frequency descriptor of Lightning Mountain SoC doesn't have all the
      frequency entries so resulting in the below failure causing a kernel hang:
      
          Error MSR_FSB_FREQ index 15 is unknown
          tsc: Fast TSC calibration failed
      
      So, add all the frequency entries in the Lightning Mountain SoC frequency
      descriptor.
      
      Fixes: 0cc5359d ("x86/cpu: Update init data for new Airmont CPU model")
      Fixes: 812c2d75
      
       ("x86/tsc_msr: Use named struct initializers")
      Signed-off-by: default avatarDilip Kota <eswara.kota@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Link: https://lore.kernel.org/r/211c643ae217604b46cbec43a2c0423946dc7d2d.1596440057.git.eswara.kota@linux.intel.com
      7d985858
    • Lianbo Jiang's avatar
      kexec_file: Correctly output debugging information for the PT_LOAD ELF header · 475f63ae
      Lianbo Jiang authored
      
      
      Currently, when we enable the debugging switch to debug kexec_file,
      we always get the following incorrect results:
      
        kexec_file: Crash PT_LOAD elf header. phdr=00000000c988639b vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=51 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=000000003cca69a0 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=52 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=00000000c584cb9f vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=53 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=00000000cf85d57f vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=54 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=00000000a4a8f847 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=55 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=00000000272ec49f vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=56 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=00000000ea0b65de vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=57 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=000000001f5e490c vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=58 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=00000000dfe4109e vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=59 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=00000000480ed2b6 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=60 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=0000000080b65151 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=61 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=0000000024e31c5e vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=62 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=00000000332e0385 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=63 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=000000002754d5da vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=64 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=00000000783320dd vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=65 p_offset=0x0
        kexec_file: Crash PT_LOAD elf header. phdr=0000000076fe5b64 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=66 p_offset=0x0
      
      The reason is that kernel always prints the values of the next PT_LOAD
      instead of the current PT_LOAD. Change it to ensure that we can get the
      correct debugging information.
      
      [ mingo: Amended changelog, capitalized "ELF". ]
      
      Signed-off-by: default avatarLianbo Jiang <lijiang@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarDave Young <dyoung@redhat.com>
      Link: https://lore.kernel.org/r/20200804044933.1973-4-lijiang@redhat.com
      475f63ae
    • Lianbo Jiang's avatar
      kexec: Improve & fix crash_exclude_mem_range() to handle overlapping ranges · a2e9a95d
      Lianbo Jiang authored
      
      
      The crash_exclude_mem_range() function can only handle one memory region a time.
      
      It will fail in the case in which the passed in area covers several memory
      regions. In this case, it will only exclude the first region, then return,
      but leave the later regions unsolved.
      
      E.g in a NEC system with two usable RAM regions inside the low 1M:
      
        ...
        BIOS-e820: [mem 0x0000000000000000-0x000000000003efff] usable
        BIOS-e820: [mem 0x000000000003f000-0x000000000003ffff] reserved
        BIOS-e820: [mem 0x0000000000040000-0x000000000009ffff] usable
      
      It will only exclude the memory region [0, 0x3efff], the memory region
      [0x40000, 0x9ffff] will still be added into /proc/vmcore, which may cause
      the following failure when dumping vmcore:
      
       ioremap on RAM at 0x0000000000040000 - 0x0000000000040fff
       WARNING: CPU: 0 PID: 665 at arch/x86/mm/ioremap.c:186 __ioremap_caller+0x2c7/0x2e0
       ...
       RIP: 0010:__ioremap_caller+0x2c7/0x2e0
       ...
       cp: error reading '/proc/vmcore': Cannot allocate memory
       kdump: saving vmcore failed
      
      In order to fix this bug, let's extend the crash_exclude_mem_range()
      to handle the overlapping ranges.
      
      [ mingo: Amended the changelog. ]
      
      Signed-off-by: default avatarLianbo Jiang <lijiang@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarDave Young <dyoung@redhat.com>
      Link: https://lore.kernel.org/r/20200804044933.1973-3-lijiang@redhat.com
      a2e9a95d
    • Lianbo Jiang's avatar
      x86/crash: Correct the address boundary of function parameters · a3e1c3bb
      Lianbo Jiang authored
      
      
      Let's carefully handle the boundary of the function parameter to make
      sure that the arguments passed doesn't exceed the address range.
      
      Signed-off-by: default avatarLianbo Jiang <lijiang@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarDave Young <dyoung@redhat.com>
      Link: https://lore.kernel.org/r/20200804044933.1973-2-lijiang@redhat.com
      a3e1c3bb
    • Shuo Liu's avatar
      x86/acrn: Remove redundant chars from ACRN signature · 4c7bfa38
      Shuo Liu authored
      
      
      hypervisor_cpuid_base() only handles 12 chars of the hypervisor
      signature string but is provided with 14 chars.
      
      Remove the redundancy. Additionally, replace the user space uint32_t
      with preferred kernel type u32.
      
      Signed-off-by: default avatarShuo Liu <shuo.a.liu@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Link: https://lore.kernel.org/r/20200806114111.9448-1-shuo.a.liu@intel.com
      4c7bfa38
    • Shuo Liu's avatar
      x86/acrn: Allow ACRN guest to use X2APIC mode · 86d709ce
      Shuo Liu authored
      
      
      The ACRN Hypervisor did not support x2APIC and thus x2APIC support was
      disabled by always returning false when VM checked for x2APIC support.
      
      ACRN received full support of x2APIC and exports the capability through
      CPUID feature bits.
      
      Let VM decide if it needs to switch to x2APIC mode according to CPUID
      features.
      
      Originally-by: default avatarYakui Zhao <yakui.zhao@intel.com>
      Signed-off-by: default avatarShuo Liu <shuo.a.liu@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Link: https://lore.kernel.org/r/20200806113802.9325-1-shuo.a.liu@intel.com
      86d709ce
    • Linus Torvalds's avatar
      Revert "x86/mm/64: Do not sync vmalloc/ioremap mappings" · 7b4ea945
      Linus Torvalds authored
      This reverts commit 8bb9bf24
      
      .
      
      It seems the vmalloc page tables aren't always preallocated in all
      situations, because Jason Donenfeld reports an oops with this commit:
      
        BUG: unable to handle page fault for address: ffffe8ffffd00608
        #PF: supervisor read access in kernel mode
        #PF: error_code(0x0000) - not-present page
        PGD 0 P4D 0
        Oops: 0000 [#1] PREEMPT SMP
        CPU: 2 PID: 22 Comm: kworker/2:0 Not tainted 5.8.0+ #154
        RIP: process_one_work+0x2c/0x2d0
        Code: 41 56 41 55 41 54 55 48 89 f5 53 48 89 fb 48 83 ec 08 48 8b 06 4c 8b 67 40 49 89 c6 45 30 f6 a8 04 b8 00 00 00 00 4c 0f 44 f0 <49> 8b 46 08 44 8b a8 00 01 05
        Call Trace:
         worker_thread+0x4b/0x3b0
         ? rescuer_thread+0x360/0x360
         kthread+0x116/0x140
         ? __kthread_create_worker+0x110/0x110
         ret_from_fork+0x1f/0x30
        CR2: ffffe8ffffd00608
      
      and that page fault address is right in that vmalloc space, and we
      clearly don't have a PGD/P4D entry for it.
      
      Looking at the "Code:" line, the actual fault seems to come from the
      'pwq->wq' dereference at the top of the process_one_work() function:
      
              struct pool_workqueue *pwq = get_work_pwq(work);
              struct worker_pool *pool = worker->pool;
              bool cpu_intensive = pwq->wq->flags & WQ_CPU_INTENSIVE;
      
      so 'struct pool_workqueue *pwq' is the allocation that hasn't been
      synchronized across CPUs.
      
      Just revert for now, while Joerg figures out the cause.
      
      Reported-and-bisected-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJoerg Roedel <jroedel@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7b4ea945
    • Linus Torvalds's avatar
      Merge tag 'sched-fifo-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6d2b84a4
      Linus Torvalds authored
      Pull sched/fifo updates from Ingo Molnar:
       "This adds the sched_set_fifo*() encapsulation APIs to remove static
        priority level knowledge from non-scheduler code.
      
        The three APIs for non-scheduler code to set SCHED_FIFO are:
      
         - sched_set_fifo()
         - sched_set_fifo_low()
         - sched_set_normal()
      
        These are two FIFO priority levels: default (high), and a 'low'
        priority level, plus sched_set_normal() to set the policy back to
        non-SCHED_FIFO.
      
        Since the changes affect a lot of non-scheduler code, we kept this in
        a separate tree"
      
      * tag 'sched-fifo-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
        sched,tracing: Convert to sched_set_fifo()
        sched: Remove sched_set_*() return value
        sched: Remove sched_setscheduler*() EXPORTs
        sched,psi: Convert to sched_set_fifo_low()
        sched,rcutorture: Convert to sched_set_fifo_low()
        sched,rcuperf: Convert to sched_set_fifo_low()
        sched,locktorture: Convert to sched_set_fifo()
        sched,irq: Convert to sched_set_fifo()
        sched,watchdog: Convert to sched_set_fifo()
        sched,serial: Convert to sched_set_fifo()
        sched,powerclamp: Convert to sched_set_fifo()
        sched,ion: Convert to sched_set_normal()
        sched,powercap: Convert to sched_set_fifo*()
        sched,spi: Convert to sched_set_fifo*()
        sched,mmc: Convert to sched_set_fifo*()
        sched,ivtv: Convert to sched_set_fifo*()
        sched,drm/scheduler: Convert to sched_set_fifo*()
        sched,msm: Convert to sched_set_fifo*()
        sched,psci: Convert to sched_set_fifo*()
        sched,drbd: Convert to sched_set_fifo*()
        ...
      6d2b84a4
    • Linus Torvalds's avatar
      Merge tag 'integrity-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity · 4cec9293
      Linus Torvalds authored
      Pull integrity updates from Mimi Zohar:
       "The nicest change is the IMA policy rule checking. The other changes
        include allowing the kexec boot cmdline line measure policy rules to
        be defined in terms of the inode associated with the kexec kernel
        image, making the IMA_APPRAISE_BOOTPARAM, which governs the IMA
        appraise mode (log, fix, enforce), a runtime decision based on the
        secure boot mode of the system, and including errno in the audit log"
      
      * tag 'integrity-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
        integrity: remove redundant initialization of variable ret
        ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime
        ima: AppArmor satisfies the audit rule requirements
        ima: Rename internal filter rule functions
        ima: Support additional conditionals in the KEXEC_CMDLINE hook function
        ima: Use the common function to detect LSM conditionals in a rule
        ima: Move comprehensive rule validation checks out of the token parser
        ima: Use correct type for the args_p member of ima_rule_entry.lsm elements
        ima: Shallow copy the args_p member of ima_rule_entry.lsm elements
        ima: Fail rule parsing when appraise_flag=blacklist is unsupportable
        ima: Fail rule parsing when the KEY_CHECK hook is combined with an invalid cond
        ima: Fail rule parsing when the KEXEC_CMDLINE hook is combined with an invalid cond
        ima: Fail rule parsing when buffer hook functions have an invalid action
        ima: Free the entire rule if it fails to parse
        ima: Free the entire rule when deleting a list of rules
        ima: Have the LSM free its audit rule
        IMA: Add audit log for failure conditions
        integrity: Add errno field in audit message
      4cec9293
    • Linus Torvalds's avatar
      Merge branch 'for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux · e3243e2a
      Linus Torvalds authored
      Pull coccinelle updates from Julia Lawall:
       "New semantic patches and semantic patch improvements from Denis
        Efremov"
      
      * 'for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
        coccinelle: api: filter out memdup_user definitions
        coccinelle: api: extend memdup_user rule with vmemdup_user()
        coccinelle: api: extend memdup_user transformation with GFP_USER
        coccinelle: api: add kzfree script
        coccinelle: misc: add array_size_dup script to detect missed overflow checks
        coccinelle: api/kstrdup: fix coccinelle position
        coccinelle: api: add device_attr_show script
      e3243e2a
    • Linus Torvalds's avatar
      Merge tag 'livepatching-for-5.9' of... · 1e21b5c7
      Linus Torvalds authored
      Merge tag 'livepatching-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
      
      Pull livepatching updates from Petr Mladek:
       "Improvements and cleanups of livepatching selftests"
      
      * tag 'livepatching-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
        selftests/livepatch: adopt to newer sysctl error format
        selftests/livepatch: Use "comm" instead of "diff" for dmesg
        selftests/livepatch: add test delimiter to dmesg
        selftests/livepatch: refine dmesg 'taints' in dmesg comparison
        selftests/livepatch: Don't clear dmesg when running tests
        selftests/livepatch: fix mem leaks in test-klp-shadow-vars
        selftests/livepatch: more verification in test-klp-shadow-vars
        selftests/livepatch: rework test-klp-shadow-vars
        selftests/livepatch: simplify test-klp-callbacks busy target tests
      1e21b5c7
    • Linus Torvalds's avatar
      Merge tag 'Smack-for-5.9' of git://github.com/cschaufler/smack-next · bfdd5aaa
      Linus Torvalds authored
      Pull smack updates from Casey Schaufler:
       "Minor fixes to Smack for the v5.9 release.
      
        All were found by automated checkers and have straightforward
        resolution"
      
      * tag 'Smack-for-5.9' of git://github.com/cschaufler/smack-next:
        Smack: prevent underflow in smk_set_cipso()
        Smack: fix another vsscanf out of bounds
        Smack: fix use-after-free in smk_write_relabel_self()
      bfdd5aaa
    • Linus Torvalds's avatar
      Merge tag 'mips_5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · b62e4197
      Linus Torvalds authored
      Pull MIPS upates from Thomas Bogendoerfer:
      
       - improvements for Loongson64
      
       - extended ingenic support
      
       - removal of not maintained paravirt system type
      
       - cleanups and fixes
      
      * tag 'mips_5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (81 commits)
        MIPS: SGI-IP27: always enable NUMA in Kconfig
        MAINTAINERS: Update KVM/MIPS maintainers
        MIPS: Update default config file for Loongson-3
        MIPS: KVM: Add kvm guest support for Loongson-3
        dt-bindings: mips: Document Loongson kvm guest board
        MIPS: handle Loongson-specific GSExc exception
        MIPS: add definitions for Loongson-specific CP0.Diag1 register
        MIPS: only register FTLBPar exception handler for supported models
        MIPS: ingenic: Hardcode mem size for qi,lb60 board
        MIPS: DTS: ingenic/qi,lb60: Add model and memory node
        MIPS: ingenic: Use fw_passed_dtb even if CONFIG_BUILTIN_DTB
        MIPS: head.S: Init fw_passed_dtb to builtin DTB
        of: address: Fix parser address/size cells initialization
        of_address: Guard of_bus_pci_get_flags with CONFIG_PCI
        MIPS: DTS: Fix number of msi vectors for Loongson64G
        MIPS: Loongson64: Add ISA node for LS7A PCH
        MIPS: Loongson64: DTS: Fix ISA and PCI I/O ranges for RS780E PCH
        MIPS: Loongson64: Enlarge IO_SPACE_LIMIT
        MIPS: Loongson64: Process ISA Node in DeviceTree
        of_address: Add bus type match for pci ranges parser
        ...
      b62e4197
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 40ddad19
      Linus Torvalds authored
      Pull ARM updates from Russell King:
      
       - add arch/arm/Kbuild from Masahiro Yamada.
      
       - simplify act_mm macro, since it contains an open-coded
         get_thread_info.
      
       - VFP updates for Clang from Stefan Agner.
      
       - Fix unwinder for Clang from Nathan Huckleberry.
      
       - Remove unused it8152 PCI host controller, used by the removed cm-x2xx
         platforms from Mike Rapoport.
      
       - Further explanation of __range_ok().
      
       - Remove kimage_voffset that isn't used anymore from Marc Zyngier.
      
       - Drop ancient Thumb-2 workaround for old binutils from Ard Biesheuvel.
      
       - Documentation cleanup for mach-* from Pete Zaitcev.
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 8996/1: Documentation/Clean up the description of mach-<class>
        ARM: 8995/1: drop Thumb-2 workaround for ancient binutils
        ARM: 8994/1: mm: drop kimage_voffset which was only used by KVM
        ARM: uaccess: add further explanation of __range_ok()
        ARM: 8993/1: remove it8152 PCI controller driver
        ARM: 8992/1: Fix unwind_frame for clang-built kernels
        ARM: 8991/1: use VFP assembler mnemonics if available
        ARM: 8990/1: use VFP assembler mnemonics in register load/store macros
        ARM: 8989/1: use .fpu assembler directives instead of assembler arguments
        ARM: 8982/1: mm: Simplify act_mm macro
        ARM: 8981/1: add arch/arm/Kbuild
      40ddad19
    • Linus Torvalds's avatar
      Merge tag 'csky-for-linus-5.9-rc1' of https://github.com/c-sky/csky-linux · 2044513f
      Linus Torvalds authored
      Pull arch/csky updates from Guo Ren:
       "New features:
         - seccomp-filter
         - err-injection
         - top-down&random mmap-layout
         - irq_work
         - show_ipi
         - context-tracking
      
        Fixes & Optimizations:
         - kprobe_on_ftrace
         - optimize panic print"
      
      * tag 'csky-for-linus-5.9-rc1' of https://github.com/c-sky/csky-linux:
        csky: Add context tracking support
        csky: Add arch_show_interrupts for IPI interrupts
        csky: Add irq_work support
        csky: Fixup warning by EXPORT_SYMBOL(kmap)
        csky: Set CONFIG_NR_CPU 4 as default
        csky: Use top-down mmap layout
        csky: Optimize the trap processing flow
        csky: Add support for function error injection
        csky: Fixup kprobes handler couldn't change pc
        csky: Fixup duplicated restore sp in RESTORE_REGS_FTRACE
        csky: Add cpu feature register hint for smp
        csky: Add SECCOMP_FILTER supported
        csky: remove unusued thread_saved_pc and *_segments functions/macros
      2044513f
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20200805' of git://github.com/jcmvbkbc/linux-xtensa · bbcf9cd1
      Linus Torvalds authored
      Pull Xtensa updates from Max Filippov:
      
       - add syscall audit support
      
       - add seccomp filter support
      
       - clean up make rules under arch/xtensa/boot
      
       - fix state management for exclusive access opcodes
      
       - fix build with PMU enabled
      
      * tag 'xtensa-20200805' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: add missing exclusive access state management
        xtensa: fix xtensa_pmu_setup prototype
        xtensa: add boot subdirectories build artifacts to 'targets'
        xtensa: add uImage and xipImage to targets
        xtensa: move vmlinux.bin[.gz] to boot subdirectory
        xtensa: initialize_mmu.h: fix a duplicated word
        selftests/seccomp: add xtensa support
        xtensa: add seccomp support
        xtensa: expose syscall through user_pt_regs
        xtensa: add audit support
      bbcf9cd1
    • Linus Torvalds's avatar
      Merge tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux · 9ab9bc51
      Linus Torvalds authored
      Pull hyperv updates from Wei Liu:
      
       - A patch series from Andrea to improve vmbus code
      
       - Two clean-up patches from Alexander and Randy
      
      * tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        hyperv: hyperv.h: drop a duplicated word
        tools: hv: change http to https in hv_kvp_daemon.c
        Drivers: hv: vmbus: Remove the lock field from the vmbus_channel struct
        scsi: storvsc: Introduce the per-storvsc_device spinlock
        Drivers: hv: vmbus: Remove unnecessary channel->lock critical sections (sc_list updaters)
        Drivers: hv: vmbus: Use channel_mutex in channel_vp_mapping_show()
        Drivers: hv: vmbus: Remove unnecessary channel->lock critical sections (sc_list readers)
        Drivers: hv: vmbus: Replace cpumask_test_cpu(, cpu_online_mask) with cpu_online()
        Drivers: hv: vmbus: Remove the numa_node field from the vmbus_channel struct
        Drivers: hv: vmbus: Remove the target_vp field from the vmbus_channel struct
      9ab9bc51
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 47ec5303
      Linus Torvalds authored
      Pull networking updates from David Miller:
      
       1) Support 6Ghz band in ath11k driver, from Rajkumar Manoharan.
      
       2) Support UDP segmentation in code TSO code, from Eric Dumazet.
      
       3) Allow flashing different flash images in cxgb4 driver, from Vishal
          Kulkarni.
      
       4) Add drop frames counter and flow status to tc flower offloading,
          from Po Liu.
      
       5) Support n-tuple filters in cxgb4, from Vishal Kulkarni.
      
       6) Various new indirect call avoidance, from Eric Dumazet and Brian
          Vazquez.
      
       7) Fix BPF verifier failures on 32-bit pointer arithmetic, from
          Yonghong Song.
      
       8) Support querying and setting hardware address of a port function via
          devlink, use this in mlx5, from Parav Pandit.
      
       9) Support hw ipsec offload on bonding slaves, from Jarod Wilson.
      
      10) Switch qca8k driver over to phylink, from Jonathan McDowell.
      
      11) In bpftool, show list of processes holding BPF FD references to
          maps, programs, links, and btf objects. From Andrii Nakryiko.
      
      12) Several conversions over to generic power management, from Vaibhav
          Gupta.
      
      13) Add support for SO_KEEPALIVE et al. to bpf_setsockopt(), from Dmitry
          Yakunin.
      
      14) Various https url conversions, from Alexander A. Klimov.
      
      15) Timestamping and PHC support for mscc PHY driver, from Antoine
          Tenart.
      
      16) Support bpf iterating over tcp and udp sockets, from Yonghong Song.
      
      17) Support 5GBASE-T i40e NICs, from Aleksandr Loktionov.
      
      18) Add kTLS RX HW offload support to mlx5e, from Tariq Toukan.
      
      19) Fix the ->ndo_start_xmit() return type to be netdev_tx_t in several
          drivers. From Luc Van Oostenryck.
      
      20) XDP support for xen-netfront, from Denis Kirjanov.
      
      21) Support receive buffer autotuning in MPTCP, from Florian Westphal.
      
      22) Support EF100 chip in sfc driver, from Edward Cree.
      
      23) Add XDP support to mvpp2 driver, from Matteo Croce.
      
      24) Support MPTCP in sock_diag, from Paolo Abeni.
      
      25) Commonize UDP tunnel offloading code by creating udp_tunnel_nic
          infrastructure, from Jakub Kicinski.
      
      26) Several pci_ --> dma_ API conversions, from Christophe JAILLET.
      
      27) Add FLOW_ACTION_POLICE support to mlxsw, from Ido Schimmel.
      
      28) Add SK_LOOKUP bpf program type, from Jakub Sitnicki.
      
      29) Refactor a lot of networking socket option handling code in order to
          avoid set_fs() calls, from Christoph Hellwig.
      
      30) Add rfc4884 support to icmp code, from Willem de Bruijn.
      
      31) Support TBF offload in dpaa2-eth driver, from Ioana Ciornei.
      
      32) Support XDP_REDIRECT in qede driver, from Alexander Lobakin.
      
      33) Support PCI relaxed ordering in mlx5 driver, from Aya Levin.
      
      34) Support TCP syncookies in MPTCP, from Flowian Westphal.
      
      35) Fix several tricky cases of PMTU handling wrt. briding, from Stefano
          Brivio.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2056 commits)
        net: thunderx: initialize VF's mailbox mutex before first usage
        usb: hso: remove bogus check for EINPROGRESS
        usb: hso: no complaint about kmalloc failure
        hso: fix bailout in error case of probe
        ip_tunnel_core: Fix build for archs without _HAVE_ARCH_IPV6_CSUM
        selftests/net: relax cpu affinity requirement in msg_zerocopy test
        mptcp: be careful on subflow creation
        selftests: rtnetlink: make kci_test_encap() return sub-test result
        selftests: rtnetlink: correct the final return value for the test
        net: dsa: sja1105: use detected device id instead of DT one on mismatch
        tipc: set ub->ifindex for local ipv6 address
        ipv6: add ipv6_dev_find()
        net: openvswitch: silence suspicious RCU usage warning
        Revert "vxlan: fix tos value before xmit"
        ptp: only allow phase values lower than 1 period
        farsync: switch from 'pci_' to 'dma_' API
        wan: wanxl: switch from 'pci_' to 'dma_' API
        hv_netvsc: do not use VF device if link is down
        dpaa2-eth: Fix passing zero to 'PTR_ERR' warning
        net: macb: Properly handle phylink on at91sam9x
        ...
      47ec5303
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2020-08-06' of git://anongit.freedesktop.org/drm/drm · 81867496
      Linus Torvalds authored
      Pull drm updates from Dave Airlie:
       "New xilinx displayport driver, AMD support for two new GPUs (more
        header files), i915 initial support for RocketLake and some work on
        their DG1 (discrete chip).
      
        The core also grew some lockdep annotations to try and constrain what
        drivers do with dma-fences, and added some documentation on why the
        idea of indefinite fences doesn't work.
      
        The long list is below.
      
        I do have some fixes trees outstanding, but I'll follow up with those
        later.
      
        core:
         - add user def flag to cmd line modes
         - dma_fence_wait added might_sleep
         - dma-fence lockdep annotations
         - indefinite fences are bad documentation
         - gem CMA functions used in more drivers
         - struct mutex removal
         - more drm_ debug macro usage
         - set/drop master api fixes
         - fix for drm/mm hole size comparison
         - drm/mm remove invalid entry optimization
         - optimise drm/mm hole handling
         - VRR debugfs added
         - uncompressed AFBC modifier support
         - multiple display id blocks in EDID
         - multiple driver sg handling fixes
         - __drm_atomic_helper_crtc_reset in all drivers
         - managed vram helpers
      
        ttm:
         - ttm_mem_reg handling cleanup
         - remove bo offset field
         - drop CMA memtype flag
         - drop mappable flag
      
        xilinx:
         - New Xilinx ZynqMP DisplayPort Subsystem driver
      
        nouveau:
         - add CRC support
         - start using NVIDIA published class header files
         - convert all push buffer emission to new macros
         - Proper push buffer space management for EVO/NVD channels.
         - firmware loading fixes
         - 2MiB system memory pages support on Pascal and newer
      
        vkms:
         - larger cursor support
      
        i915:
         - Rocketlake platform enablement
         - Early DG1 enablement
         - Numerous GEM refactorings
         - DP MST fixes
         - FBC, PSR, Cursor, Color, Gamma fixes
         - TGL, RKL, EHL workaround updates
         - TGL 8K display support fixes
         - SDVO/HDMI/DVI fixes
      
        amdgpu:
         - Initial support for Sienna Cichlid GPU
         - Initial support for Navy Flounder GPU
         - SI UVD/VCE support
         - expose rotation property
         - Add support for unique id on Arcturus
         - Enable runtime PM on vega10 boards that support BACO
         - Skip BAR resizing if the bios already did id
         - Major swSMU code cleanup
         - Fixes for DCN bandwidth calculations
      
        amdkfd:
         - Track SDMA usage per process
         - SMI events interface
      
        radeon:
         - Default to on chip GART for AGP boards on all arches
         - Runtime PM reference count fixes
      
        msm:
         - headers regenerated causing churn
         - a650/a640 display and GPU enablement
         - dpu dither support for 6bpc panels
         - dpu cursor fix
         - dsi/mdp5 enablement for sdm630/sdm636/sdm66
      
        tegra:
         - video capture prep support
         - reflection support
      
        mediatek:
         - convert mtk_dsi to bridge API
      
        meson:
         - FBC support
      
        sun4i:
         - iommu support
      
        rockchip:
         - register locking fix
         - per-pixel alpha support PX30 VOP
      
        mgag200:
         - ported to simple and shmem helpers
         - device init cleanups
         - use managed pci functions
         - dropped hw cursor support
      
        ast:
         - use managed pci functions
         - use managed VRAM helpers
         - rework cursor support
      
        malidp:
         - dev_groups support
      
        hibmc:
         - refactor hibmc_drv_vdac:
      
        vc4:
         - create TXP CRTC
      
        imx:
         - error path fixes and cleanups
      
        etnaviv:
         - clock handling and error handling cleanups
         - use pin_user_pages"
      
      * tag 'drm-next-2020-08-06' of git://anongit.freedesktop.org/drm/drm: (1747 commits)
        drm/msm: use kthread_create_worker instead of kthread_run
        drm/msm/mdp5: Add MDP5 configuration for SDM636/660
        drm/msm/dsi: Add DSI configuration for SDM660
        drm/msm/mdp5: Add MDP5 configuration for SDM630
        drm/msm/dsi: Add phy configuration for SDM630/636/660
        drm/msm/a6xx: add A640/A650 hwcg
        drm/msm/a6xx: hwcg tables in gpulist
        drm/msm/dpu: add SM8250 to hw catalog
        drm/msm/dpu: add SM8150 to hw catalog
        drm/msm/dpu: intf timing path for displayport
        drm/msm/dpu: set missing flush bits for INTF_2 and INTF_3
        drm/msm/dpu: don't use INTF_INPUT_CTRL feature on sdm845
        drm/msm/dpu: move some sspp caps to dpu_caps
        drm/msm/dpu: update UBWC config for sm8150 and sm8250
        drm/msm/dpu: use right setup_blend_config for sm8150 and sm8250
        drm/msm/a6xx: set ubwc config for A640 and A650
        drm/msm/adreno: un-open-code some packets
        drm/msm: sync generated headers
        drm/msm/a6xx: add build_bw_table for A640/A650
        drm/msm/a6xx: fix crashstate capture for A650
        ...
      81867496
    • Linus Torvalds's avatar
      Merge tag 'leds-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds · e4a7b2dc
      Linus Torvalds authored
      Pull LED updates from Pavel Machek:
       "Okay, so... this one is interesting. RGB LEDs are very common, and we
        need to have some kind of support for them. Multicolor is for
        arbitrary set of LEDs in one package, RGB is for LEDs that can produce
        full range of colors. We do not have real multicolor LED that is not
        RGB in the pipeline, so that one is disabled for now.
      
        You can expect this saga to continue with next pull requests"
      
      * tag 'leds-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (37 commits)
        MAINTAINERS: Remove myself as LED subsystem maintainer
        leds: disallow /sys/class/leds/*:multi:* for now
        leds: add RGB color option, as that is different from multicolor.
        Make LEDS_LP55XX_COMMON depend on I2C to fix build errors:
        Documentation: ABI: leds-turris-omnia: document sysfs attribute
        leds: initial support for Turris Omnia LEDs
        dt-bindings: leds: add cznic,turris-omnia-leds binding
        leds: pattern trigger -- check pattern for validity
        leds: Replace HTTP links with HTTPS ones
        leds: trigger: add support for LED-private device triggers
        leds: lp5521: Add multicolor framework multicolor brightness support
        leds: lp5523: Update the lp5523 code to add multicolor brightness function
        leds: lp55xx: Add multicolor framework support to lp55xx
        leds: lp55xx: Convert LED class registration to devm_*
        dt-bindings: leds: Convert leds-lp55xx to yaml
        leds: multicolor: Introduce a multicolor class definition
        leds: Add multicolor ID to the color ID list
        dt: bindings: Add multicolor class dt bindings documention
        leds: lp5523: Fix various formatting issues in the code
        leds: lp55xx: Fix file permissions to use DEVICE_ATTR macros
        ...
      e4a7b2dc
    • Dean Nelson's avatar
      net: thunderx: initialize VF's mailbox mutex before first usage · c1055b76
      Dean Nelson authored
      A VF's mailbox mutex is not getting initialized by nicvf_probe() until after
      it is first used. And such usage is resulting in...
      
      [   28.270927] ------------[ cut here ]------------
      [   28.270934] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
      [   28.270980] WARNING: CPU: 9 PID: 675 at kernel/locking/mutex.c:938 __mutex_lock+0xdac/0x12f0
      [   28.270985] Modules linked in: ast(+) nicvf(+) i2c_algo_bit drm_vram_helper drm_ttm_helper ttm nicpf(+) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm ixgbe(+) sg thunder_bgx mdio i2c_thunderx mdio_thunder thunder_xcv mdio_cavium dm_mirror dm_region_hash dm_log dm_mod
      [   28.271064] CPU: 9 PID: 675 Comm: systemd-udevd Not tainted 4.18.0+ #1
      [   28.271070] Hardware name: GIGABYTE R120-T34-00/MT30-GS2-00, BIOS F02 08/06/2019
      [   28.271078] pstate: 60000005 (nZCv daif -PAN -UAO)
      [   28.271086] pc : __mutex_lock+0xdac/0x12f0
      [   28.271092] lr : __mutex_lock+0xdac/0x12f0
      [   28.271097] sp : ffff800d42146fb0
      [   28.271103] x29: ffff800d42146fb0 x28: 0000000000000000
      [   28.271113] x27: ffff800d24361180 x26: dfff200000000000
      [   28.271122] x25: 0000000000000000 x24: 0000000000000002
      [   28.271132] x23: ffff20001597cc80 x22: ffff2000139e9848
      [   28.271141] x21: 0000000000000000 x20: 1ffff001a8428e0c
      [   28.271151] x19: ffff200015d5d000 x18: 1ffff001ae0f2184
      [   28.271160] x17: 0000000000000000 x16: 0000000000000000
      [   28.271170] x15: ffff800d70790c38 x14: ffff20001597c000
      [   28.271179] x13: ffff20001597cc80 x12: ffff040002b2f779
      [   28.271189] x11: 1fffe40002b2f778 x10: ffff040002b2f778
      [   28.271199] x9 : 0000000000000000 x8 : 00000000f1f1f1f1
      [   28.271208] x7 : 00000000f2f2f2f2 x6 : 0000000000000000
      [   28.271217] x5 : 1ffff001ae0f2186 x4 : 1fffe400027eb03c
      [   28.271227] x3 : dfff200000000000 x2 : ffff1001a8428dbe
      [   28.271237] x1 : c87fdfac7ea11d00 x0 : 0000000000000000
      [   28.271246] Call trace:
      [   28.271254]  __mutex_lock+0xdac/0x12f0
      [   28.271261]  mutex_lock_nested+0x3c/0x50
      [   28.271297]  nicvf_send_msg_to_pf+0x40/0x3a0 [nicvf]
      [   28.271316]  nicvf_register_misc_interrupt+0x20c/0x328 [nicvf]
      [   28.271334]  nicvf_probe+0x508/0xda0 [nicvf]
      [   28.271344]  local_pci_probe+0xc4/0x180
      [   28.271352]  pci_device_probe+0x3ec/0x528
      [   28.271363]  driver_probe_device+0x21c/0xb98
      [   28.271371]  device_driver_attach+0xe8/0x120
      [   28.271379]  __driver_attach+0xe0/0x2a0
      [   28.271386]  bus_for_each_dev+0x118/0x190
      [   28.271394]  driver_attach+0x48/0x60
      [   28.271401]  bus_add_driver+0x328/0x558
      [   28.271409]  driver_register+0x148/0x398
      [   28.271416]  __pci_register_driver+0x14c/0x1b0
      [   28.271437]  nicvf_init_module+0x54/0x10000 [nicvf]
      [   28.271447]  do_one_initcall+0x18c/0xc18
      [   28.271457]  do_init_module+0x18c/0x618
      [   28.271464]  load_module+0x2bc0/0x4088
      [   28.271472]  __se_sys_finit_module+0x110/0x188
      [   28.271479]  __arm64_sys_finit_module+0x70/0xa0
      [   28.271490]  el0_svc_handler+0x15c/0x380
      [   28.271496]  el0_svc+0x8/0xc
      [   28.271502] irq event stamp: 52649
      [   28.271513] hardirqs last  enabled at (52649): [<ffff200011b4d790>] _raw_spin_unlock_irqrestore+0xc0/0xd8
      [   28.271522] hardirqs last disabled at (52648): [<ffff200011b4d3c4>] _raw_spin_lock_irqsave+0x3c/0xf0
      [   28.271530] softirqs last  enabled at (52330): [<ffff200010082af4>] __do_softirq+0xacc/0x117c
      [   28.271540] softirqs last disabled at (52313): [<ffff20001019b354>] irq_exit+0x3cc/0x500
      [   28.271545] ---[ end trace a9b90324c8a0d4ee ]---
      
      This problem is resolved by moving the call to mutex_init() up earlier
      in nicvf_probe().
      
      Fixes: 609ea65c
      
       ("net: thunderx: add mutex to protect mailbox from concurrent calls for same VF")
      Signed-off-by: default avatarDean Nelson <dnelson@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1055b76
    • David S. Miller's avatar
      Merge branch 'misc-bug-fixes-for-the-hso-driver' · 0063fc3d
      David S. Miller authored
      
      
      Oliver Neukum says:
      
      ====================
      misc bug fixes for the hso driver
      
      1. Code reuse led to an unregistration of a net driver that has not been
      registered
      2. The kernel complains generically if kmalloc with GFP_KERNEL fails
      3. A race that can lead to an URB that is in use being reused or
      a use after free
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0063fc3d
    • Oliver Neukum's avatar
      usb: hso: remove bogus check for EINPROGRESS · abaf00ff
      Oliver Neukum authored
      
      
      This check an inherent race. It opens a race where
      an error code has already been set or cleared yet
      the URB has not been given back. We cannot do
      such an optimization and must unlink unconditionally.
      
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      abaf00ff
    • Oliver Neukum's avatar
      usb: hso: no complaint about kmalloc failure · 11c5f6d2
      Oliver Neukum authored
      
      
      If this fails, kmalloc() will print a report including
      a stack trace. There is no need for a separate complaint.
      
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      11c5f6d2
    • Oliver Neukum's avatar
      hso: fix bailout in error case of probe · 5fcfb6d0
      Oliver Neukum authored
      
      
      The driver tries to reuse code for disconnect in case
      of a failed probe.
      If resources need to be freed after an error in probe, the
      netdev must not be freed because it has never been registered.
      Fix it by telling the helper which path we are in.
      
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5fcfb6d0
  3. 05 Aug, 2020 11 commits
    • Mike Rapoport's avatar
      MIPS: SGI-IP27: always enable NUMA in Kconfig · 6c86a302
      Mike Rapoport authored
      
      
      When a configuration has NUMA disabled and SGI_IP27 enabled, the build
      fails:
      
        CC      kernel/bounds.s
        CC      arch/mips/kernel/asm-offsets.s
      In file included from arch/mips/include/asm/topology.h:11,
                       from include/linux/topology.h:36,
                       from include/linux/gfp.h:9,
                       from include/linux/slab.h:15,
                       from include/linux/crypto.h:19,
                       from include/crypto/hash.h:11,
                       from include/linux/uio.h:10,
                       from include/linux/socket.h:8,
                       from include/linux/compat.h:15,
                       from arch/mips/kernel/asm-offsets.c:12:
      include/linux/topology.h: In function 'numa_node_id':
      arch/mips/include/asm/mach-ip27/topology.h:16:27: error: implicit declaration of function 'cputonasid'; did you mean 'cpu_vpe_id'? [-Werror=implicit-function-declaration]
       #define cpu_to_node(cpu) (cputonasid(cpu))
                                 ^~~~~~~~~~
      include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node'
        return cpu_to_node(raw_smp_processor_id());
               ^~~~~~~~~~~
      include/linux/topology.h: In function 'cpu_cpu_mask':
      arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data' [-Werror=implicit-function-declaration]
            &hub_data(node)->h_cpus)
             ^~~~~~~~
      include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
        return cpumask_of_node(cpu_to_node(cpu));
               ^~~~~~~~~~~~~~~
      arch/mips/include/asm/mach-ip27/topology.h:19:21: error: invalid type argument of '->' (have 'int')
            &hub_data(node)->h_cpus)
                           ^~
      include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
        return cpumask_of_node(cpu_to_node(cpu));
               ^~~~~~~~~~~~~~~
      
      Before switch from discontigmem to sparsemem, there always was
      CONFIG_NEED_MULTIPLE_NODES=y because it was selected by DISCONTIGMEM.
      Without DISCONTIGMEM it is possible to have SPARSEMEM without NUMA for
      SGI_IP27 and as many things there rely on custom node definition, the
      build breaks.
      
      As Thomas noted "... there are right now too many places in IP27 code,
      which assumes NUMA enabled", the simplest solution would be to always
      enable NUMA for SGI-IP27 builds.
      
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Fixes: 397dc00e
      
       ("mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      6c86a302
    • Jacek Anaszewski's avatar
      MAINTAINERS: Remove myself as LED subsystem maintainer · bba37471
      Jacek Anaszewski authored
      
      
      It don't have enough time for reviewing patches and thus don't
      want to be listed as regular LED maintainer. Nonetheless I may still
      give a review from time to time.
      
      Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
      Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
      bba37471
    • Linus Torvalds's avatar
      Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · fffe3ae0
      Linus Torvalds authored
      Pull hmm updates from Jason Gunthorpe:
       "Ralph has been working on nouveau's use of hmm_range_fault() and
        migrate_vma() which resulted in this small series. It adds reporting
        of the page table order from hmm_range_fault() and some optimization
        of migrate_vma():
      
         - Report the size of the page table mapping out of hmm_range_fault().
      
           This makes it easier to establish a large/huge/etc mapping in the
           device's page table.
      
         - Allow devices to ignore the invalidations during migration in cases
           where the migration is not going to change pages.
      
           For instance migrating pages to a device does not require the
           device to invalidate pages already in the device.
      
         - Update nouveau and hmm_tests to use the above"
      
      * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        mm/hmm/test: use the new migration invalidation
        nouveau/svm: use the new migration invalidation
        mm/notifier: add migration invalidation type
        mm/migrate: add a flags parameter to migrate_vma
        nouveau: fix storing invalid ptes
        nouveau/hmm: support mapping large sysmem pages
        nouveau: fix mapping 2MB sysmem pages
        nouveau/hmm: fault one page at a time
        mm/hmm: add tests for hmm_pfn_to_map_order()
        mm/hmm: provide the page mapping order in hmm_range_fault()
      fffe3ae0
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 8f7be629
      Linus Torvalds authored
      Pull MMC updates from Ulf Hansson:
       "MMC core:
      
         - Add a new host cap bit and a corresponding DT property, to support
           power cycling of the card by FW at system suspend/resume.
      
         - Fix clock rate setting for SDIO in SDR12/SDR25 speed-mode
      
         - Fix switch to 1/4-bit mode at system suspend/resume for SD-combo
           cards
      
         - Convert the mmc-pwrseq DT bindings to the json-schema
      
         - Always allow the card detect uevent to be consumed by userspace
      
        MMC host controllers:
      
         - Convert a few DT bindings to the json-schema
      
         - mtk-sd:
            - Add support for command queue through cqhci
            - Add support for the MT6779 variant
      
         - renesas_sdhi_internal_dmac:
            - Fix dma unmapping in the error path
      
         - sdhci_am654:
            - Add support for the AM65x PG2.0 variant
            - Extend support for phys/clocks
      
         - sdhci-cadence:
            - Drop incorrect HW tuning for SD mode
      
         - sdhci-msm:
            - Add support for interconnect bandwidth scaling
            - Enable internal voltage control
            - Enable low power state for pinctrls
      
         - sdhci-of-at91:
            - Ludovic Desroches handovers maintenance to Eugen Hristev
      
         - sdhci-pci-gli:
            - Improve clock handling for GL975x
      
         - sdhci-pci-o2micro:
            - Add HW tuning for SDR104 mode
            - Fix support for O2 host controller Seabird1"
      
      * tag 'mmc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (66 commits)
        mmc: mediatek: make function msdc_cqe_disable() static
        MAINTAINERS: mmc: sdhci-of-at91: handover maintenance to Eugen Hristev
        dt-bindings: mmc: mediatek: Add document for mt6779
        mmc: mediatek: command queue support
        mmc: mediatek: refine msdc timeout api
        mmc: mediatek: add MT6779 MMC driver support
        mmc: sdhci-pci-o2micro: Add HW tuning for SDR104 mode
        mmc: sdhci-pci-o2micro: Bug fix for O2 host controller Seabird1
        mmc: via-sdmmc: use generic power management
        memstick: jmb38x_ms: use generic power management
        mmc: sdhci-cadence: do not use hardware tuning for SD mode
        mmc: sdhci-pci-gli: Set SDR104's clock to 205MHz and enable SSC for GL975x
        mmc: cqhci: Fix a print format for the task descriptor
        mmc: sdhci-of-arasan: fix timings allocation code
        mmc: sdhci: Fix a potential uninitialized variable
        dt-bindings: mmc: renesas,sdhi: convert to YAML
        dt-bindings: mmc: convert arasan sdhci bindings to yaml
        mmc: sdhci: Fix potential null pointer access while accessing vqmmc
        mmc: core: Add MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND
        dt-bindings: mmc: Add full-pwr-cycle-in-suspend property
        ...
      8f7be629
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 9aebd325
      Linus Torvalds authored
      Pull hwmon updates from Guenter Roeck:
       "Highlights:
         - New driver for Sparx5 SoC temperature sensot
         - New driver for Corsair Commander Pro
         - MAX20710 support added to max20730 driver
      
        Enhancements:
         - max6697: Allow max6581 to create tempX_offset attributes
         - gsc (Gateworks System Controller): add 16bit pre-scaled voltage mode
         - adm1275: Enable adm1278 ADM1278_TEMP1_EN
         - dell-smm: Add Latitude 5480 to fan control whitelist
      
        Fixes:
         - adc128d818: Fix advanced configuration register init
         - pmbus/core: Use s64 instead of long for calculations to fix
           overflow issues with 32-bit architectures
      
        Plus various cleanups in several drivers"
      
      * tag 'hwmon-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (32 commits)
        hwmon: (adc128d818) Fix advanced configuration register init
        hwmon: (axi-fan-control) remove duplicate macros
        hwmon: (i5k_amb, vt8231) Drop uses of pci_read_config_*() return value
        hwmon: (sparx5) Make symbol 's5_temp_match' static
        hwmon: (corsair-cpro) add reading pwm values
        hwmon: sparx5: Add Sparx5 SoC temperature driver
        dt-bindings: hwmon: Add Sparx5 temperature sensor
        hwmon: (tmp401) Replace HTTP links with HTTPS ones
        hwmon: (lm95234) Replace HTTP links with HTTPS ones
        hwmon: (lm90) Replace HTTP links with HTTPS ones
        hwmon: (k8temp) Replace HTTP links with HTTPS ones
        hwmon: (jc42) Replace HTTP links with HTTPS ones
        hwmon: (ina2xx) Replace HTTP links with HTTPS ones
        hwmon: (ina209) Replace HTTP links with HTTPS ones
        hwmon: Replace HTTP links with HTTPS ones
        docs: hwmon: Replace HTTP links with HTTPS ones
        hwmon: (adm1025) Replace HTTP links with HTTPS ones
        hwmon: add Corsair Commander Pro driver
        hwmon: (max6697) Allow max6581 to create tempX_offset
        hwmon: (tmmp513) Replace HTTP links with HTTPS links
        ...
      9aebd325
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 44197797
      Linus Torvalds authored
      Pull Devicetree updates from Rob Herring:
      
       - Improve device links cycle detection and breaking. Add more bindings
         for device link dependencies.
      
       - Refactor parsing 'no-map' in __reserved_mem_alloc_size()
      
       - Improve DT unittest 'ranges' and 'dma-ranges' test case to check
         differing cell sizes
      
       - Various http to https link conversions
      
       - Add a schema check to prevent 'syscon' from being used by itself
         without a more specific compatible
      
       - A bunch more DT binding conversions to schema
      
      * tag 'devicetree-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits)
        of: reserved-memory: remove duplicated call to of_get_flat_dt_prop() for no-map node
        of: unittest: Use bigger address cells to catch parser regressions
        dt-bindings: memory-controllers: Convert mmdc to json-schema
        dt-bindings: mtd: Convert imx nand to json-schema
        dt-bindings: mtd: Convert gpmi nand to json-schema
        dt-bindings: iio: io-channel-mux: Fix compatible string in example code
        of: property: Add device link support for pinctrl-0 through pinctrl-8
        of: property: Add device link support for multiple DT bindings
        dt-bindings: phy: ti: phy-gmii-sel: convert bindings to json-schema
        dt-bindings: mux: mux.h: drop a duplicated word
        dt-bindings: misc: Convert olpc,xo1.75-ec to json-schema
        dt-bindings: aspeed-lpc: Replace HTTP links with HTTPS ones
        dt-bindings: drm/bridge: Replace HTTP links with HTTPS ones
        drm/tilcdc: Replace HTTP links with HTTPS ones
        dt-bindings: iommu: renesas,ipmmu-vmsa: Add r8a774e1 support
        dt-bindings: fpga: Replace HTTP links with HTTPS ones
        dt-bindings: virtio: Replace HTTP links with HTTPS ones
        dt-bindings: media: imx274: Add optional input clock and supplies
        dt-bindings: i2c-gpio: Use 'deprecated' keyword on deprecated properties
        dt-bindings: interrupt-controller: Fix typos in loongson,liointc.yaml
        ...
      44197797
    • Linus Torvalds's avatar
      Merge tag 'gpio-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 1d8ce0e0
      Linus Torvalds authored
      Pull GPIO updates from Linus Walleij:
       "This is the bulk of GPIO changes for the v5.9 kernel cycle.
      
        There is nothing too exciting in it, but a new macro that fixes a
        build failure on a minor ARM32 platform that appeared yesterday is
        part of it so we better merge it.
      
        Core changes:
      
         - Introduce the for_each_requested_gpio() macro to help in dependent
           code all over the place. Also patch a few locations to use it while
           we are at it.
      
         - Split out the sysfs code into its own file.
      
         - Split out the character device code into its own file, then make a
           set of refactorings and improvements to this code. We are setting
           the stage to revamp the userspace API a bit in the next cycle.
      
         - Fix a whole slew of kerneldoc that was wrong or missing.
      
        New drivers:
      
         - The PCA953x driver now supports the PCAL9535.
      
        Driver improvements:
      
         - A host of incremental modernizations and improvements to the
           PCA953x driver.
      
         - Incremental improvements to the Xilinx Zynq driver.
      
         - Some improvements to the GPIO aggregator driver.
      
         - I ran all over the place switching all threaded and other drivers
           requesting their own IRQ while using the core GPIO IRQ helpers to
           pass the GPIO irq chip as a template instead of calling the
           explicit set-up functions. Next merge window we may retire the old
           code altogether"
      
      * tag 'gpio-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (97 commits)
        gpio: wcove: Request IRQ after all initialisation done
        gpio: crystalcove: Free IRQ on error path
        gpio: pca953x: Request IRQ after all initialisation done
        gpio: don't use same lockdep class for all devm_gpiochip_add_data users
        gpio: max732x: Use irqchip template
        gpio: stmpe: Move chip registration
        gpio: rcar: Use irqchip template
        gpio: regmap: fix type clash
        gpio: Correct kernel-doc inconsistency
        gpio: pci-idio-16: Use irqchip template
        gpio: pcie-idio-24: Use irqchip template
        gpio: 104-idio-16: Use irqchip template
        gpio: 104-idi-48: Use irqchip template
        gpio: 104-dio-48e: Use irqchip template
        gpio: ws16c48: Use irqchip template
        gpio: omap: improve coding style for pin config flags
        gpio: dln2: Use irqchip template
        gpio: sch: Add a blank line between declaration and code
        gpio: sch: changed every 'unsigned' to 'unsigned int'
        gpio: ich: changed every 'unsigned' to 'unsigned int'
        ...
      1d8ce0e0
    • Linus Torvalds's avatar
      random: random.h should include archrandom.h, not the other way around · 58552408
      Linus Torvalds authored
      
      
      This is hopefully the final piece of the crazy puzzle with random.h
      dependencies.
      
      And by "hopefully" I obviously mean "Linus is a hopeless optimist".
      
      Reported-and-tested-by: default avatarDaniel Díaz <daniel.diaz@linaro.org>
      Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      58552408
    • Stefano Brivio's avatar
      ip_tunnel_core: Fix build for archs without _HAVE_ARCH_IPV6_CSUM · 8ed54f16
      Stefano Brivio authored
      
      
      On architectures defining _HAVE_ARCH_IPV6_CSUM, we get
      csum_ipv6_magic() defined by means of arch checksum.h headers. On
      other architectures, we actually need to include net/ip6_checksum.h
      to be able to use it.
      
      Without this include, building with defconfig breaks at least for
      s390.
      
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Fixes: 4cb47a86
      
       ("tunnels: PMTU discovery support for directly bridged IP packets")
      Signed-off-by: default avatarStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ed54f16
    • Willem de Bruijn's avatar
      selftests/net: relax cpu affinity requirement in msg_zerocopy test · 16f6458f
      Willem de Bruijn authored
      The msg_zerocopy test pins the sender and receiver threads to separate
      cores to reduce variance between runs.
      
      But it hardcodes the cores and skips core 0, so it fails on machines
      with the selected cores offline, or simply fewer cores.
      
      The test mainly gives code coverage in automated runs. The throughput
      of zerocopy ('-z') and non-zerocopy runs is logged for manual
      inspection.
      
      Continue even when sched_setaffinity fails. Just log to warn anyone
      interpreting the data.
      
      Fixes: 07b65c5b
      
       ("test: add msg_zerocopy test")
      Reported-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      16f6458f
    • Paolo Abeni's avatar
      mptcp: be careful on subflow creation · adf73410
      Paolo Abeni authored
      
      
      Nicolas reported the following oops:
      
      [ 1521.392541] BUG: kernel NULL pointer dereference, address: 00000000000000c0
      [ 1521.394189] #PF: supervisor read access in kernel mode
      [ 1521.395376] #PF: error_code(0x0000) - not-present page
      [ 1521.396607] PGD 0 P4D 0
      [ 1521.397156] Oops: 0000 [#1] SMP PTI
      [ 1521.398020] CPU: 0 PID: 22986 Comm: kworker/0:2 Not tainted 5.8.0-rc4+ #109
      [ 1521.399618] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
      [ 1521.401728] Workqueue: events mptcp_worker
      [ 1521.402651] RIP: 0010:mptcp_subflow_create_socket+0xf1/0x1c0
      [ 1521.403954] Code: 24 08 89 44 24 04 48 8b 7a 18 e8 2a 48 d4 ff 8b 44 24 04 85 c0 75 7a 48 8b 8b 78 02 00 00 48 8b 54 24 08 48 8d bb 80 00 00 00 <48> 8b 89 c0 00 00 00 48 89 8a c0 00 00 00 48 8b 8b 78 02 00 00 8b
      [ 1521.408201] RSP: 0000:ffffabc4002d3c60 EFLAGS: 00010246
      [ 1521.409433] RAX: 0000000000000000 RBX: ffffa0b9ad8c9a00 RCX: 0000000000000000
      [ 1521.411096] RDX: ffffa0b9ae78a300 RSI: 00000000fffffe01 RDI: ffffa0b9ad8c9a80
      [ 1521.412734] RBP: ffffa0b9adff2e80 R08: ffffa0b9af02d640 R09: ffffa0b9ad923a00
      [ 1521.414333] R10: ffffabc4007139f8 R11: fefefefefefefeff R12: ffffabc4002d3cb0
      [ 1521.415918] R13: ffffa0b9ad91fa58 R14: ffffa0b9ad8c9f9c R15: 0000000000000000
      [ 1521.417592] FS:  0000000000000000(0000) GS:ffffa0b9af000000(0000) knlGS:0000000000000000
      [ 1521.419490] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 1521.420839] CR2: 00000000000000c0 CR3: 000000002951e006 CR4: 0000000000160ef0
      [ 1521.422511] Call Trace:
      [ 1521.423103]  __mptcp_subflow_connect+0x94/0x1f0
      [ 1521.425376]  mptcp_pm_create_subflow_or_signal_addr+0x200/0x2a0
      [ 1521.426736]  mptcp_worker+0x31b/0x390
      [ 1521.431324]  process_one_work+0x1fc/0x3f0
      [ 1521.432268]  worker_thread+0x2d/0x3b0
      [ 1521.434197]  kthread+0x117/0x130
      [ 1521.435783]  ret_from_fork+0x22/0x30
      
      on some unconventional configuration.
      
      The MPTCP protocol is trying to create a subflow for an
      unaccepted server socket. That is allowed by the RFC, even
      if subflow creation will likely fail.
      Unaccepted sockets have still a NULL sk_socket field,
      avoid the issue by failing earlier.
      
      Reported-and-tested-by: default avatarNicolas Rybowski <nicolas.rybowski@tessares.net>
      Fixes: 7d14b0d2
      
       ("mptcp: set correct vfs info for subflows")
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      adf73410