1. 10 1月, 2018 3 次提交
  2. 09 1月, 2018 1 次提交
  3. 06 1月, 2018 10 次提交
  4. 05 1月, 2018 26 次提交
    • T
      x86/pti: Rename BUG_CPU_INSECURE to BUG_CPU_MELTDOWN · de791821
      Thomas Gleixner 提交于
      Use the name associated with the particular attack which needs page table
      isolation for mitigation.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NDavid Woodhouse <dwmw@amazon.co.uk>
      Cc: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
      Cc: Jiri Koshina <jikos@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Andi Lutomirski  <luto@amacapital.net>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Turner <pjt@google.com>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: Greg KH <gregkh@linux-foundation.org>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Kees Cook <keescook@google.com>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801051525300.1724@nanos
      de791821
    • D
      x86/alternatives: Add missing '\n' at end of ALTERNATIVE inline asm · b9e705ef
      David Woodhouse 提交于
      Where an ALTERNATIVE is used in the middle of an inline asm block, this
      would otherwise lead to the following instruction being appended directly
      to the trailing ".popsection", and a failed compile.
      
      Fixes: 9cebed42 ("x86, alternative: Use .pushsection/.popsection")
      Signed-off-by: NDavid Woodhouse <dwmw@amazon.co.uk>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: gnomes@lxorguk.ukuu.org.uk
      Cc: Rik van Riel <riel@redhat.com>
      Cc: ak@linux.intel.com
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Turner <pjt@google.com>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Kees Cook <keescook@google.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/20180104143710.8961-8-dwmw@amazon.co.uk
      b9e705ef
    • S
      mfd: rtsx: Release IRQ during shutdown · 107b7d9f
      Sinan Kaya 提交于
      'Commit cc27b735 ("PCI/portdrv: Turn off PCIe services during
      shutdown")' revealed a resource leak in rtsx_pci driver during shutdown.
      
      Issue shows up as a warning during shutdown as follows:
      
      remove_proc_entry: removing non-empty directory 'irq/17', leaking at least
      'rtsx_pci'
      WARNING: CPU: 0 PID: 1578 at fs/proc/generic.c:572
      remove_proc_entry+0x11d/0x130
      Modules linked in <long list but none that are out-of-tree>
      ...
      Call Trace:
      unregister_irq_proc
      free_desc
      irq_free_descs
      mp_unmap_irq
      acpi_unregister_gsi_apic
      acpi_pci_irq_disable
      do_pci_disable_device
      pci_disable_device
      device_shutdown
      kernel_restart
      Sys_reboot
      
      Even though rtsx_pci driver implements a shutdown callback, it is not
      releasing the interrupt that it registered during probe. This is causing
      the ACPI layer to complain that the shared IRQ is in use while freeing
      IRQ.
      
      This code releases the IRQ to prevent resource leak and eliminate the
      warning.
      
      Fixes: cc27b735 ("PCI/portdrv: Turn off PCIe services during shutdown")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=198141Reported-by: NChris Clayton <chris2553@googlemail.com>
      Signed-off-by: NSinan Kaya <okaya@codeaurora.org>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      107b7d9f
    • L
      Merge tag 'drm-fixes-for-v4.15-rc7' of git://people.freedesktop.org/~airlied/linux · 5866bec2
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "Just collecting some fixes to finish my hoildays :-).
      
        A few fixes for i915 (one documentation build fix), one ttm fix, one
        AMD display fix, one omapdrm fix, and a set of armada fixes from
        Russell.
      
        All seem pretty small, you can now return to your latest security news
        site"
      
      * tag 'drm-fixes-for-v4.15-rc7' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: Apply Display WA #1183 on skl, kbl, and cfl
        drm/ttm: check the return value of kzalloc
        drm/amd/display: call set csc_default if enable adjustment is false
        docs: fix, intel_guc_loader.c has been moved to intel_guc_fw.c
        omapdrm/dss/hdmi4_cec: fix interrupt handling
        documentation/gpu/i915: fix docs build error after file rename
        drm/i915: Put all non-blocking modesets onto an ordered wq
        drm/i915: Disable DC states around GMBUS on GLK
        drm/i915/psr: Fix register name mess up.
        drm/armada: fix YUV planar format framebuffer offsets
        drm/armada: improve efficiency of armada_drm_plane_calc_addrs()
        drm/armada: fix UV swap code
        drm/armada: fix SRAM powerdown
        drm/armada: fix leak of crtc structure
      5866bec2
    • J
      mailmap: update Mark Yao's email address · 9a0e7120
      Jeffy Chen 提交于
      Change the previous employers email addresses to the current email
      address.
      
      Link: http://lkml.kernel.org/r/20171229121726.31589-1-jeffy.chen@rock-chips.comSigned-off-by: NJeffy Chen <jeffy.chen@rock-chips.com>
      Acked-by: NMartin Kepplinger <martink@posteo.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9a0e7120
    • A
      userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails · 0cbb4b4f
      Andrea Arcangeli 提交于
      The previous fix in commit 384632e6 ("userfaultfd: non-cooperative:
      fix fork use after free") corrected the refcounting in case of
      UFFD_EVENT_FORK failure for the fork userfault paths.
      
      That still didn't clear the vma->vm_userfaultfd_ctx of the vmas that
      were set to point to the aborted new uffd ctx earlier in
      dup_userfaultfd.
      
      Link: http://lkml.kernel.org/r/20171223002505.593-2-aarcange@redhat.comSigned-off-by: NAndrea Arcangeli <aarcange@redhat.com>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Reviewed-by: NMike Rapoport <rppt@linux.vnet.ibm.com>
      Cc: Eric Biggers <ebiggers3@gmail.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0cbb4b4f
    • B
      mm/sparse.c: wrong allocation for mem_section · d09cfbbf
      Baoquan He 提交于
      In commit 83e3c487 ("mm/sparsemem: Allocate mem_section at runtime
      for CONFIG_SPARSEMEM_EXTREME=y") mem_section is allocated at runtime to
      save memory.
      
      It allocates the first dimension of array with sizeof(struct mem_section).
      
      It costs extra memory, should be sizeof(struct mem_section *).
      
      Fix it.
      
      Link: http://lkml.kernel.org/r/1513932498-20350-1-git-send-email-bhe@redhat.com
      Fixes: 83e3c487 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y")
      Signed-off-by: NBaoquan He <bhe@redhat.com>
      Tested-by: NDave Young <dyoung@redhat.com>
      Acked-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d09cfbbf
    • S
      mm/zsmalloc.c: include fs.h · cdc346b3
      Sergey Senozhatsky 提交于
      `struct file_system_type' and alloc_anon_inode() function are defined in
      fs.h, include it directly.
      
      Link: http://lkml.kernel.org/r/20171219104219.3017-1-sergey.senozhatsky@gmail.comSigned-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cdc346b3
    • M
      mm/debug.c: provide useful debugging information for VM_BUG · 152a2d19
      Matthew Wilcox 提交于
      With the recent addition of hashed kernel pointers, places which need to
      produce useful debug output have to specify %px, not %p.  This patch
      fixes all the VM debug to use %px.  This is appropriate because it's
      debug output that the user should never be able to trigger, and kernel
      developers need to see the actual pointers.
      
      Link: http://lkml.kernel.org/r/20171219133236.GE13680@bombadil.infradead.orgSigned-off-by: NMatthew Wilcox <mawilcox@microsoft.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Cc: "Tobin C. Harding" <me@tobin.cc>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      152a2d19
    • A
      kernel/exit.c: export abort() to modules · dc8635b7
      Andrew Morton 提交于
      gcc -fisolate-erroneous-paths-dereference can generate calls to abort()
      from modular code too.
      
      [arnd@arndb.de: drop duplicate exports of abort()]
        Link: http://lkml.kernel.org/r/20180102103311.706364-1-arnd@arndb.deReported-by: NVineet Gupta <Vineet.Gupta1@synopsys.com>
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Jose Abreu <Jose.Abreu@synopsys.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dc8635b7
    • A
      mm/mprotect: add a cond_resched() inside change_pmd_range() · 4991c09c
      Anshuman Khandual 提交于
      While testing on a large CPU system, detected the following RCU stall
      many times over the span of the workload.  This problem is solved by
      adding a cond_resched() in the change_pmd_range() function.
      
        INFO: rcu_sched detected stalls on CPUs/tasks:
         154-....: (670 ticks this GP) idle=022/140000000000000/0 softirq=2825/2825 fqs=612
         (detected by 955, t=6002 jiffies, g=4486, c=4485, q=90864)
        Sending NMI from CPU 955 to CPUs 154:
        NMI backtrace for cpu 154
        CPU: 154 PID: 147071 Comm: workload Not tainted 4.15.0-rc3+ #3
        NIP:  c0000000000b3f64 LR: c0000000000b33d4 CTR: 000000000000aa18
        REGS: 00000000a4b0fb44 TRAP: 0501   Not tainted  (4.15.0-rc3+)
        MSR:  8000000000009033 <SF,EE,ME,IR,DR,RI,LE>  CR: 22422082  XER: 00000000
        CFAR: 00000000006cf8f0 SOFTE: 1
        GPR00: 0010000000000000 c00003ef9b1cb8c0 c0000000010cc600 0000000000000000
        GPR04: 8e0000018c32b200 40017b3858fd6e00 8e0000018c32b208 40017b3858fd6e00
        GPR08: 8e0000018c32b210 40017b3858fd6e00 8e0000018c32b218 40017b3858fd6e00
        GPR12: ffffffffffffffff c00000000fb25100
        NIP [c0000000000b3f64] plpar_hcall9+0x44/0x7c
        LR [c0000000000b33d4] pSeries_lpar_flush_hash_range+0x384/0x420
        Call Trace:
          flush_hash_range+0x48/0x100
          __flush_tlb_pending+0x44/0xd0
          hpte_need_flush+0x408/0x470
          change_protection_range+0xaac/0xf10
          change_prot_numa+0x30/0xb0
          task_numa_work+0x2d0/0x3e0
          task_work_run+0x130/0x190
          do_notify_resume+0x118/0x120
          ret_from_except_lite+0x70/0x74
        Instruction dump:
        60000000 f8810028 7ca42b78 7cc53378 7ce63b78 7d074378 7d284b78 7d495378
        e9410060 e9610068 e9810070 44000022 <7d806378> e9810028 f88c0000 f8ac0008
      
      Link: http://lkml.kernel.org/r/20171214140551.5794-1-khandual@linux.vnet.ibm.comSigned-off-by: NAnshuman Khandual <khandual@linux.vnet.ibm.com>
      Suggested-by: NNicholas Piggin <npiggin@gmail.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4991c09c
    • O
      kernel/acct.c: fix the acct->needcheck check in check_free_space() · 4d957015
      Oleg Nesterov 提交于
      As Tsukada explains, the time_is_before_jiffies(acct->needcheck) check
      is very wrong, we need time_is_after_jiffies() to make sys_acct() work.
      
      Ignoring the overflows, the code should "goto out" if needcheck >
      jiffies, while currently it checks "needcheck < jiffies" and thus in the
      likely case check_free_space() does nothing until jiffies overflow.
      
      In particular this means that sys_acct() is simply broken, acct_on()
      sets acct->needcheck = jiffies and expects that check_free_space()
      should set acct->active = 1 after the free-space check, but this won't
      happen if jiffies increments in between.
      
      This was broken by commit 32dc7308 ("get rid of timer in
      kern/acct.c") in 2011, then another (correct) commit 795a2f22
      ("acct() should honour the limits from the very beginning") made the
      problem more visible.
      
      Link: http://lkml.kernel.org/r/20171213133940.GA6554@redhat.com
      Fixes: 32dc7308 ("get rid of timer in kern/acct.c")
      Reported-by: NTSUKADA Koutaro <tsukada@ascade.co.jp>
      Suggested-by: NTSUKADA Koutaro <tsukada@ascade.co.jp>
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4d957015
    • D
      mm: check pfn_valid first in zero_resv_unavail · e8c24773
      Dave Young 提交于
      With latest kernel I get below bug while testing kdump:
      
        BUG: unable to handle kernel paging request at ffffea00034b1040
        IP: zero_resv_unavail+0xbd/0x126
        PGD 37b98067 P4D 37b98067 PUD 37b97067 PMD 0
        Oops: 0002 [#1] SMP
        Modules linked in:
        CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.0-rc1+ #316
        Hardware name: LENOVO 20ARS1BJ02/20ARS1BJ02, BIOS GJET92WW (2.42 ) 03/03/2017
        task: ffffffff81a0e4c0 task.stack: ffffffff81a00000
        RIP: 0010:zero_resv_unavail+0xbd/0x126
        RSP: 0000:ffffffff81a03d88 EFLAGS: 00010006
        RAX: 0000000000000000 RBX: ffffea00034b1040 RCX: 0000000000000010
        RDX: 0000000000000000 RSI: 0000000000000092 RDI: ffffea00034b1040
        RBP: 00000000000d2c41 R08: 00000000000000c0 R09: 0000000000000a0d
        R10: 0000000000000002 R11: 0000000000007f01 R12: ffffffff81a03d90
        R13: ffffea0000000000 R14: 0000000000000063 R15: 0000000000000062
        FS:  0000000000000000(0000) GS:ffffffff81c73000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: ffffea00034b1040 CR3: 0000000037609000 CR4: 00000000000606b0
        Call Trace:
         ? free_area_init_nodes+0x640/0x664
         ? zone_sizes_init+0x58/0x72
         ? setup_arch+0xb50/0xc6c
         ? start_kernel+0x64/0x43d
         ? secondary_startup_64+0xa5/0xb0
        Code: c1 e8 0c 48 39 d8 76 27 48 89 de 48 c1 e3 06 48 c7 c7 7a 87 79 81 e8 b0 c0 3e ff 4c 01 eb b9 10 00 00 00 31 c0 48 89 df 49 ff c6 <f3> ab eb bc 6a 00 49 c7 c0 f0 93 d1 81 31 d2 83 ce ff 41 54 49
        RIP: zero_resv_unavail+0xbd/0x126 RSP: ffffffff81a03d88
        CR2: ffffea00034b1040
        ---[ end trace f5ba9e8f73c7ee26 ]---
      
      This is introduced by commit a4a3ede2 ("mm: zero reserved and
      unavailable struct pages").
      
      The reason is some efi reserved boot ranges is not reported in E820 ram.
      In my case it is a bgrt buffer:
      
        efi: mem00: [Boot Data          |RUN|  |  |  |  |  |  |   |WB|WT|WC|UC] range=[0x00000000d2c41000-0x00000000d2c85fff] (0MB)
      
      Use "add_efi_memmap" can workaround the problem with another fix:
      
        http://lkml.kernel.org/r/20171130052327.GA3500@dhcp-128-65.nay.redhat.com
      
      In zero_resv_unavail it would be better to check pfn_valid first before
      zero the page struct.  This fixes the problem and potential other
      similar problems.  Also as Pavel Tatashin suggested checks pfn_valid at
      the beginning of the section.
      
      The range is backed by real memory.  The memory range is efi "Boot
      Service Data", that means after ExitBootServices() these ranges can be
      used as system ram.  But some of them need to be reserved, for example
      the bgrt image address in an acpi table, if the image memory is freed
      then kexec reboot will fail because kexec inherit same acpi table to
      initialize the driver.
      
      Link: http://lkml.kernel.org/r/20171201095048.GA3084@dhcp-128-65.nay.redhat.com
      Fixes: a4a3ede2 ("mm: zero reserved and unavailable struct pages")
      Signed-off-by: NDave Young <dyoung@redhat.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8c24773
    • T
      x86/tlb: Drop the _GPL from the cpu_tlbstate export · 1e547681
      Thomas Gleixner 提交于
      The recent changes for PTI touch cpu_tlbstate from various tlb_flush
      inlines. cpu_tlbstate is exported as GPL symbol, so this causes a
      regression when building out of tree drivers for certain graphics cards.
      
      Aside of that the export was wrong since it was introduced as it should
      have been EXPORT_PER_CPU_SYMBOL_GPL().
      
      Use the correct PER_CPU export and drop the _GPL to restore the previous
      state which allows users to utilize the cards they payed for.
      
      As always I'm really thrilled to make this kind of change to support the
      #friends (or however the hot hashtag of today is spelled) from that closet
      sauce graphics corp.
      
      Fixes: 1e02ce4c ("x86: Store a per-cpu shadow copy of CR4")
      Fixes: 6fd166aa ("x86/mm: Use/Fix PCID to optimize user/kernel switches")
      Reported-by: NKees Cook <keescook@google.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: stable@vger.kernel.org
      1e547681
    • P
      x86/events/intel/ds: Use the proper cache flush method for mapping ds buffers · 42f3bdc5
      Peter Zijlstra 提交于
      Thomas reported the following warning:
      
       BUG: using smp_processor_id() in preemptible [00000000] code: ovsdb-server/4498
       caller is native_flush_tlb_single+0x57/0xc0
       native_flush_tlb_single+0x57/0xc0
       __set_pte_vaddr+0x2d/0x40
       set_pte_vaddr+0x2f/0x40
       cea_set_pte+0x30/0x40
       ds_update_cea.constprop.4+0x4d/0x70
       reserve_ds_buffers+0x159/0x410
       x86_reserve_hardware+0x150/0x160
       x86_pmu_event_init+0x3e/0x1f0
       perf_try_init_event+0x69/0x80
       perf_event_alloc+0x652/0x740
       SyS_perf_event_open+0x3f6/0xd60
       do_syscall_64+0x5c/0x190
      
      set_pte_vaddr is used to map the ds buffers into the cpu entry area, but
      there are two problems with that:
      
       1) The resulting flush is not supposed to be called in preemptible context
      
       2) The cpu entry area is supposed to be per CPU, but the debug store
          buffers are mapped for all CPUs so these mappings need to be flushed
          globally.
      
      Add the necessary preemption protection across the mapping code and flush
      TLBs globally.
      
      Fixes: c1961a46 ("x86/events/intel/ds: Map debug buffers in cpu_entry_area")
      Reported-by: NThomas Zeitlhofer <thomas.zeitlhofer+lkml@ze-it.at>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NThomas Zeitlhofer <thomas.zeitlhofer+lkml@ze-it.at>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/20180104170712.GB3040@hirez.programming.kicks-ass.net
      42f3bdc5
    • T
      x86/kaslr: Fix the vaddr_end mess · 1dddd251
      Thomas Gleixner 提交于
      vaddr_end for KASLR is only documented in the KASLR code itself and is
      adjusted depending on config options. So it's not surprising that a change
      of the memory layout causes KASLR to have the wrong vaddr_end. This can map
      arbitrary stuff into other areas causing hard to understand problems.
      
      Remove the whole ifdef magic and define the start of the cpu_entry_area to
      be the end of the KASLR vaddr range.
      
      Add documentation to that effect.
      
      Fixes: 92a0f81d ("x86/cpu_entry_area: Move it out of the fixmap")
      Reported-by: NBenjamin Gilbert <benjamin.gilbert@coreos.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NBenjamin Gilbert <benjamin.gilbert@coreos.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable <stable@vger.kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Garnier <thgarnie@google.com>,
      Cc: Alexander Kuleshov <kuleshovmail@gmail.com>
      Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801041320360.1771@nanos
      1dddd251
    • D
      Merge tag 'drm-intel-fixes-2018-01-04' of... · bc6fe533
      Dave Airlie 提交于
      Merge tag 'drm-intel-fixes-2018-01-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v4.15-rc7
      - couple of documentation build fixes
      - serialize non-blocking modesets
      - prevent DMC from messing up GMBUS transfers
      - PSR regression fix
      
      * tag 'drm-intel-fixes-2018-01-04' of git://anongit.freedesktop.org/drm/drm-intel:
        drm/i915: Apply Display WA #1183 on skl, kbl, and cfl
        docs: fix, intel_guc_loader.c has been moved to intel_guc_fw.c
        documentation/gpu/i915: fix docs build error after file rename
        drm/i915: Put all non-blocking modesets onto an ordered wq
        drm/i915: Disable DC states around GMBUS on GLK
        drm/i915/psr: Fix register name mess up.
      bc6fe533
    • D
      Merge branch 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · 0007b9ca
      Dave Airlie 提交于
      - backport of a DC change which fixes a greenish tint on some RV hw
      - properly handle kzalloc fail in ttm
      
      * 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux:
        drm/ttm: check the return value of kzalloc
        drm/amd/display: call set csc_default if enable adjustment is false
      0007b9ca
    • D
      Merge branch 'drm-armada-fixes-4.15' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-fixes · dc042da0
      Dave Airlie 提交于
      Armada fixes.
      
      * 'drm-armada-fixes-4.15' of git://git.armlinux.org.uk/~rmk/linux-arm:
        drm/armada: fix YUV planar format framebuffer offsets
        drm/armada: improve efficiency of armada_drm_plane_calc_addrs()
        drm/armada: fix UV swap code
        drm/armada: fix SRAM powerdown
        drm/armada: fix leak of crtc structure
      dc042da0
    • D
      Merge tag 'omapdrm-4.15-fixes' of... · 041ea478
      Dave Airlie 提交于
      Merge tag 'omapdrm-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-fixes
      
      omapdrm fixes for 4.15
      
      * Fix OMAP4 HDMI CEC interrupt handling and a possible buffer overflow
      
      * tag 'omapdrm-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
        omapdrm/dss/hdmi4_cec: fix interrupt handling
      041ea478
    • T
      x86/mm: Map cpu_entry_area at the same place on 4/5 level · f2078904
      Thomas Gleixner 提交于
      There is no reason for 4 and 5 level pagetables to have a different
      layout. It just makes determining vaddr_end for KASLR harder than
      necessary.
      
      Fixes: 92a0f81d ("x86/cpu_entry_area: Move it out of the fixmap")
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Benjamin Gilbert <benjamin.gilbert@coreos.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable <stable@vger.kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Garnier <thgarnie@google.com>,
      Cc: Alexander Kuleshov <kuleshovmail@gmail.com>
      Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801041320360.1771@nanos
      f2078904
    • A
      x86/mm: Set MODULES_END to 0xffffffffff000000 · f5a40711
      Andrey Ryabinin 提交于
      Since f06bdd40 ("x86/mm: Adapt MODULES_END based on fixmap section size")
      kasan_mem_to_shadow(MODULES_END) could be not aligned to a page boundary.
      
      So passing page unaligned address to kasan_populate_zero_shadow() have two
      possible effects:
      
      1) It may leave one page hole in supposed to be populated area. After commit
        21506525 ("x86/kasan/64: Teach KASAN about the cpu_entry_area") that
        hole happens to be in the shadow covering fixmap area and leads to crash:
      
       BUG: unable to handle kernel paging request at fffffbffffe8ee04
       RIP: 0010:check_memory_region+0x5c/0x190
      
       Call Trace:
        <NMI>
        memcpy+0x1f/0x50
        ghes_copy_tofrom_phys+0xab/0x180
        ghes_read_estatus+0xfb/0x280
        ghes_notify_nmi+0x2b2/0x410
        nmi_handle+0x115/0x2c0
        default_do_nmi+0x57/0x110
        do_nmi+0xf8/0x150
        end_repeat_nmi+0x1a/0x1e
      
      Note, the crash likely disappeared after commit 92a0f81d, which
      changed kasan_populate_zero_shadow() call the way it was before
      commit 21506525.
      
      2) Attempt to load module near MODULES_END will fail, because
         __vmalloc_node_range() called from kasan_module_alloc() will hit the
         WARN_ON(!pte_none(*pte)) in the vmap_pte_range() and bail out with error.
      
      To fix this we need to make kasan_mem_to_shadow(MODULES_END) page aligned
      which means that MODULES_END should be 8*PAGE_SIZE aligned.
      
      The whole point of commit f06bdd40 was to move MODULES_END down if
      NR_CPUS is big, so the cpu_entry_area takes a lot of space.
      But since 92a0f81d ("x86/cpu_entry_area: Move it out of the fixmap")
      the cpu_entry_area is no longer in fixmap, so we could just set
      MODULES_END to a fixed 8*PAGE_SIZE aligned address.
      
      Fixes: f06bdd40 ("x86/mm: Adapt MODULES_END based on fixmap section size")
      Reported-by: NJakub Kicinski <kubakici@wp.pl>
      Signed-off-by: NAndrey Ryabinin <aryabinin@virtuozzo.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Thomas Garnier <thgarnie@google.com>
      Link: https://lkml.kernel.org/r/20171228160620.23818-1-aryabinin@virtuozzo.com
      f5a40711
    • L
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · e1915c81
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Arnd Bergmann:
       "Fixes this time include mostly device tree changes, as usual, the
        notable ones include:
      
         - A number of patches to fix most of the remaining DTC warnings that
           got introduced when DTC started warning about some obvious
           mistakes. We still have some remaining warnings that probably may
           have to wait until 4.16 to get fixed while we try to figure out
           what the correct contents should be.
      
         - On Allwinner A64, Ethernet PHYs need a fix after a mistake in
           coordination between patches merged through multiple branches.
      
         - Various fixes for PMICs on allwinner based boards
      
         - Two fixes for ethernet link detection on some Renesas machines
      
         - Two stability fixes for rockchip based boards
      
        Aside from device-tree, two other areas got fixes for older problems:
      
         - For TI Davinci DM365, a couple of fixes were needed to repair the
           MMC DMA engine support, apparently this has been broken for a
           while.
      
         - One important fix for all Allwinner chips with the PMIC driver as a
           loadable module"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits)
        arm64: dts: uniphier: fix gpio-ranges property of PXs3 SoC
        arm64: dts: renesas: ulcb: Remove renesas, no-ether-link property
        arm64: dts: renesas: salvator-x: Remove renesas, no-ether-link property
        ARM: dts: tango4: remove bogus interrupt-controller property
        ARM: dts: ls1021a: fix incorrect clock references
        ARM: dts: aspeed-g4: Correct VUART IRQ number
        ARM: dts: exynos: Enable Mixer node for Exynos5800 Peach Pi machine
        ARM: dts: sun8i: a711: Reinstate the PMIC compatible
        ARM: davinci: fix mmc entries in dm365's dma_slave_map
        ARM: dts: da850-lego-ev3: Fix battery voltage gpio
        ARM: davinci: Add dma_mask to dm365's eDMA device
        ARM: davinci: Use platform_device_register_full() to create pdev for dm365's eDMA
        arm64: dts: rockchip: limit rk3328-rock64 gmac speed to 100MBit for now
        arm64: dts: rockchip: remove vdd_log from rk3399-puma
        arm64: dts: orange-pi-zero-plus2: fix sdcard detect
        arm64: allwinner: a64-sopine: Fix to use dcdc1 regulator instead of vcc3v3
        ARM: dts: sunxi: Convert to CCU index macros for HDMI controller
        sunxi-rsb: Include OF based modalias in device uevent
        ARM: dts: at91: disable the nxp,se97b SMBUS timeout on the TSE-850
        arm64: dts: rockchip: fix trailing 0 in rk3328 tsadc interrupts
        ...
      e1915c81
    • M
      arm64: dts: uniphier: fix gpio-ranges property of PXs3 SoC · abb62c46
      Masahiro Yamada 提交于
      This is probably a copy-paste mistake.  The gpio-ranges of PXs3 is
      different from that of LD20.
      
      Fixes: 277b51e7 ("arm64: dts: uniphier: add GPIO controller nodes")
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      abb62c46
    • A
      Merge tag 'sunxi-fixes-for-4.15' of... · d84baa5a
      Arnd Bergmann 提交于
      Merge tag 'sunxi-fixes-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes
      
      Pull "Allwinner fixes for 4.15" from Chen-Yu Tsai:
      
      First, one fix that adds proper regulator references for the EMAC
      external PHYs on A64 boards. The EMAC bindings were developed for 4.13,
      but reverted at the last minute. They were finalized and brought back
      for 4.15. However in the time between, regulator support for the A64
      boards was merged. When EMAC device tree changes were reintroduced,
      this was not taken into account.
      
      Second, a patch that adds OF based modalias uevent for RSB slave devices.
      This has been missing since the introduction of RSB, and recently with
      PMIC regulator support introduced for the A64, has been seen affecting
      distributions, which have the all-important PMIC mfd drivers built as
      modules, which then don't get loaded.
      
      Other minor cleanups include final conversion of raw indices to CCU
      binding macros for sun[4567]i HDMI, cleanup of dummy regulators on the
      A64 SOPINE, a SD card detection polarity fix for the Orange Pi Zero
      Plus2, and adding a missing compatible for the PMIC on the TBS A711
      tablet.
      
      * tag 'sunxi-fixes-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
        ARM: dts: sun8i: a711: Reinstate the PMIC compatible
        arm64: dts: orange-pi-zero-plus2: fix sdcard detect
        arm64: allwinner: a64-sopine: Fix to use dcdc1 regulator instead of vcc3v3
        ARM: dts: sunxi: Convert to CCU index macros for HDMI controller
        sunxi-rsb: Include OF based modalias in device uevent
        arm64: allwinner: a64: add Ethernet PHY regulator for several boards
      d84baa5a
    • A
      Merge tag 'renesas-fixes-for-v4.15' of... · 3bfbed8d
      Arnd Bergmann 提交于
      Merge tag 'renesas-fixes-for-v4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes
      
      Pull "Renesas ARM Based SoC Fixes for v4.15" from Simon Horman:
      
      Vladimir Zapolskiy says:
      
      The present change is a bug fix for AVB link iteratively up/down.
      
      Steps to reproduce:
      - start AVB TX stream (Using aplay via MSE),
      - disconnect+reconnect the eth cable,
      - after a reconnection the eth connection goes iteratively up/down
        without user interaction,
      - this may heal after some seconds or even stay for minutes.
      
      As the documentation specifies, the "renesas,no-ether-link" option
      should be used when a board does not provide a proper AVB_LINK signal.
      There is no need for this option enabled on RCAR H3/M3 Salvator-X/XS
      and ULCB starter kits since the AVB_LINK is correctly handled by HW.
      
      Choosing to keep or remove the "renesas,no-ether-link" option will
      have impact on the code flow in the following ways:
      - keeping this option enabled may lead to unexpected behavior since
        the RX & TX are enabled/disabled directly from adjust_link function
        without any HW interrogation,
      - removing this option, the RX & TX will only be enabled/disabled after
        HW interrogation. The HW check is made through the LMON pin in PSR
        register which specifies AVB_LINK signal value (0 - at low level;
        1 - at high level).
      
      In conclusion, the change is also a safety improvement because it
      removes the "renesas,no-ether-link" option leading to a proper way
      of detecting the link state based on HW interrogation and not on
      software heuristic.
      
      Note that DTS files for V3M Starter Kit, Draak and Eagle boards
      contain the same property, the files are untouched due to unavailable
      schematics to verify if the fix applies to these boards as well.
      
      * tag 'renesas-fixes-for-v4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
        arm64: dts: renesas: ulcb: Remove renesas, no-ether-link property
        arm64: dts: renesas: salvator-x: Remove renesas, no-ether-link property
      3bfbed8d