1. 07 1月, 2020 1 次提交
    • H
      powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online() · 3aa3c588
      Harry Pan 提交于
      RAPL MMIO support depends on the RAPL common driver.  During CPU
      initialization rapl_mmio_cpu_online() is called via CPU hotplug
      to initialize the MMIO RAPL for the new CPU, but if that CPU is
      not present in the common RAPL driver's support list, rapl_defaults
      is NULL and the kernel crashes on an attempt to dereference it:
      
      [    4.188566] BUG: kernel NULL pointer dereference, address: 0000000000000020
      ...snip...
      [    4.189555] RIP: 0010:rapl_add_package+0x223/0x574
      [    4.189555] Code: b5 a0 31 c0 49 8b 4d 78 48 01 d9 48 8b 0c c1 49 89 4c c6 10 48 ff c0 48 83 f8 05 75 e7 49 83 ff 03 75 15 48 8b 05 09 bc 18 01 <8b> 70 20 41 89 b6 0c 05 00 00 85 f6 75 1a 49 81 c6 18 9
      [    4.189555] RSP: 0000:ffffb3adc00b3d90 EFLAGS: 00010246
      [    4.189555] RAX: 0000000000000000 RBX: 0000000000000098 RCX: 0000000000000000
      [    4.267161] usb 1-1: New USB device found, idVendor=2109, idProduct=2812, bcdDevice= b.e0
      [    4.189555] RDX: 0000000000001000 RSI: 0000000000000000 RDI: ffff9340caafd000
      [    4.189555] RBP: ffffb3adc00b3df8 R08: ffffffffa0246e28 R09: ffff9340caafc000
      [    4.189555] R10: 000000000000024a R11: ffffffff9ff1f6f2 R12: 00000000ffffffed
      [    4.189555] R13: ffff9340caa94800 R14: ffff9340caafc518 R15: 0000000000000003
      [    4.189555] FS:  0000000000000000(0000) GS:ffff9340ce200000(0000) knlGS:0000000000000000
      [    4.189555] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [    4.189555] CR2: 0000000000000020 CR3: 0000000302c14001 CR4: 00000000003606f0
      [    4.189555] Call Trace:
      [    4.189555]  ? __switch_to_asm+0x40/0x70
      [    4.189555]  rapl_mmio_cpu_online+0x47/0x64
      [    4.189555]  ? rapl_mmio_write_raw+0x33/0x33
      [    4.281059] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
      [    4.189555]  cpuhp_invoke_callback+0x29f/0x66f
      [    4.189555]  ? __schedule+0x46d/0x6a0
      [    4.189555]  cpuhp_thread_fun+0xb9/0x11c
      [    4.189555]  smpboot_thread_fn+0x17d/0x22f
      [    4.297006] usb 1-1: Product: USB2.0 Hub
      [    4.189555]  ? cpu_report_death+0x43/0x43
      [    4.189555]  kthread+0x137/0x13f
      [    4.189555]  ? cpu_report_death+0x43/0x43
      [    4.189555]  ? kthread_blkcg+0x2e/0x2e
      [    4.312951] usb 1-1: Manufacturer: VIA Labs, Inc.
      [    4.189555]  ret_from_fork+0x1f/0x40
      [    4.189555] Modules linked in:
      [    4.189555] CR2: 0000000000000020
      [    4.189555] ---[ end trace 01bb812aabc791f4 ]---
      
      To avoid that problem, check rapl_defaults NULL upfront and return an
      error code if it is NULL.  [Note that it does not make sense to even
      try to allocate memory in that case, because it is not going to be
      used anyway.]
      
      Fixes: 555c45fe ("int340X/processor_thermal_device: add support for MMIO RAPL")
      Cc: 5.3+ <stable@vger.kernel.org> # 5.3+
      Signed-off-by: NHarry Pan <harry.pan@intel.com>
      [ rjw: Subject & changelog ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3aa3c588
  2. 04 11月, 2019 2 次提交
  3. 28 8月, 2019 4 次提交
  4. 22 7月, 2019 1 次提交
  5. 11 7月, 2019 16 次提交
  6. 05 6月, 2019 1 次提交
    • T
      treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 309 · f6cc69f1
      Thomas Gleixner 提交于
      Based on 2 normalized pattern(s):
      
        it and or modify it under the terms of the gnu general public
        license version 2 as published by the free software foundation this
        program is distributed in the hope it will be useful but without any
        warranty without even the implied warranty of merchantability or
        fitness for a particular purpose see the gnu general public license
        for more details you should have received a copy of the gnu general
        public license along with this program
      
        this program is free software you can redistribute it and or modify
        it under the terms and conditions of the gnu general public license
        version 2 as published by the free software foundation this program
        is distributed in the hope it will be useful but without any
        warranty without even the implied warranty of merchantability or
        fitness for a particular purpose see the gnu general public license
        for more details you should have received a copy of the gnu general
        public license along with this program
      
      extracted by the scancode license scanner the SPDX license identifier
      
        GPL-2.0-only
      
      has been chosen to replace the boilerplate/reference in 11 file(s).
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NAlexios Zavras <alexios.zavras@intel.com>
      Reviewed-by: NAllison Randal <allison@lohutok.net>
      Cc: linux-spdx@vger.kernel.org
      Link: https://lkml.kernel.org/r/20190530000434.249870634@linutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f6cc69f1
  7. 23 5月, 2019 3 次提交
  8. 18 2月, 2019 1 次提交
  9. 13 2月, 2019 1 次提交
  10. 02 10月, 2018 1 次提交
    • P
      x86/cpu: Sanitize FAM6_ATOM naming · f2c4db1b
      Peter Zijlstra 提交于
      Going primarily by:
      
        https://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors
      
      with additional information gleaned from other related pages; notably:
      
       - Bonnell shrink was called Saltwell
       - Moorefield is the Merriefield refresh which makes it Airmont
      
      The general naming scheme is: FAM6_ATOM_UARCH_SOCTYPE
      
        for i in `git grep -l FAM6_ATOM` ; do
      	sed -i  -e 's/ATOM_PINEVIEW/ATOM_BONNELL/g'		\
      		-e 's/ATOM_LINCROFT/ATOM_BONNELL_MID/'		\
      		-e 's/ATOM_PENWELL/ATOM_SALTWELL_MID/g'		\
      		-e 's/ATOM_CLOVERVIEW/ATOM_SALTWELL_TABLET/g'	\
      		-e 's/ATOM_CEDARVIEW/ATOM_SALTWELL/g'		\
      		-e 's/ATOM_SILVERMONT1/ATOM_SILVERMONT/g'	\
      		-e 's/ATOM_SILVERMONT2/ATOM_SILVERMONT_X/g'	\
      		-e 's/ATOM_MERRIFIELD/ATOM_SILVERMONT_MID/g'	\
      		-e 's/ATOM_MOOREFIELD/ATOM_AIRMONT_MID/g'	\
      		-e 's/ATOM_DENVERTON/ATOM_GOLDMONT_X/g'		\
      		-e 's/ATOM_GEMINI_LAKE/ATOM_GOLDMONT_PLUS/g' ${i}
        done
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: dave.hansen@linux.intel.com
      Cc: len.brown@intel.com
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      f2c4db1b
  11. 10 9月, 2018 1 次提交
  12. 19 3月, 2018 1 次提交
  13. 17 1月, 2018 1 次提交
  14. 10 1月, 2018 1 次提交
  15. 28 6月, 2017 1 次提交
  16. 29 4月, 2017 1 次提交
  17. 01 12月, 2016 1 次提交
  18. 29 11月, 2016 1 次提交
  19. 25 11月, 2016 1 次提交