1. 19 1月, 2018 1 次提交
  2. 19 12月, 2017 1 次提交
  3. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  4. 21 10月, 2017 1 次提交
  5. 20 10月, 2017 1 次提交
  6. 19 10月, 2017 1 次提交
  7. 12 10月, 2017 1 次提交
  8. 14 9月, 2017 1 次提交
  9. 02 9月, 2017 1 次提交
  10. 31 8月, 2017 1 次提交
  11. 15 8月, 2017 3 次提交
  12. 11 8月, 2017 1 次提交
  13. 04 8月, 2017 1 次提交
    • L
      treewide: Consolidate Apple DMI checks · 630b3aff
      Lukas Wunner 提交于
      We're about to amend ACPI bus scan with DMI checks whether we're running
      on a Mac to support Apple device properties in AML.  The DMI checks are
      performed for every single device, adding overhead for everything x86
      that isn't Apple, which is the majority.  Rafael and Andy therefore
      request to perform the DMI match only once and cache the result.
      
      Outside of ACPI various other Apple DMI checks exist and it seems
      reasonable to use the cached value there as well.  Rafael, Andy and
      Darren suggest performing the DMI check in arch code and making it
      available with a header in include/linux/platform_data/x86/.
      
      To this end, add early_platform_quirks() to arch/x86/kernel/quirks.c
      to perform the DMI check and invoke it from setup_arch().  Switch over
      all existing Apple DMI checks, thereby fixing two deficiencies:
      
      * They are now #defined to false on non-x86 arches and can thus be
        optimized away if they're located in cross-arch code.
      
      * Some of them only match "Apple Inc." but not "Apple Computer, Inc.",
        which is used by BIOSes released between January 2006 (when the first
        x86 Macs started shipping) and January 2007 (when the company name
        changed upon introduction of the iPhone).
      Suggested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Suggested-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Suggested-by: NDarren Hart <dvhart@infradead.org>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      630b3aff
  14. 01 8月, 2017 2 次提交
  15. 01 7月, 2017 1 次提交
  16. 14 6月, 2017 1 次提交
  17. 13 6月, 2017 1 次提交
  18. 25 4月, 2017 1 次提交
  19. 20 4月, 2017 2 次提交
  20. 18 4月, 2017 1 次提交
    • J
      PCI: Avoid generating invalid ThunderX2 DMA aliases · 45a23293
      Jayachandran C 提交于
      On Cavium ThunderX2 arm64 SoCs (formerly known as Broadcom Vulcan), the PCI
      topology is slightly unusual.  For a multi-node system, it looks like:
      
          00:00.0 PCI bridge to [bus 01-1e]
          01:0a.0 PCI-to-PCIe bridge to [bus 02-04]
          02:00.0 PCIe Root Port bridge to [bus 03-04] (XLATE_ROOT)
          03:00.0 PCIe Endpoint
      
      pci_for_each_dma_alias() assumes IOMMU translation is done at the root of
      the PCI hierarchy.  It generates 03:00.0, 01:0a.0, and 00:00.0 as DMA
      aliases for 03:00.0 because buses 01 and 00 are non-PCIe buses that don't
      carry the Requester ID.
      
      Because the ThunderX2 IOMMU is at 02:00.0, the Requester IDs 01:0a.0 and
      00:00.0 are never valid for the endpoint.  This quirk stops alias
      generation at the XLATE_ROOT bridge so we won't generate 01:0a.0 or
      00:00.0.
      
      The current IOMMU code only maps the last alias (this is a separate bug in
      itself).  Prior to this quirk, we only created IOMMU mappings for the
      invalid Requester ID 00:00:0, which never matched any DMA transactions.
      
      With this quirk, we create IOMMU mappings for a valid Requester ID, which
      fixes devices with no aliases but leaves devices with aliases still broken.
      
      The last alias for the endpoint is also used by the ARM GICv3 MSI-X code.
      Without this quirk, the GIC Interrupt Translation Tables are setup with the
      invalid Requester ID, and the MSI-X generated by the device fails to be
      translated and routed.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=195447Signed-off-by: NJayachandran C <jnair@caviumnetworks.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRobin Murphy <robin.murphy@arm.com>
      Acked-by: NDavid Daney <david.daney@cavium.com>
      45a23293
  21. 13 4月, 2017 1 次提交
  22. 04 4月, 2017 1 次提交
  23. 31 3月, 2017 1 次提交
  24. 08 3月, 2017 1 次提交
    • E
      PCI: Prevent VPD access for QLogic ISP2722 · 0d5370d1
      Ethan Zhao 提交于
      QLogic ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter has the VPD
      access issue too, while read the common pci-sysfs access interface shown as
      
       /sys/devices/pci0000:00/0000:00:03.2/0000:0b:00.0/vpd
      
      with simple 'cat' could cause system hang and panic:
      
        Kernel panic - not syncing: An NMI occurred. Depending on your system the reason for the NMI is logged in any one of the following resources:
        1. Integrated Management Log (IML)
        2. OA Syslog
        3. OA Forward Progress Log
        4. iLO Event Log
        CPU: 0 PID: 15070 Comm: udevadm Not tainted 4.1.12
        Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 12/27/2015
         0000000000000086 000000007f0cdf51 ffff880c4fa05d58 ffffffff817193de
         ffffffffa00b42d8 0000000000000075 ffff880c4fa05dd8 ffffffff81714072
         0000000000000008 ffff880c4fa05de8 ffff880c4fa05d88 000000007f0cdf51
        Call Trace:
         <NMI>  [<ffffffff817193de>] dump_stack+0x63/0x81
         [<ffffffff81714072>] panic+0xd0/0x20e
         [<ffffffffa00b390d>] hpwdt_pretimeout+0xdd/0xe0 [hpwdt]
         [<ffffffff81021fc9>] ? sched_clock+0x9/0x10
         [<ffffffff8101c101>] nmi_handle+0x91/0x170
         [<ffffffff8101c10c>] ? nmi_handle+0x9c/0x170
         [<ffffffff8101c5fe>] io_check_error+0x1e/0xa0
         [<ffffffff8101c719>] default_do_nmi+0x99/0x140
         [<ffffffff8101c8b4>] do_nmi+0xf4/0x170
         [<ffffffff817232c5>] end_repeat_nmi+0x1a/0x1e
         [<ffffffff815d724b>] ? pci_conf1_read+0xeb/0x120
         [<ffffffff815d724b>] ? pci_conf1_read+0xeb/0x120
         [<ffffffff815d724b>] ? pci_conf1_read+0xeb/0x120
         <<EOE>>  [<ffffffff815db4b3>] raw_pci_read+0x23/0x40
         [<ffffffff815db4fc>] pci_read+0x2c/0x30
         [<ffffffff8136f612>] pci_user_read_config_word+0x72/0x110
         [<ffffffff8136f746>] pci_vpd_pci22_wait+0x96/0x130
         [<ffffffff8136ff9b>] pci_vpd_pci22_read+0xdb/0x1a0
         [<ffffffff8136ea30>] pci_read_vpd+0x20/0x30
         [<ffffffff8137d590>] read_vpd_attr+0x30/0x40
         [<ffffffff8128e037>] sysfs_kf_bin_read+0x47/0x70
         [<ffffffff8128d24e>] kernfs_fop_read+0xae/0x180
         [<ffffffff8120dd97>] __vfs_read+0x37/0x100
         [<ffffffff812ba7e4>] ? security_file_permission+0x84/0xa0
         [<ffffffff8120e366>] ? rw_verify_area+0x56/0xe0
         [<ffffffff8120e476>] vfs_read+0x86/0x140
         [<ffffffff8120f3f5>] SyS_read+0x55/0xd0
         [<ffffffff81720f2e>] system_call_fastpath+0x12/0x71
        Shutting down cpus with NMI
        Kernel Offset: disabled
        drm_kms_helper: panic occurred, switching back to text console
      
      So blacklist the access to its VPD.
      Signed-off-by: NEthan Zhao <ethan.zhao@oracle.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: stable@vger.kernel.org	# v4.6+
      0d5370d1
  25. 28 2月, 2017 1 次提交
  26. 18 2月, 2017 1 次提交
    • S
      PCI: Add ACS quirk for Qualcomm QDF2400 and QDF2432 · 33be632b
      Sinan Kaya 提交于
      The Qualcomm QDF2xxx root ports don't advertise an ACS capability, but they
      do provide ACS-like features to disable peer transactions and validate bus
      numbers in requests.
      
      To be specific:
      * Hardware supports source validation but it will report the issue as
      Completer Abort instead of ACS Violation.
      
      * Hardware doesn't support peer-to-peer and each root port is a root
      complex with unique segment numbers.
      
      * It is not possible for one root port to pass traffic to the other root
      port.  All PCIe transactions are terminated inside the root port.
      
      Add an ACS quirk for the QDF2400 and QDF2432 products.
      
      [bhelgaas: changelog]
      Signed-off-by: NSinan Kaya <okaya@codeaurora.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NAlex Williamson <alex.williamson@redhat.com>
      33be632b
  27. 16 2月, 2017 1 次提交
  28. 09 2月, 2017 2 次提交
  29. 29 1月, 2017 1 次提交
  30. 26 12月, 2016 1 次提交
    • T
      ktime: Cleanup ktime_set() usage · 8b0e1953
      Thomas Gleixner 提交于
      ktime_set(S,N) was required for the timespec storage type and is still
      useful for situations where a Seconds and Nanoseconds part of a time value
      needs to be converted. For anything where the Seconds argument is 0, this
      is pointless and can be replaced with a simple assignment.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      8b0e1953
  31. 13 12月, 2016 2 次提交
    • A
      PCI: Enable access to non-standard VPD for Chelsio devices (cxgb3) · 1c7de2b4
      Alexey Kardashevskiy 提交于
      There is at least one Chelsio 10Gb card which uses VPD area to store some
      non-standard blocks (example below).  However pci_vpd_size() returns the
      length of the first block only assuming that there can be only one VPD "End
      Tag".
      
      Since 4e1a6355 ("vfio/pci: Use kernel VPD access functions"), VFIO
      blocks access beyond that offset, which prevents the guest "cxgb3" driver
      from probing the device.  The host system does not have this problem as its
      driver accesses the config space directly without pci_read_vpd().
      
      Add a quirk to override the VPD size to a bigger value.  The maximum size
      is taken from EEPROMSIZE in drivers/net/ethernet/chelsio/cxgb3/common.h.
      We do not read the tag as the cxgb3 driver does as the driver supports
      writing to EEPROM/VPD and when it writes, it only checks for 8192 bytes
      boundary.  The quirk is registered for all devices supported by the cxgb3
      driver.
      
      This adds a quirk to the PCI layer (not to the cxgb3 driver) as the cxgb3
      driver itself accesses VPD directly and the problem only exists with the
      vfio-pci driver (when cxgb3 is not running on the host and may not be even
      loaded) which blocks accesses beyond the first block of VPD data.  However
      vfio-pci itself does not have quirks mechanism so we add it to PCI.
      
      This is the controller:
      Ethernet controller [0200]: Chelsio Communications Inc T310 10GbE Single Port Adapter [1425:0030]
      
      This is what I parsed from its VPD:
      ===
      b'\x82*\x0010 Gigabit Ethernet-SR PCI Express Adapter\x90J\x00EC\x07D76809 FN\x0746K'
       0000 Large item 42 bytes; name 0x2 Identifier String
      	b'10 Gigabit Ethernet-SR PCI Express Adapter'
       002d Large item 74 bytes; name 0x10
      	#00 [EC] len=7: b'D76809 '
      	#0a [FN] len=7: b'46K7897'
      	#14 [PN] len=7: b'46K7897'
      	#1e [MN] len=4: b'1037'
      	#25 [FC] len=4: b'5769'
      	#2c [SN] len=12: b'YL102035603V'
      	#3b [NA] len=12: b'00145E992ED1'
       007a Small item 1 bytes; name 0xf End Tag
      
       0c00 Large item 16 bytes; name 0x2 Identifier String
      	b'S310E-SR-X      '
       0c13 Large item 234 bytes; name 0x10
      	#00 [PN] len=16: b'TBD             '
      	#13 [EC] len=16: b'110107730D2     '
      	#26 [SN] len=16: b'97YL102035603V  '
      	#39 [NA] len=12: b'00145E992ED1'
      	#48 [V0] len=6: b'175000'
      	#51 [V1] len=6: b'266666'
      	#5a [V2] len=6: b'266666'
      	#63 [V3] len=6: b'2000  '
      	#6c [V4] len=2: b'1 '
      	#71 [V5] len=6: b'c2    '
      	#7a [V6] len=6: b'0     '
      	#83 [V7] len=2: b'1 '
      	#88 [V8] len=2: b'0 '
      	#8d [V9] len=2: b'0 '
      	#92 [VA] len=2: b'0 '
      	#97 [RV] len=80: b's\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'...
       0d00 Large item 252 bytes; name 0x11
      	#00 [VC] len=16: b'122310_1222 dp  '
      	#13 [VD] len=16: b'610-0001-00 H1\x00\x00'
      	#26 [VE] len=16: b'122310_1353 fp  '
      	#39 [VF] len=16: b'610-0001-00 H1\x00\x00'
      	#4c [RW] len=173: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'...
       0dff Small item 0 bytes; name 0xf End Tag
      
      10f3 Large item 13315 bytes; name 0x62
      !!! unknown item name 98: b'\xd0\x03\x00@`\x0c\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00'
      ===
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      1c7de2b4
    • B
      PCI: Expand "VPD access disabled" quirk message · 044bc425
      Bjorn Helgaas 提交于
      It's not very enlightening to see
      
        pci 0000:07:00.0: [Firmware Bug]: VPD access disabled
      
      in the dmesg log because there's no clue about what the firmware bug is.
      Expand the message to explain why we're disabling VPD.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      044bc425
  32. 24 11月, 2016 3 次提交