ARM: SoC fixes for 6.6, part 2

AngeloGioacchino Del Regno is stepping in as co-maintainer for the
 MediaTek SoC platform and starts by sending some dts fixes for
 the mt8195 platform that had been pending for a while.
 
 On the ixp4xx platform, Krzysztof Halasa steps down as co-maintainer,
 reflecting that Linus Walleij has been handling this on his own
 for the past few years.
 
 Generic RISC-V kernels are now marked as incompatible with the
 RZ/Five platform that requires custom hacks both for managing
 its DMA bounce buffers and for addressing low virtual memory.
 
 Finally, there is one bugfix for the AMDTEE firmware driver
 to prevent a use-after-free bug.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUn5QgACgkQYKtH/8kJ
 UicWRw/+J+gYuPbjAO5A34KjcvE0/oHoX0CartiJLjGMSboXqjvlJOL2V37q9cTO
 kt/all/wWYnyvr3L09jPKZY8J9stw6wgMpkPZpcAORkF/Vc8KNEvBBVVnTIZSlie
 G6HSNW1S3qMPdt2mxjPWeO7aoKqq/lIuQoJDDAh3XQWYowy7++o6TreLs14UsGfv
 +PRNm5dR+SGe5QC/vIJIn0U7bTD7PRQ7xEdv2LC+ANto+mbtdyVOKh16kcTnzO+2
 NUHmBQvHqGS0Q1uN1hiXQocL9WA7vreVLk7ARbq/SLr1ccOsxJrxKj9LYPhoLq68
 8oJCHR8RBAXxYInhiw2xR62KczTEVickNWlHR7aiWlQ+Bxha/YhpmUAzh/hrlvWg
 edCBUSIxQW1CyLmbMxAqyHQn72F+sMM/LulhmftHuBcbF1YwNseAV67MKjoMSTr0
 rjSiXpzdomCvgZxhJYujHLjugKh6jfLMRwPx+0P6qKebdm/y1a17kGtUf/NQ24bn
 nDAeOAKWRRdEu4CjcoYkzVLgE6MlXUiSbSmpsPpDevge1qbcrfHgIATHech4oyDd
 h2o8xIO37H4QB3s9w18g05OQRToRlBHPMxQhD+vlRy77Zd9BE7wZqKcwR9XjkyyX
 +qPcNHVN0khxf+/NYiIE/Wn5Z57PL2vvgYoSp2L2Wi+UiYEZ0Ek=
 =Ukoh
 -----END PGP SIGNATURE-----

Merge tag 'soc-fixes-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Arnd Bergmann:
 "AngeloGioacchino Del Regno is stepping in as co-maintainer for the
  MediaTek SoC platform and starts by sending some dts fixes for the
  mt8195 platform that had been pending for a while.

  On the ixp4xx platform, Krzysztof Halasa steps down as co-maintainer,
  reflecting that Linus Walleij has been handling this on his own for
  the past few years.

  Generic RISC-V kernels are now marked as incompatible with the RZ/Five
  platform that requires custom hacks both for managing its DMA bounce
  buffers and for addressing low virtual memory.

 Finally, there is one bugfix for the AMDTEE firmware driver to prevent
 a use-after-free bug"

* tag 'soc-fixes-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  IXP4xx MAINTAINERS entries
  arm64: dts: mediatek: mt8195: Set DSU PMU status to fail
  arm64: dts: mediatek: fix t-phy unit name
  arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions
  arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
  MAINTAINERS: Add Angelo as MediaTek SoC co-maintainer
  soc: renesas: Make ARCH_R9A07G043 (riscv version) depend on NONPORTABLE
  tee: amdtee: fix use-after-free vulnerability in amdtee_close_session
This commit is contained in:
Linus Torvalds 2023-10-12 11:52:23 -07:00
commit 9a5a149485
7 changed files with 50 additions and 32 deletions

View File

