Commit 457fa346 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc driver updates from Greg KH:
 "Here is the big set of char and misc driver patches for 4.21-rc1.

  Lots of different types of driver things in here, as this tree seems
  to be the "collection of various driver subsystems not big enough to
  have their own git tree" lately.

  Anyway, some highlights of the changes in here:

   - binderfs: is it a rule that all driver subsystems will eventually
     grow to have their own filesystem? Binder now has one to handle the
     use of it in containerized systems.

     This was discussed at the Plumbers conference a few months ago and
     knocked into mergable shape very fast by Christian Brauner. Who
     also has signed up to be another binder maintainer, showing a
     distinct lack of good judgement :)

   - binder updates and fixes

   - mei driver updates

   - fpga driver updates and additions

   - thunderbolt driver updates

   - soundwire driver updates

   - extcon driver updates

   - nvmem driver updates

   - hyper-v driver updates

   - coresight driver updates

   - pvpanic driver additions and reworking for more device support

   - lp driver updates. Yes really, it's _finally_ moved to the proper
     parallal port driver model, something I never thought I would see
     happen. Good stuff.

   - other tiny driver updates and fixes.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (116 commits)
  MAINTAINERS: add another Android binder maintainer
  intel_th: msu: Fix an off-by-one in attribute store
  stm class: Add a reference to the SyS-T document
  stm class: Fix a module refcount leak in policy creation error path
  char: lp: use new parport device model
  char: lp: properly count the lp devices
  char: lp: use first unused lp number while registering
  char: lp: detach the device when parallel port is removed
  char: lp: introduce list to save port number
  bus: qcom: remove duplicated include from qcom-ebi2.c
  VMCI: Use memdup_user() rather than duplicating its implementation
  char/rtc: Use of_node_name_eq for node name comparisons
  misc: mic: fix a DMA pool free failure
  ptp: fix an IS_ERR() vs NULL check
  genwqe: Fix size check
  binder: implement binderfs
  binder: fix use-after-free due to ksys_close() during fdget()
  bus: fsl-mc: remove duplicated include files
  bus: fsl-mc: explicitly define the fsl_mc_command endianness
  misc: ti-st: make array read_ver_cmd static, shrinks object size
  ...
parents b07039b7 fbc4904c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -21,6 +21,15 @@ Description: Holds a comma separated list of device unique_ids that
		If a device is authorized automatically during boot its
		boot attribute is set to 1.

What: /sys/bus/thunderbolt/devices/.../domainX/iommu_dma_protection
Date:		Mar 2019
KernelVersion:	4.21
Contact:	thunderbolt-software@lists.01.org
Description:	This attribute tells whether the system uses IOMMU
		for DMA protection. Value of 1 means IOMMU is used 0 means
		it is not (DMA protection is solely based on Thunderbolt
		security levels).

What: /sys/bus/thunderbolt/devices/.../domainX/security
Date:		Sep 2017
KernelVersion:	4.13
+20 −0
Original line number Diff line number Diff line
@@ -133,6 +133,26 @@ If the user still wants to connect the device they can either approve
the device without a key or write a new key and write 1 to the
``authorized`` file to get the new key stored on the device NVM.

DMA protection utilizing IOMMU
------------------------------
Recent systems from 2018 and forward with Thunderbolt ports may natively
support IOMMU. This means that Thunderbolt security is handled by an IOMMU
so connected devices cannot access memory regions outside of what is
allocated for them by drivers. When Linux is running on such system it
automatically enables IOMMU if not enabled by the user already. These
systems can be identified by reading ``1`` from
``/sys/bus/thunderbolt/devices/domainX/iommu_dma_protection`` attribute.

The driver does not do anything special in this case but because DMA
protection is handled by the IOMMU, security levels (if set) are
redundant. For this reason some systems ship with security level set to
``none``. Other systems have security level set to ``user`` in order to
support downgrade to older OS, so users who want to automatically
authorize devices when IOMMU DMA protection is enabled can use the
following ``udev`` rule::

  ACTION=="add", SUBSYSTEM=="thunderbolt", ATTRS{iommu_dma_protection}=="1", ATTR{authorized}=="0", ATTR{authorized}="1"

Upgrading NVM on Thunderbolt device or host
-------------------------------------------
Since most of the functionality is handled in firmware running on a
+57 −0
Original line number Diff line number Diff line
Intel Service Layer Driver for Stratix10 SoC
============================================
Intel Stratix10 SoC is composed of a 64 bit quad-core ARM Cortex A53 hard
processor system (HPS) and Secure Device Manager (SDM). When the FPGA is
configured from HPS, there needs to be a way for HPS to notify SDM the
location and size of the configuration data. Then SDM will get the
configuration data from that location and perform the FPGA configuration.

To meet the whole system security needs and support virtual machine requesting
communication with SDM, only the secure world of software (EL3, Exception
Layer 3) can interface with SDM. All software entities running on other
exception layers must channel through the EL3 software whenever it needs
service from SDM.

Intel Stratix10 service layer driver, running at privileged exception level
(EL1, Exception Layer 1), interfaces with the service providers and provides
the services for FPGA configuration, QSPI, Crypto and warm reset. Service layer
driver also manages secure monitor call (SMC) to communicate with secure monitor
code running in EL3.

Required properties:
-------------------
The svc node has the following mandatory properties, must be located under
the firmware node.

- compatible: "intel,stratix10-svc"
- method: smc or hvc
        smc - Secure Monitor Call
        hvc - Hypervisor Call
- memory-region:
	phandle to the reserved memory node. See
	Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
	for details

Example:
-------

	reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                service_reserved: svcbuffer@0 {
                        compatible = "shared-dma-pool";
                        reg = <0x0 0x0 0x0 0x1000000>;
                        alignment = <0x1000>;
                        no-map;
                };
        };

	firmware {
		svc {
			compatible = "intel,stratix10-svc";
			method = "smc";
			memory-region = <&service_reserved>;
		};
	};
+17 −0
Original line number Diff line number Diff line
Intel Stratix10 SoC FPGA Manager

Required properties:
The fpga_mgr node has the following mandatory property, must be located under
firmware/svc node.

- compatible : should contain "intel,stratix10-soc-fpga-mgr"

Example:

	firmware {
		svc {
			fpga_mgr: fpga-mgr {
				compatible = "intel,stratix10-soc-fpga-mgr";
			};
		};
	};
+29 −0
Original line number Diff line number Diff line
* QEMU PVPANIC MMIO Configuration bindings

QEMU's emulation / virtualization targets provide the following PVPANIC
MMIO Configuration interface on the "virt" machine.
type:

- a read-write, 16-bit wide data register.

QEMU exposes the data register to guests as memory mapped registers.

Required properties:

- compatible: "qemu,pvpanic-mmio".
- reg: the MMIO region used by the device.
  * Bytes 0x0  Write panic event to the reg when guest OS panics.
  * Bytes 0x1  Reserved.

Example:

/ {
        #size-cells = <0x2>;
        #address-cells = <0x2>;

        pvpanic-mmio@9060000 {
                compatible = "qemu,pvpanic-mmio";
                reg = <0x0 0x9060000 0x0 0x2>;
        };
};
Loading