1. 21 3月, 2020 1 次提交
    • S
      driver core: Add device links from fwnode only for the primary device · 4dbe191c
      Saravana Kannan 提交于
      Sometimes, more than one (generally two) device can point to the same
      fwnode.  However, only one device is set as the fwnode's device
      (fwnode->dev) and can be looked up from the fwnode.
      
      Typically, only one of these devices actually have a driver and actually
      probe. If we create device links for all these devices, then the
      suppliers' of these devices (with the same fwnode) will never get a
      sync_state() call because one of their consumer devices will never probe
      (because they don't have a driver).
      
      So, create device links only for the device that is considered as the
      fwnode's device.
      
      One such example of this is the PCI bridge platform_device and the
      corresponding pci_bus device. Both these devices will have the same
      fwnode. It's the platform_device that is registered first and is set as
      the fwnode's device. Also the platform_device is the one that actually
      probes. Without this patch none of the suppliers of a PCI bridge
      platform_device would get a sync_state() callback.
      
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: linux-pci@vger.kernel.org
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NSaravana Kannan <saravanak@google.com>
      Link: https://lore.kernel.org/r/20200321045448.15192-1-saravanak@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4dbe191c
  2. 20 3月, 2020 1 次提交
    • H
      firmware: Add new platform fallback mechanism and firmware_request_platform() · e4c2c0ff
      Hans de Goede 提交于
      In some cases the platform's main firmware (e.g. the UEFI fw) may contain
      an embedded copy of device firmware which needs to be (re)loaded into the
      peripheral. Normally such firmware would be part of linux-firmware, but in
      some cases this is not feasible, for 2 reasons:
      
      1) The firmware is customized for a specific use-case of the chipset / use
      with a specific hardware model, so we cannot have a single firmware file
      for the chipset. E.g. touchscreen controller firmwares are compiled
      specifically for the hardware model they are used with, as they are
      calibrated for a specific model digitizer.
      
      2) Despite repeated attempts we have failed to get permission to
      redistribute the firmware. This is especially a problem with customized
      firmwares, these get created by the chip vendor for a specific ODM and the
      copyright may partially belong with the ODM, so the chip vendor cannot
      give a blanket permission to distribute these.
      
      This commit adds a new platform fallback mechanism to the firmware loader
      which will try to lookup a device fw copy embedded in the platform's main
      firmware if direct filesystem lookup fails.
      
      Drivers which need such embedded fw copies can enable this fallback
      mechanism by using the new firmware_request_platform() function.
      
      Note that for now this is only supported on EFI platforms and even on
      these platforms firmware_fallback_platform() only works if
      CONFIG_EFI_EMBEDDED_FIRMWARE is enabled (this gets selected by drivers
      which need this), in all other cases firmware_fallback_platform() simply
      always returns -ENOENT.
      Reported-by: NDave Olsthoorn <dave@bewaar.me>
      Suggested-by: NPeter Jones <pjones@redhat.com>
      Acked-by: NLuis Chamberlain <mcgrof@kernel.org>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Link: https://lore.kernel.org/r/20200115163554.101315-5-hdegoede@redhat.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4c2c0ff
  3. 19 3月, 2020 1 次提交
  4. 18 3月, 2020 4 次提交
  5. 11 3月, 2020 4 次提交
  6. 05 3月, 2020 10 次提交
  7. 04 3月, 2020 2 次提交
  8. 11 2月, 2020 1 次提交
    • T
      firmware_loader: load files from the mount namespace of init · 901cff7c
      Topi Miettinen 提交于
      I have an experimental setup where almost every possible system
      service (even early startup ones) runs in separate namespace, using a
      dedicated, minimal file system. In process of minimizing the contents
      of the file systems with regards to modules and firmware files, I
      noticed that in my system, the firmware files are loaded from three
      different mount namespaces, those of systemd-udevd, init and
      systemd-networkd. The logic of the source namespace is not very clear,
      it seems to depend on the driver, but the namespace of the current
      process is used.
      
      So, this patch tries to make things a bit clearer and changes the
      loading of firmware files only from the mount namespace of init. This
      may also improve security, though I think that using firmware files as
      attack vector could be too impractical anyway.
      
      Later, it might make sense to make the mount namespace configurable,
      for example with a new file in /proc/sys/kernel/firmware_config/. That
      would allow a dedicated file system only for firmware files and those
      need not be present anywhere else. This configurability would make
      more sense if made also for kernel modules and /sbin/modprobe. Modules
      are already loaded from init namespace (usermodehelper uses kthreadd
      namespace) except when directly loaded by systemd-udevd.
      
      Instead of using the mount namespace of the current process to load
      firmware files, use the mount namespace of init process.
      
      Link: https://lore.kernel.org/lkml/bb46ebae-4746-90d9-ec5b-fce4c9328c86@gmail.com/
      Link: https://lore.kernel.org/lkml/0e3f7653-c59d-9341-9db2-c88f5b988c68@gmail.com/Signed-off-by: NTopi Miettinen <toiwoton@gmail.com>
      Link: https://lore.kernel.org/r/20200123125839.37168-1-toiwoton@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      901cff7c
  9. 08 2月, 2020 1 次提交
  10. 04 2月, 2020 1 次提交
  11. 01 2月, 2020 2 次提交
  12. 24 1月, 2020 2 次提交
  13. 22 1月, 2020 7 次提交
  14. 17 1月, 2020 2 次提交
  15. 16 1月, 2020 1 次提交