@ -2221,21 +2221,28 @@ F: arch/arm/boot/dts/ti/omap/omap3-igep*
ARM/INTEL IXP4XX ARM ARCHITECTURE ARM/INTEL IXP4XX ARM ARCHITECTURE
M: Linus Walleij <linusw@kernel.org> M: Linus Walleij <linusw@kernel.org>
M: Imre Kaloz <kaloz@openwrt.org> M: Imre Kaloz <kaloz@openwrt.org>
M: Krzysztof Halasa <khalasa@piap.pl>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml F: Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml
F: Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt F: Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt
F: Documentation/devicetree/bindings/interrupt-controller/intel,ixp4xx-interrupt.yaml F: Documentation/devicetree/bindings/interrupt-controller/intel,ixp4xx-interrupt.yaml
F: Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion* F: Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion*
F: Documentation/devicetree/bindings/rng/intel,ixp46x-rng.yaml
F: Documentation/devicetree/bindings/timer/intel,ixp4xx-timer.yaml F: Documentation/devicetree/bindings/timer/intel,ixp4xx-timer.yaml
F: arch/arm/boot/dts/intel/ixp/ F: arch/arm/boot/dts/intel/ixp/
F: arch/arm/mach-ixp4xx/ F: arch/arm/mach-ixp4xx/
F: drivers/bus/intel-ixp4xx-eb.c F: drivers/bus/intel-ixp4xx-eb.c
F: drivers/char/hw_random/ixp4xx-rng.c
F: drivers/clocksource/timer-ixp4xx.c F: drivers/clocksource/timer-ixp4xx.c
F: drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c F: drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c
F: drivers/gpio/gpio-ixp4xx.c F: drivers/gpio/gpio-ixp4xx.c
F: drivers/irqchip/irq-ixp4xx.c F: drivers/irqchip/irq-ixp4xx.c
F: drivers/net/ethernet/xscale/ixp4xx_eth.c
F: drivers/net/wan/ixp4xx_hss.c
F: drivers/soc/ixp4xx/ixp4xx-npe.c
F: drivers/soc/ixp4xx/ixp4xx-qmgr.c
F: include/linux/soc/ixp4xx/npe.h
F: include/linux/soc/ixp4xx/qmgr.h
ARM/INTEL KEEMBAY ARCHITECTURE ARM/INTEL KEEMBAY ARCHITECTURE
M: Paul J. Murphy <paul.j.murphy@intel.com> M: Paul J. Murphy <paul.j.murphy@intel.com>
@ -2337,7 +2344,7 @@ F: drivers/rtc/rtc-mt7622.c
ARM/Mediatek SoC support ARM/Mediatek SoC support
M: Matthias Brugger <matthias.bgg@gmail.com> M: Matthias Brugger <matthias.bgg@gmail.com>
R: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> M: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: linux-mediatek@lists.infradead.org (moderated for non-subscribers) L: linux-mediatek@lists.infradead.org (moderated for non-subscribers)
@ -10630,22 +10637,6 @@ L: linux-crypto@vger.kernel.org
S: Maintained S: Maintained
F: drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c F: drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c
INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT
M: Krzysztof Halasa <khalasa@piap.pl>
S: Maintained
F: drivers/net/ethernet/xscale/ixp4xx_eth.c
F: drivers/net/wan/ixp4xx_hss.c
F: drivers/soc/ixp4xx/ixp4xx-npe.c
F: drivers/soc/ixp4xx/ixp4xx-qmgr.c
F: include/linux/soc/ixp4xx/npe.h
F: include/linux/soc/ixp4xx/qmgr.h
INTEL IXP4XX RANDOM NUMBER GENERATOR SUPPORT
M: Deepak Saxena <dsaxena@plexity.net>
S: Maintained
F: Documentation/devicetree/bindings/rng/intel,ixp46x-rng.yaml
F: drivers/char/hw_random/ixp4xx-rng.c
INTEL KEEM BAY DRM DRIVER INTEL KEEM BAY DRM DRIVER
M: Anitha Chrisanthus <anitha.chrisanthus@intel.com> M: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
M: Edmund Dea <edmund.j.dea@intel.com> M: Edmund Dea <edmund.j.dea@intel.com>

View File

