projects/linux·commit 457fa346

Merge tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

457fa346 · Linus Torvalds <[email protected]> · 2018-12-28 20:54:57 -08:00

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
  ...
Commit
457fa3469a65a524be04412f5cd497fa3b11c9fd
Parents
b07039b7 · fbc4904c

Merge commit. Changes below are compared with the first parent: b07039b7.

Changes

122 files changed · +4901 −845

FileStatusAddDelContent
Documentation/ABI/testing/sysfs-bus-thunderboltmodified+9−0View file
Documentation/admin-guide/thunderbolt.rstmodified+20−0View file
Documentation/devicetree/bindings/firmware/intel,stratix10-svc.txtadded+57−0View file
Documentation/devicetree/bindings/fpga/intel-stratix10-soc-fpga-mgr.txtadded+17−0View file
Documentation/devicetree/bindings/misc/pvpanic-mmio.txtadded+29−0View file
Documentation/devicetree/bindings/nvmem/amlogic-efuse.txtmodified+3−0View file
Documentation/driver-api/firmware/other_interfaces.rstmodified+30−0View file
Documentation/trace/index.rstmodified+1−0View file
MAINTAINERSmodified+3−1View file
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsimodified+33−0View file
drivers/acpi/property.cmodified+11−0View file
drivers/android/Kconfigmodified+12−0View file
drivers/android/Makefilemodified+1−0View file
drivers/android/binder.cmodified+131−51View file
drivers/android/binder_alloc.cmodified+1−0View file
drivers/android/binder_alloc.hmodified+10−10View file
drivers/android/binder_internal.hadded+49−0View file
drivers/android/binderfs.cadded+544−0View file
drivers/bus/fsl-mc/dpbp.cmodified+0−1View file
drivers/bus/fsl-mc/dpcon.cmodified+0−1View file
drivers/bus/qcom-ebi2.cmodified+0−1View file
drivers/char/lp.cmodified+148−130View file
drivers/char/rtc.cmodified+2−2View file
drivers/char/tlclk.cmodified+44−43View file
drivers/char/virtio_console.cmodified+3−14View file
drivers/extcon/extcon-max14577.cmodified+13−2View file
drivers/extcon/extcon-max77693.cmodified+14−2View file
drivers/extcon/extcon-max77843.cmodified+15−3View file
drivers/extcon/extcon-max8997.cmodified+17−8View file
drivers/firmware/Kconfigmodified+12−0View file
drivers/firmware/Makefilemodified+1−0View file
drivers/firmware/stratix10-svc.cadded+1041−0View file
drivers/fpga/Kconfigmodified+6−0View file
drivers/fpga/Makefilemodified+1−0View file
drivers/fpga/altera-cvp.cmodified+37−12View file
drivers/fpga/altera-ps-spi.cmodified+35−5View file
drivers/fpga/dfl-fme-pr.cmodified+0−2View file
drivers/fpga/dfl-fme-region.cmodified+1−1View file
drivers/fpga/of-fpga-region.cmodified+1−1View file
drivers/fpga/stratix10-soc.cadded+535−0View file
drivers/fpga/zynq-fpga.cmodified+4−0View file
drivers/hv/channel.cmodified+0−1View file
drivers/hv/channel_mgmt.cmodified+0−44View file
drivers/hv/hv.cmodified+3−7View file
drivers/hv/hv_kvp.cmodified+1−1View file
drivers/hv/hv_util.cmodified+1−1View file
drivers/hv/hyperv_vmbus.hmodified+0−2View file
drivers/hwtracing/coresight/coresight-etb10.cmodified+17−6View file
drivers/hwtracing/coresight/coresight-etm3x.cmodified+6−6View file
drivers/hwtracing/coresight/coresight-stm.cmodified+1−1View file
drivers/hwtracing/coresight/coresight-tmc-etf.cmodified+1−1View file
drivers/hwtracing/intel_th/msu.cmodified+2−1View file
drivers/hwtracing/stm/policy.cmodified+7−5View file
drivers/iommu/dmar.cmodified+25−0View file
drivers/iommu/intel-iommu.cmodified+53−3View file
drivers/misc/Kconfigmodified+8−0View file
drivers/misc/Makefilemodified+2−1View file
drivers/misc/altera-stapl/altera.cmodified+1−2View file
drivers/misc/genwqe/card_debugfs.cmodified+36−49View file
drivers/misc/genwqe/card_utils.cmodified+1−1View file
drivers/misc/mei/Makefilemodified+1−0View file
drivers/misc/mei/client.cmodified+57−34View file
drivers/misc/mei/dma-ring.cadded+269−0View file
drivers/misc/mei/hbm.cmodified+87−5View file
drivers/misc/mei/hbm.hmodified+2−0View file
drivers/misc/mei/hw-me.cmodified+6−0View file
drivers/misc/mei/hw.hmodified+28−1View file
drivers/misc/mei/init.cmodified+1−1View file
drivers/misc/mei/interrupt.cmodified+29−12View file
drivers/misc/mei/mei_dev.hmodified+25−1View file
drivers/misc/mei/pci-me.cmodified+2−2View file
drivers/misc/mic/card/mic_debugfs.cmodified+4−20View file
drivers/misc/mic/cosm/cosm_debugfs.cmodified+9−30View file
drivers/misc/mic/host/mic_debugfs.cmodified+7−55View file
drivers/misc/mic/scif/scif_debugfs.cmodified+6−38View file
drivers/misc/mic/scif/scif_fence.cmodified+17−5View file
drivers/misc/mic/scif/scif_rma.hmodified+13−0View file
drivers/misc/mic/vop/vop_debugfs.cmodified+4−36View file
drivers/platform/x86/pvpanic.c → drivers/misc/pvpanic.crenamed+120−52View file
drivers/misc/ti-st/st_kim.cmodified+7−29View file
drivers/misc/vexpress-syscfg.cmodified+1−1View file
drivers/misc/vmw_balloon.cmodified+1−12View file
drivers/misc/vmw_vmci/vmci_host.cmodified+4−14View file
drivers/mtd/Kconfigmodified+1−0View file
drivers/mtd/mtdcore.cmodified+56−0View file
drivers/nvmem/core.cmodified+30−1View file
drivers/nvmem/meson-efuse.cmodified+28−1View file
drivers/parport/parport_pc.cmodified+1−1View file
drivers/pci/pci-acpi.cmodified+19−0View file
drivers/pci/probe.cmodified+15−0View file
drivers/platform/x86/Kconfigmodified+0−8View file
drivers/platform/x86/Makefilemodified+0−1View file
drivers/pps/clients/pps-gpio.cmodified+2−2View file
drivers/pps/clients/pps-ktimer.cmodified+2−2View file
drivers/pps/clients/pps-ldisc.cmodified+2−2View file
drivers/pps/clients/pps_parport.cmodified+1−1View file
drivers/pps/kapi.cmodified+3−2View file
drivers/ptp/ptp_clock.cmodified+2−2View file
drivers/slimbus/Kconfigmodified+3−2View file
drivers/slimbus/qcom-ctrl.cmodified+2−4View file
drivers/slimbus/qcom-ngd-ctrl.cmodified+4−3View file
drivers/soundwire/intel.cmodified+2−2View file
drivers/thunderbolt/domain.cmodified+17−0View file
drivers/uio/uio.cmodified+11−8View file
drivers/uio/uio_fsl_elbc_gpcm.cmodified+2−4View file
drivers/virt/vboxguest/vboxguest_core.cmodified+1−1View file
fs/file.cmodified+29−0View file
include/linux/dmar.hmodified+8−0View file
include/linux/fdtable.hmodified+1−0View file
include/linux/firmware/intel/stratix10-smc.hadded+312−0View file
include/linux/firmware/intel/stratix10-svc-client.hadded+217−0View file
include/linux/fsl/mc.hmodified+6−6View file
include/linux/hyperv.hmodified+0−17View file
include/linux/mtd/mtd.hmodified+2−0View file
include/linux/nvmem-provider.hmodified+11−0View file
include/linux/pci.hmodified+8−0View file
include/uapi/linux/android/binder_ctl.hadded+35−0View file
include/uapi/linux/magic.hmodified+1−0View file
tools/Makefilemodified+4−3View file
tools/firmware/Makefileadded+13−0View file
tools/firmware/ihex2fw.cadded+281−0View file
tools/hv/hv_kvp_daemon.cmodified+13−2View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/ABI/testing/sysfs-bus-thunderbolt