@ -905,7 +905,7 @@
status = "disabled"; status = "disabled";
}; };
sata_phy: t-phy@1a243000 { sata_phy: t-phy {
compatible = "mediatek,mt7622-tphy", compatible = "mediatek,mt7622-tphy",
"mediatek,generic-tphy-v1"; "mediatek,generic-tphy-v1";
#address-cells = <2>; #address-cells = <2>;

View File

@ -434,7 +434,7 @@
}; };
}; };
pcie_phy: t-phy@11c00000 { pcie_phy: t-phy {
compatible = "mediatek,mt7986-tphy", compatible = "mediatek,mt7986-tphy",
"mediatek,generic-tphy-v2"; "mediatek,generic-tphy-v2";
#address-cells = <2>; #address-cells = <2>;

View File

@ -48,7 +48,7 @@
memory@40000000 { memory@40000000 {
device_type = "memory"; device_type = "memory";
reg = <0 0x40000000 0 0x80000000>; reg = <0 0x40000000 0x2 0x00000000>;
}; };
reserved-memory { reserved-memory {
@ -56,13 +56,8 @@
#size-cells = <2>; #size-cells = <2>;
ranges; ranges;
/* 2 MiB reserved for ARM Trusted Firmware (BL31) */ /*
bl31_secmon_reserved: secmon@54600000 { * 12 MiB reserved for OP-TEE (BL32)
no-map;
reg = <0 0x54600000 0x0 0x200000>;
};
/* 12 MiB reserved for OP-TEE (BL32)
* +-----------------------+ 0x43e0_0000 * +-----------------------+ 0x43e0_0000
* | SHMEM 2MiB | * | SHMEM 2MiB |
* +-----------------------+ 0x43c0_0000 * +-----------------------+ 0x43c0_0000
@ -75,6 +70,34 @@
no-map; no-map;
reg = <0 0x43200000 0 0x00c00000>; reg = <0 0x43200000 0 0x00c00000>;
}; };
scp_mem: memory@50000000 {
compatible = "shared-dma-pool";
reg = <0 0x50000000 0 0x2900000>;
no-map;
};
vpu_mem: memory@53000000 {
compatible = "shared-dma-pool";
reg = <0 0x53000000 0 0x1400000>; /* 20 MB */
};
/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
bl31_secmon_mem: memory@54600000 {
no-map;
reg = <0 0x54600000 0x0 0x200000>;
};
snd_dma_mem: memory@60000000 {
compatible = "shared-dma-pool";
reg = <0 0x60000000 0 0x1100000>;
no-map;
};
apu_mem: memory@62000000 {
compatible = "shared-dma-pool";
reg = <0 0x62000000 0 0x1400000>; /* 20 MB */
};
}; };
}; };

View File

@ -313,6 +313,7 @@
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>; interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
cpus = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>, cpus = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>,
<&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>; <&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>;
status = "fail";
}; };
dmic_codec: dmic-codec { dmic_codec: dmic-codec {

View File

@ -333,6 +333,7 @@ if RISCV
config ARCH_R9A07G043 config ARCH_R9A07G043
bool "RISC-V Platform support for RZ/Five" bool "RISC-V Platform support for RZ/Five"
depends on NONPORTABLE
select ARCH_RZG2L select ARCH_RZG2L
select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT
select DMA_GLOBAL_POOL select DMA_GLOBAL_POOL

View File

@ -217,12 +217,12 @@ unlock:
return rc; return rc;
} }
/* mutex must be held by caller */
static void destroy_session(struct kref *ref) static void destroy_session(struct kref *ref)
{ {
struct amdtee_session *sess = container_of(ref, struct amdtee_session, struct amdtee_session *sess = container_of(ref, struct amdtee_session,
refcount); refcount);
mutex_lock(&session_list_mutex);
list_del(&sess->list_node); list_del(&sess->list_node);
mutex_unlock(&session_list_mutex); mutex_unlock(&session_list_mutex);
kfree(sess); kfree(sess);
@ -272,7 +272,8 @@ int amdtee_open_session(struct tee_context *ctx,
if (arg->ret != TEEC_SUCCESS) { if (arg->ret != TEEC_SUCCESS) {
pr_err("open_session failed %d\n", arg->ret); pr_err("open_session failed %d\n", arg->ret);
handle_unload_ta(ta_handle); handle_unload_ta(ta_handle);
kref_put(&sess->refcount, destroy_session); kref_put_mutex(&sess->refcount, destroy_session,
&session_list_mutex);
goto out; goto out;
} }
@ -290,7 +291,8 @@ int amdtee_open_session(struct tee_context *ctx,
pr_err("reached maximum session count %d\n", TEE_NUM_SESSIONS); pr_err("reached maximum session count %d\n", TEE_NUM_SESSIONS);
handle_close_session(ta_handle, session_info); handle_close_session(ta_handle, session_info);
handle_unload_ta(ta_handle); handle_unload_ta(ta_handle);
kref_put(&sess->refcount, destroy_session); kref_put_mutex(&sess->refcount, destroy_session,
&session_list_mutex);
rc = -ENOMEM; rc = -ENOMEM;
goto out; goto out;
} }
@ -331,7 +333,7 @@ int amdtee_close_session(struct tee_context *ctx, u32 session)
handle_close_session(ta_handle, session_info); handle_close_session(ta_handle, session_info);
handle_unload_ta(ta_handle); handle_unload_ta(ta_handle);
kref_put(&sess->refcount, destroy_session); kref_put_mutex(&sess->refcount, destroy_session, &session_list_mutex);
return 0; return 0;
} }