View file
diff --git a/Documentation/ABI/testing/sysfs-bus-thunderbolt b/Documentation/ABI/testing/sysfs-bus-thunderbolt
index 151584a..b21fba1 100644
--- a/Documentation/ABI/testing/sysfs-bus-thunderbolt
+++ b/Documentation/ABI/testing/sysfs-bus-thunderbolt
@@ -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
+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

Documentation/admin-guide/thunderbolt.rst

View file
diff --git a/Documentation/admin-guide/thunderbolt.rst b/Documentation/admin-guide/thunderbolt.rst
index 35fccba..898ad78 100644
--- a/Documentation/admin-guide/thunderbolt.rst
+++ b/Documentation/admin-guide/thunderbolt.rst
@@ -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

Documentation/devicetree/bindings/firmware/intel,stratix10-svc.txt

View file
diff --git a/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.txt b/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.txt
new file mode 100644
index 0000000..1fa6606
--- /dev/null
+++ b/Documentation/devicetree/bindings/firmware/intel,stratix10-svc.txt
@@ -0,0 +1,57 @@
+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>;
+ };
+ };

Documentation/devicetree/bindings/fpga/intel-stratix10-soc-fpga-mgr.txt

View file
diff --git a/Documentation/devicetree/bindings/fpga/intel-stratix10-soc-fpga-mgr.txt b/Documentation/devicetree/bindings/fpga/intel-stratix10-soc-fpga-mgr.txt
new file mode 100644
index 0000000..6e03f79
--- /dev/null
+++ b/Documentation/devicetree/bindings/fpga/intel-stratix10-soc-fpga-mgr.txt
@@ -0,0 +1,17 @@
+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";
+ };
+ };
+ };

Documentation/devicetree/bindings/misc/pvpanic-mmio.txt

View file
diff --git a/Documentation/devicetree/bindings/misc/pvpanic-mmio.txt b/Documentation/devicetree/bindings/misc/pvpanic-mmio.txt
new file mode 100644
index 0000000..985e907
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/pvpanic-mmio.txt
@@ -0,0 +1,29 @@
+* 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>;
+ };
+};
+

Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt

View file
diff --git a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
index e3298e1..2e0723a 100644
--- a/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
+++ b/Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
@@ -2,6 +2,8 @@
Required properties:
- compatible: should be "amlogic,meson-gxbb-efuse"
+- clocks: phandle to the efuse peripheral clock provided by the
+ clock controller.
= Data cells =
Are child nodes of eFuse, bindings of which as described in
@@ -11,6 +13,7 @@ Example:
efuse: efuse {
compatible = "amlogic,meson-gxbb-efuse";
+ clocks = <&clkc CLKID_EFUSE>;
#address-cells = <1>;
#size-cells = <1>;

Documentation/driver-api/firmware/other_interfaces.rst

View file
diff --git a/Documentation/driver-api/firmware/other_interfaces.rst b/Documentation/driver-api/firmware/other_interfaces.rst
index 36c47b1..a4ac54b 100644
--- a/Documentation/driver-api/firmware/other_interfaces.rst
+++ b/Documentation/driver-api/firmware/other_interfaces.rst
@@ -13,3 +13,33 @@ EDD Interfaces
.. kernel-doc:: drivers/firmware/edd.c
:internal:
+Intel Stratix10 SoC Service Layer
+---------------------------------
+Some features of the Intel Stratix10 SoC require a level of privilege
+higher than the kernel is granted. Such secure features include
+FPGA programming. In terms of the ARMv8 architecture, the kernel runs
+at Exception Level 1 (EL1), access to the features requires
+Exception Level 3 (EL3).
+
+The Intel Stratix10 SoC service layer provides an in kernel API for
+drivers to request access to the secure features. The requests are queued
+and processed one by one. ARM’s SMCCC is used to pass the execution
+of the requests on to a secure monitor (EL3).
+
+.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
+ :functions: stratix10_svc_command_code
+
+.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
+ :functions: stratix10_svc_client_msg
+
+.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
+ :functions: stratix10_svc_command_reconfig_payload
+
+.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
+ :functions: stratix10_svc_cb_data
+
+.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
+ :functions: stratix10_svc_client
+
+.. kernel-doc:: drivers/firmware/stratix10-svc.c
+ :export:

Documentation/trace/index.rst

View file
diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst
index 3069979..6b4107c 100644
--- a/Documentation/trace/index.rst
+++ b/Documentation/trace/index.rst
@@ -22,3 +22,4 @@ Linux Tracing Technologies
hwlat_detector
intel_th
stm
+ sys-t

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 87ae13c..7d37f8a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -958,6 +958,7 @@ M: Arve Hjønnevåg <[email protected]>
M: Todd Kjos <[email protected]>
M: Martijn Coenen <[email protected]>
M: Joel Fernandes <[email protected]>
+M: Christian Brauner <[email protected]>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
S: Supported
@@ -1442,6 +1443,7 @@ F: arch/arm/mach-ep93xx/micro9.c
ARM/CORESIGHT FRAMEWORK AND DRIVERS
M: Mathieu Poirier <[email protected]>
+R: Suzuki K Poulose <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Maintained
F: drivers/hwtracing/coresight/*
@@ -16242,7 +16244,7 @@ F: drivers/vme/
F: include/linux/vme*
VMWARE BALLOON DRIVER
-M: Xavier Deguillard <[email protected]>
+M: Julien Freche <[email protected]>
M: Nadav Amit <[email protected]>
M: "VMware, Inc." <[email protected]>

arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi

View file
diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
index fef7351..a20df0d 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
@@ -24,6 +24,19 @@
#address-cells = <2>;
#size-cells = <2>;
+ 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;
+ };
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -93,6 +106,14 @@
interrupt-parent = <&intc>;
ranges = <0 0 0 0xffffffff>;
+ base_fpga_region {
+ #address-cells = <0x1>;
+ #size-cells = <0x1>;
+
+ compatible = "fpga-region";
+ fpga-mgr = <&fpga_mgr>;
+ };
+
clkmgr: clock-controller@ffd10000 {
compatible = "intel,stratix10-clkmgr";
reg = <0xffd10000 0x1000>;
@@ -537,5 +558,17 @@
status = "disabled";
};
+
+ firmware {
+ svc {
+ compatible = "intel,stratix10-svc";
+ method = "smc";
+ memory-region = <&service_reserved>;
+
+ fpga_mgr: fpga-mgr {
+ compatible = "intel,stratix10-soc-fpga-mgr";
+ };
+ };
+ };
};
};

drivers/acpi/property.c

View file
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 8c7c458..77abe0e 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -24,6 +24,14 @@ static int acpi_data_get_property_array(const struct acpi_device_data *data,
acpi_object_type type,
const union acpi_object **obj);
+/*
+ * The GUIDs here are made equivalent to each other in order to avoid extra
+ * complexity in the properties handling code, with the caveat that the
+ * kernel will accept certain combinations of GUID and properties that are
+ * not defined without a warning. For instance if any of the properties
+ * from different GUID appear in a property list of another, it will be
+ * accepted by the kernel. Firmware validation tools should catch these.
+ */
static const guid_t prp_guids[] = {
/* ACPI _DSD device properties GUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 */
GUID_INIT(0xdaffd814, 0x6eba, 0x4d8c,
@@ -31,6 +39,9 @@ static const guid_t prp_guids[] = {
/* Hotplug in D3 GUID: 6211e2c0-58a3-4af3-90e1-927a4e0c55a4 */
GUID_INIT(0x6211e2c0, 0x58a3, 0x4af3,
0x90, 0xe1, 0x92, 0x7a, 0x4e, 0x0c, 0x55, 0xa4),
+ /* External facing port GUID: efcc06cc-73ac-4bc3-bff0-76143807c389 */
+ GUID_INIT(0xefcc06cc, 0x73ac, 0x4bc3,
+ 0xbf, 0xf0, 0x76, 0x14, 0x38, 0x07, 0xc3, 0x89),
};
static const guid_t ads_guid =

drivers/android/Kconfig

View file
diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig
index 51e8250..4c190f8 100644
--- a/drivers/android/Kconfig
+++ b/drivers/android/Kconfig
@@ -20,6 +20,18 @@ config ANDROID_BINDER_IPC
Android process, using Binder to identify, invoke and pass arguments
between said processes.
+config ANDROID_BINDERFS
+ bool "Android Binderfs filesystem"
+ depends on ANDROID_BINDER_IPC
+ default n
+ ---help---
+ Binderfs is a pseudo-filesystem for the Android Binder IPC driver
+ which can be mounted per-ipc namespace allowing to run multiple
+ instances of Android.
+ Each binderfs mount initially only contains a binder-control device.
+ It can be used to dynamically allocate new binder IPC devices via
+ ioctls.
+
config ANDROID_BINDER_DEVICES
string "Android Binder devices"
depends on ANDROID_BINDER_IPC

drivers/android/Makefile

View file
diff --git a/drivers/android/Makefile b/drivers/android/Makefile
index a01254c..c7856e3 100644
--- a/drivers/android/Makefile
+++ b/drivers/android/Makefile
@@ -1,4 +1,5 @@
ccflags-y += -I$(src) # needed for trace events
+obj-$(CONFIG_ANDROID_BINDERFS) += binderfs.o
obj-$(CONFIG_ANDROID_BINDER_IPC) += binder.o binder_alloc.o
obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o

drivers/android/binder.c

View file
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 9f1000d..cdfc876 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -72,12 +72,14 @@
#include <linux/spinlock.h>
#include <linux/ratelimit.h>
#include <linux/syscalls.h>
+#include <linux/task_work.h>
#include <uapi/linux/android/binder.h>
#include <asm/cacheflush.h>
#include "binder_alloc.h"
+#include "binder_internal.h"
#include "binder_trace.h"
static HLIST_HEAD(binder_deferred_list);
@@ -94,22 +96,8 @@ static struct dentry *binder_debugfs_dir_entry_root;
static struct dentry *binder_debugfs_dir_entry_proc;
static atomic_t binder_last_id;
-#define BINDER_DEBUG_ENTRY(name) \
-static int binder_##name##_open(struct inode *inode, struct file *file) \
-{ \
- return single_open(file, binder_##name##_show, inode->i_private); \
-} \
-\
-static const struct file_operations binder_##name##_fops = { \
- .owner = THIS_MODULE, \
- .open = binder_##name##_open, \
- .read = seq_read, \
- .llseek = seq_lseek, \
- .release = single_release, \
-}
-
-static int binder_proc_show(struct seq_file *m, void *unused);
-BINDER_DEBUG_ENTRY(proc);
+static int proc_show(struct seq_file *m, void *unused);
+DEFINE_SHOW_ATTRIBUTE(proc);
/* This is only defined in include/asm-arm/sizes.h */
#ifndef SZ_1K
@@ -262,20 +250,6 @@ static struct binder_transaction_log_entry *binder_transaction_log_add(
return e;
}
-struct binder_context {
- struct binder_node *binder_context_mgr_node;
- struct mutex context_mgr_node_lock;
-
- kuid_t binder_context_mgr_uid;
- const char *name;
-};
-
-struct binder_device {
- struct hlist_node hlist;
- struct miscdevice miscdev;
- struct binder_context context;
-};
-
/**
* struct binder_work - work enqueued on a worklist
* @entry: node enqueued on list
@@ -660,6 +634,7 @@ struct binder_transaction {
#define binder_proc_lock(proc) _binder_proc_lock(proc, __LINE__)
static void
_binder_proc_lock(struct binder_proc *proc, int line)
+ __acquires(&proc->outer_lock)
{
binder_debug(BINDER_DEBUG_SPINLOCKS,
"%s: line=%d\n", __func__, line);
@@ -675,6 +650,7 @@ _binder_proc_lock(struct binder_proc *proc, int line)
#define binder_proc_unlock(_proc) _binder_proc_unlock(_proc, __LINE__)
static void
_binder_proc_unlock(struct binder_proc *proc, int line)
+ __releases(&proc->outer_lock)
{
binder_debug(BINDER_DEBUG_SPINLOCKS,
"%s: line=%d\n", __func__, line);
@@ -690,6 +666,7 @@ _binder_proc_unlock(struct binder_proc *proc, int line)
#define binder_inner_proc_lock(proc) _binder_inner_proc_lock(proc, __LINE__)
static void
_binder_inner_proc_lock(struct binder_proc *proc, int line)
+ __acquires(&proc->inner_lock)
{
binder_debug(BINDER_DEBUG_SPINLOCKS,
"%s: line=%d\n", __func__, line);
@@ -705,6 +682,7 @@ _binder_inner_proc_lock(struct binder_proc *proc, int line)
#define binder_inner_proc_unlock(proc) _binder_inner_proc_unlock(proc, __LINE__)
static void
_binder_inner_proc_unlock(struct binder_proc *proc, int line)
+ __releases(&proc->inner_lock)
{
binder_debug(BINDER_DEBUG_SPINLOCKS,
"%s: line=%d\n", __func__, line);
@@ -720,6 +698,7 @@ _binder_inner_proc_unlock(struct binder_proc *proc, int line)
#define binder_node_lock(node) _binder_node_lock(node, __LINE__)
static void
_binder_node_lock(struct binder_node *node, int line)
+ __acquires(&node->lock)
{
binder_debug(BINDER_DEBUG_SPINLOCKS,
"%s: line=%d\n", __func__, line);
@@ -735,6 +714,7 @@ _binder_node_lock(struct binder_node *node, int line)
#define binder_node_unlock(node) _binder_node_unlock(node, __LINE__)
static void
_binder_node_unlock(struct binder_node *node, int line)
+ __releases(&node->lock)
{
binder_debug(BINDER_DEBUG_SPINLOCKS,
"%s: line=%d\n", __func__, line);
@@ -751,12 +731,16 @@ _binder_node_unlock(struct binder_node *node, int line)
#define binder_node_inner_lock(node) _binder_node_inner_lock(node, __LINE__)
static void
_binder_node_inner_lock(struct binder_node *node, int line)
+ __acquires(&node->lock) __acquires(&node->proc->inner_lock)
{
binder_debug(BINDER_DEBUG_SPINLOCKS,
"%s: line=%d\n", __func__, line);
spin_lock(&node->lock);
if (node->proc)
binder_inner_proc_lock(node->proc);
+ else
+ /* annotation for sparse */
+ __acquire(&node->proc->inner_lock);
}
/**
@@ -768,6 +752,7 @@ _binder_node_inner_lock(struct binder_node *node, int line)
#define binder_node_inner_unlock(node) _binder_node_inner_unlock(node, __LINE__)
static void
_binder_node_inner_unlock(struct binder_node *node, int line)
+ __releases(&node->lock) __releases(&node->proc->inner_lock)
{
struct binder_proc *proc = node->proc;
@@ -775,6 +760,9 @@ _binder_node_inner_unlock(struct binder_node *node, int line)
"%s: line=%d\n", __func__, line);
if (proc)
binder_inner_proc_unlock(proc);
+ else
+ /* annotation for sparse */
+ __release(&node->proc->inner_lock);
spin_unlock(&node->lock);
}
@@ -1384,10 +1372,14 @@ static void binder_dec_node_tmpref(struct binder_node *node)
binder_node_inner_lock(node);
if (!node->proc)
spin_lock(&binder_dead_nodes_lock);
+ else
+ __acquire(&binder_dead_nodes_lock);
node->tmp_refs--;
BUG_ON(node->tmp_refs < 0);
if (!node->proc)
spin_unlock(&binder_dead_nodes_lock);
+ else
+ __release(&binder_dead_nodes_lock);
/*
* Call binder_dec_node() to check if all refcounts are 0
* and cleanup is needed. Calling with strong=0 and internal=1
@@ -1890,18 +1882,22 @@ static struct binder_thread *binder_get_txn_from(
*/
static struct binder_thread *binder_get_txn_from_and_acq_inner(
struct binder_transaction *t)
+ __acquires(&t->from->proc->inner_lock)
{
struct binder_thread *from;
from = binder_get_txn_from(t);
- if (!from)
+ if (!from) {
+ __acquire(&from->proc->inner_lock);
return NULL;
+ }
binder_inner_proc_lock(from->proc);
if (t->from) {
BUG_ON(from != t->from);
return from;
}
binder_inner_proc_unlock(from->proc);
+ __acquire(&from->proc->inner_lock);
binder_thread_dec_tmpref(from);
return NULL;
}
@@ -1973,6 +1969,8 @@ static void binder_send_failed_reply(struct binder_transaction *t,
binder_thread_dec_tmpref(target_thread);
binder_free_transaction(t);
return;
+ } else {
+ __release(&target_thread->proc->inner_lock);
}
next = t->from_parent;
@@ -2160,6 +2158,64 @@ static bool binder_validate_fixup(struct binder_buffer *b,
return (fixup_offset >= last_min_offset);
}
+/**
+ * struct binder_task_work_cb - for deferred close
+ *
+ * @twork: callback_head for task work
+ * @fd: fd to close
+ *
+ * Structure to pass task work to be handled after
+ * returning from binder_ioctl() via task_work_add().
+ */
+struct binder_task_work_cb {
+ struct callback_head twork;
+ struct file *file;

This diff is incomplete. Download the complete patch.

drivers/android/binder_alloc.c

View file

This diff is incomplete. Download the complete patch.

drivers/android/binder_alloc.h

View file

This diff is incomplete. Download the complete patch.

drivers/android/binder_internal.h

View file

This diff is incomplete. Download the complete patch.

drivers/android/binderfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/bus/fsl-mc/dpbp.c

View file

This diff is incomplete. Download the complete patch.

drivers/bus/fsl-mc/dpcon.c

View file

This diff is incomplete. Download the complete patch.

drivers/bus/qcom-ebi2.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/lp.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/rtc.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/tlclk.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/virtio_console.c

View file

This diff is incomplete. Download the complete patch.

drivers/extcon/extcon-max14577.c

View file

This diff is incomplete. Download the complete patch.

drivers/extcon/extcon-max77693.c

View file

This diff is incomplete. Download the complete patch.

drivers/extcon/extcon-max77843.c

View file

This diff is incomplete. Download the complete patch.

drivers/extcon/extcon-max8997.c

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/stratix10-svc.c

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/altera-cvp.c

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/altera-ps-spi.c

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/dfl-fme-pr.c

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/dfl-fme-region.c

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/of-fpga-region.c

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/stratix10-soc.c

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/zynq-fpga.c

View file

This diff is incomplete. Download the complete patch.

drivers/hv/channel.c

View file

This diff is incomplete. Download the complete patch.

drivers/hv/channel_mgmt.c

View file

This diff is incomplete. Download the complete patch.

drivers/hv/hv.c

View file

This diff is incomplete. Download the complete patch.

drivers/hv/hv_kvp.c

View file

This diff is incomplete. Download the complete patch.

drivers/hv/hv_util.c

View file

This diff is incomplete. Download the complete patch.

drivers/hv/hyperv_vmbus.h

View file

This diff is incomplete. Download the complete patch.

drivers/hwtracing/coresight/coresight-etb10.c

View file

This diff is incomplete. Download the complete patch.

drivers/hwtracing/coresight/coresight-etm3x.c

View file

This diff is incomplete. Download the complete patch.

drivers/hwtracing/coresight/coresight-stm.c

View file

This diff is incomplete. Download the complete patch.

drivers/hwtracing/coresight/coresight-tmc-etf.c

View file

This diff is incomplete. Download the complete patch.

drivers/hwtracing/intel_th/msu.c

View file

This diff is incomplete. Download the complete patch.

drivers/hwtracing/stm/policy.c

View file

This diff is incomplete. Download the complete patch.

drivers/iommu/dmar.c

View file

This diff is incomplete. Download the complete patch.

drivers/iommu/intel-iommu.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/misc/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/misc/altera-stapl/altera.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/genwqe/card_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/genwqe/card_utils.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/client.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/dma-ring.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/hbm.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/hbm.h

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/hw-me.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/hw.h

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/init.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/interrupt.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/mei_dev.h

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mei/pci-me.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mic/card/mic_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mic/cosm/cosm_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mic/host/mic_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mic/scif/scif_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mic/scif/scif_fence.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mic/scif/scif_rma.h

View file

This diff is incomplete. Download the complete patch.

drivers/misc/mic/vop/vop_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/pvpanic.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/ti-st/st_kim.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/vexpress-syscfg.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/vmw_balloon.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/vmw_vmci/vmci_host.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdcore.c

View file

This diff is incomplete. Download the complete patch.

drivers/nvmem/core.c

View file

This diff is incomplete. Download the complete patch.

drivers/nvmem/meson-efuse.c

View file

This diff is incomplete. Download the complete patch.

drivers/parport/parport_pc.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci-acpi.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/probe.c

View file

This diff is incomplete. Download the complete patch.

drivers/platform/x86/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/platform/x86/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/pps/clients/pps-gpio.c

View file

This diff is incomplete. Download the complete patch.

drivers/pps/clients/pps-ktimer.c

View file

This diff is incomplete. Download the complete patch.

drivers/pps/clients/pps-ldisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/pps/clients/pps_parport.c

View file

This diff is incomplete. Download the complete patch.

drivers/pps/kapi.c

View file

This diff is incomplete. Download the complete patch.

drivers/ptp/ptp_clock.c

View file

This diff is incomplete. Download the complete patch.

drivers/slimbus/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/slimbus/qcom-ctrl.c

View file

This diff is incomplete. Download the complete patch.

drivers/slimbus/qcom-ngd-ctrl.c

View file

This diff is incomplete. Download the complete patch.

drivers/soundwire/intel.c

View file

This diff is incomplete. Download the complete patch.

drivers/thunderbolt/domain.c

View file

This diff is incomplete. Download the complete patch.

drivers/uio/uio.c

View file

This diff is incomplete. Download the complete patch.

drivers/uio/uio_fsl_elbc_gpcm.c

View file

This diff is incomplete. Download the complete patch.

drivers/virt/vboxguest/vboxguest_core.c

View file

This diff is incomplete. Download the complete patch.

fs/file.c

View file

This diff is incomplete. Download the complete patch.

include/linux/dmar.h

View file

This diff is incomplete. Download the complete patch.

include/linux/fdtable.h

View file

This diff is incomplete. Download the complete patch.

include/linux/firmware/intel/stratix10-smc.h

View file

This diff is incomplete. Download the complete patch.

include/linux/firmware/intel/stratix10-svc-client.h

View file

This diff is incomplete. Download the complete patch.

include/linux/fsl/mc.h

View file

This diff is incomplete. Download the complete patch.

include/linux/hyperv.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/mtd.h

View file

This diff is incomplete. Download the complete patch.

include/linux/nvmem-provider.h

View file

This diff is incomplete. Download the complete patch.

include/linux/pci.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/android/binder_ctl.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/magic.h

View file

This diff is incomplete. Download the complete patch.

tools/Makefile

View file

This diff is incomplete. Download the complete patch.

tools/firmware/Makefile

View file

This diff is incomplete. Download the complete patch.

tools/firmware/ihex2fw.c

View file

This diff is incomplete. Download the complete patch.

tools/hv/hv_kvp_daemon.c

View file

This diff is incomplete. Download the complete patch.