Skip to content

Commit ce76a36

Browse files
committed
spi: fix explicit controller deregistration
Johan Hovold <johan@kernel.org> says: Turns out we have a few drivers that get the tear down ordering wrong also when not using device managed registration (cf. [1] and [2]). Fix this to avoid issues like system errors due to unclocked accesses, NULL-pointer dereferences, hangs or failed I/O during during deregistration (e.g. when powering down devices). Johan [1] https://lore.kernel.org/lkml/20260409120419.388546-2-johan@kernel.org/ [2] https://lore.kernel.org/lkml/20260410081757.503099-1-johan@kernel.org/
2 parents 51942b7 + 9d72732 commit ce76a36

295 files changed

Lines changed: 2640 additions & 1385 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,8 @@ Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko.ursulin@onelan.co.uk>
849849
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko@ursulin.net>
850850
Tycho Andersen <tycho@tycho.pizza> <tycho@tycho.ws>
851851
Tzung-Bi Shih <tzungbi@kernel.org> <tzungbi@google.com>
852+
Ulf Hansson <ulfh@kernel.org> <ulf.hansson@linaro.org>
853+
Ulf Hansson <ulfh@kernel.org> <ulf.hansson@stericsson.com>
852854
Umang Jain <uajain@igalia.com> <umang.jain@ideasonboard.com>
853855
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
854856
Uwe Kleine-König <u.kleine-koenig@baylibre.com> <ukleinek@baylibre.com>

Documentation/arch/riscv/zicfilp.rst

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -76,34 +76,49 @@ the program.
7676
4. prctl() enabling
7777
--------------------
7878

79-
:c:macro:`PR_SET_INDIR_BR_LP_STATUS` / :c:macro:`PR_GET_INDIR_BR_LP_STATUS` /
80-
:c:macro:`PR_LOCK_INDIR_BR_LP_STATUS` are three prctls added to manage indirect
81-
branch tracking. These prctls are architecture-agnostic and return -EINVAL if
82-
the underlying functionality is not supported.
79+
Per-task indirect branch tracking state can be monitored and
80+
controlled via the :c:macro:`PR_GET_CFI` and :c:macro:`PR_SET_CFI`
81+
``prctl()` arguments (respectively), by supplying
82+
:c:macro:`PR_CFI_BRANCH_LANDING_PADS` as the second argument. These
83+
are architecture-agnostic, and will return -EINVAL if the underlying
84+
functionality is not supported.
8385
84-
* prctl(PR_SET_INDIR_BR_LP_STATUS, unsigned long arg)
86+
* prctl(:c:macro:`PR_SET_CFI`, :c:macro:`PR_CFI_BRANCH_LANDING_PADS`, unsigned long arg)
8587
86-
If arg1 is :c:macro:`PR_INDIR_BR_LP_ENABLE` and if CPU supports
87-
``zicfilp`` then the kernel will enable indirect branch tracking for the
88-
task. The dynamic loader can issue this :c:macro:`prctl` once it has
89-
determined that all the objects loaded in the address space support
90-
indirect branch tracking. Additionally, if there is a `dlopen` to an
91-
object which wasn't compiled with ``zicfilp``, the dynamic loader can
92-
issue this prctl with arg1 set to 0 (i.e. :c:macro:`PR_INDIR_BR_LP_ENABLE`
93-
cleared).
94-
95-
* prctl(PR_GET_INDIR_BR_LP_STATUS, unsigned long * arg)
88+
arg is a bitmask.
9689
97-
Returns the current status of indirect branch tracking. If enabled
98-
it'll return :c:macro:`PR_INDIR_BR_LP_ENABLE`
99-
100-
* prctl(PR_LOCK_INDIR_BR_LP_STATUS, unsigned long arg)
90+
If :c:macro:`PR_CFI_ENABLE` is set in arg, and the CPU supports
91+
``zicfilp``, then the kernel will enable indirect branch tracking for
92+
the task. The dynamic loader can issue this ``prctl()`` once it has
93+
determined that all the objects loaded in the address space support
94+
indirect branch tracking.
95+
96+
Indirect branch tracking state can also be locked once enabled. This
97+
prevents the task from subsequently disabling it. This is done by
98+
setting the bit :c:macro:`PR_CFI_LOCK` in arg. Either indirect branch
99+
tracking must already be enabled for the task, or the bit
100+
:c:macro:`PR_CFI_ENABLE` must also be set in arg. This is intended
101+
for environments that wish to run with a strict security posture that
102+
do not wish to load objects without ``zicfilp`` support.
103+
104+
Indirect branch tracking can also be disabled for the task, assuming
105+
that it has not previously been enabled and locked. If there is a
106+
``dlopen()`` to an object which wasn't compiled with ``zicfilp``, the
107+
dynamic loader can issue this ``prctl()`` with arg set to
108+
:c:macro:`PR_CFI_DISABLE`. Disabling indirect branch tracking for the
109+
task is not possible if it has previously been enabled and locked.
110+
111+
112+
* prctl(:c:macro:`PR_GET_CFI`, :c:macro:`PR_CFI_BRANCH_LANDING_PADS`, unsigned long * arg)
113+
114+
Returns the current status of indirect branch tracking into a bitmask
115+
stored into the memory location pointed to by arg. The bitmask will
116+
have the :c:macro:`PR_CFI_ENABLE` bit set if indirect branch tracking
117+
is currently enabled for the task, and if it is locked, will
118+
additionally have the :c:macro:`PR_CFI_LOCK` bit set. If indirect
119+
branch tracking is currently disabled for the task, the
120+
:c:macro:`PR_CFI_DISABLE` bit will be set.
101121

102-
Locks the current status of indirect branch tracking on the task. User
103-
space may want to run with a strict security posture and wouldn't want
104-
loading of objects without ``zicfilp`` support in them, to disallow
105-
disabling of indirect branch tracking. In this case, user space can
106-
use this prctl to lock the current settings.
107122

108123
5. violations related to indirect branch tracking
109124
--------------------------------------------------

Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ properties:
3333
- const: core
3434

3535
iommus:
36-
maxItems: 2
36+
maxItems: 1
3737

3838
interconnects:
3939
items:
@@ -107,8 +107,7 @@ examples:
107107
interconnect-names = "mdp0-mem",
108108
"cpu-cfg";
109109
110-
iommus = <&apps_smmu 0x420 0x2>,
111-
<&apps_smmu 0x421 0x0>;
110+
iommus = <&apps_smmu 0x420 0x2>;
112111
ranges;
113112
114113
display-controller@5e01000 {

Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ properties:
4242
- const: vcodec0_bus
4343

4444
iommus:
45-
maxItems: 5
45+
maxItems: 2
4646

4747
interconnects:
4848
maxItems: 2
@@ -102,10 +102,7 @@ examples:
102102
memory-region = <&pil_video_mem>;
103103
104104
iommus = <&apps_smmu 0x860 0x0>,
105-
<&apps_smmu 0x880 0x0>,
106-
<&apps_smmu 0x861 0x04>,
107-
<&apps_smmu 0x863 0x0>,
108-
<&apps_smmu 0x804 0xe0>;
105+
<&apps_smmu 0x880 0x0>;
109106
110107
interconnects = <&mmnrt_virt MASTER_VIDEO_P0 RPM_ALWAYS_TAG
111108
&bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,

Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ properties:
4242
- const: mgbe
4343
- const: mac
4444
- const: mac-divider
45-
- const: ptp-ref
45+
- const: ptp_ref
4646
- const: rx-input-m
4747
- const: rx-input
4848
- const: tx
@@ -133,7 +133,7 @@ examples:
133133
<&bpmp TEGRA234_CLK_MGBE0_RX_PCS_M>,
134134
<&bpmp TEGRA234_CLK_MGBE0_RX_PCS>,
135135
<&bpmp TEGRA234_CLK_MGBE0_TX_PCS>;
136-
clock-names = "mgbe", "mac", "mac-divider", "ptp-ref", "rx-input-m",
136+
clock-names = "mgbe", "mac", "mac-divider", "ptp_ref", "rx-input-m",
137137
"rx-input", "tx", "eee-pcs", "rx-pcs-input", "rx-pcs-m",
138138
"rx-pcs", "tx-pcs";
139139
resets = <&bpmp TEGRA234_RESET_MGBE0_MAC>,

Documentation/devicetree/bindings/sound/ti,tas2552.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ maintainers:
1212
- Baojun Xu <baojun.xu@ti.com>
1313

1414
description: >
15-
The TAS2552 can receive its reference clock via MCLK, BCLK, IVCLKIN pin or
16-
use the internal 1.8MHz. This CLKIN is used by the PLL. In addition to PLL,
15+
The TAS2552 can receive its reference clock via MCLK, BCLK, IVCLKIN pin or
16+
use the internal 1.8MHz. This CLKIN is used by the PLL. In addition to PLL,
1717
the PDM reference clock is also selectable: PLL, IVCLKIN, BCLK or MCLK.
1818
1919
For system integration the dt-bindings/sound/tas2552.h header file provides
@@ -34,14 +34,20 @@ properties:
3434
maxItems: 1
3535
description: gpio pin to enable/disable the device
3636

37+
'#sound-dai-cells':
38+
const: 0
39+
3740
required:
3841
- compatible
3942
- reg
4043
- vbat-supply
4144
- iovdd-supply
4245
- avdd-supply
4346

44-
additionalProperties: false
47+
allOf:
48+
- $ref: dai-common.yaml#
49+
50+
unevaluatedProperties: false
4551

4652
examples:
4753
- |
@@ -54,6 +60,7 @@ examples:
5460
audio-codec@41 {
5561
compatible = "ti,tas2552";
5662
reg = <0x41>;
63+
#sound-dai-cells = <0>;
5764
vbat-supply = <&reg_vbat>;
5865
iovdd-supply = <&reg_iovdd>;
5966
avdd-supply = <&reg_avdd>;

MAINTAINERS

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@ F: include/uapi/drm/amdxdna_accel.h
12921292

12931293
AMD XGBE DRIVER
12941294
M: Raju Rangoju <Raju.Rangoju@amd.com>
1295+
M: Prashanth Kumar K R <PrashanthKumar.K.R@amd.com>
12951296
L: netdev@vger.kernel.org
12961297
S: Maintained
12971298
F: arch/arm64/boot/dts/amd/amd-seattle-xgbe*.dtsi
@@ -6717,15 +6718,15 @@ F: include/linux/platform_data/cpuidle-exynos.h
67176718
CPUIDLE DRIVER - ARM PSCI
67186719
M: Lorenzo Pieralisi <lpieralisi@kernel.org>
67196720
M: Sudeep Holla <sudeep.holla@kernel.org>
6720-
M: Ulf Hansson <ulf.hansson@linaro.org>
6721+
M: Ulf Hansson <ulfh@kernel.org>
67216722
L: linux-pm@vger.kernel.org
67226723
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
67236724
S: Supported
67246725
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git
67256726
F: drivers/cpuidle/cpuidle-psci.c
67266727

67276728
CPUIDLE DRIVER - ARM PSCI PM DOMAIN
6728-
M: Ulf Hansson <ulf.hansson@linaro.org>
6729+
M: Ulf Hansson <ulfh@kernel.org>
67296730
L: linux-pm@vger.kernel.org
67306731
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
67316732
S: Supported
@@ -6734,7 +6735,7 @@ F: drivers/cpuidle/cpuidle-psci-domain.c
67346735
F: drivers/cpuidle/cpuidle-psci.h
67356736

67366737
CPUIDLE DRIVER - DT IDLE PM DOMAIN
6737-
M: Ulf Hansson <ulf.hansson@linaro.org>
6738+
M: Ulf Hansson <ulfh@kernel.org>
67386739
L: linux-pm@vger.kernel.org
67396740
S: Supported
67406741
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git
@@ -10730,7 +10731,7 @@ F: Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.yaml
1073010731
F: drivers/i2c/muxes/i2c-demux-pinctrl.c
1073110732

1073210733
GENERIC PM DOMAINS
10733-
M: Ulf Hansson <ulf.hansson@linaro.org>
10734+
M: Ulf Hansson <ulfh@kernel.org>
1073410735
L: linux-pm@vger.kernel.org
1073510736
S: Supported
1073610737
F: Documentation/devicetree/bindings/power/power?domain*
@@ -18090,7 +18091,7 @@ F: drivers/mmc/host/mmc_spi.c
1809018091
F: include/linux/spi/mmc_spi.h
1809118092

1809218093
MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
18093-
M: Ulf Hansson <ulf.hansson@linaro.org>
18094+
M: Ulf Hansson <ulfh@kernel.org>
1809418095
L: linux-mmc@vger.kernel.org
1809518096
S: Maintained
1809618097
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git
@@ -21076,8 +21077,7 @@ F: include/uapi/linux/atmppp.h
2107621077
F: net/atm/pppoatm.c
2107721078

2107821079
PPP OVER ETHERNET
21079-
M: Michal Ostrowski <mostrows@earthlink.net>
21080-
S: Maintained
21080+
S: Orphan
2108121081
F: drivers/net/ppp/pppoe.c
2108221082
F: drivers/net/ppp/pppox.c
2108321083

@@ -22131,7 +22131,7 @@ S: Supported
2213122131
F: drivers/infiniband/sw/rdmavt
2213222132

2213322133
RDS - RELIABLE DATAGRAM SOCKETS
22134-
M: Allison Henderson <allison.henderson@oracle.com>
22134+
M: Allison Henderson <achender@kernel.org>
2213522135
L: netdev@vger.kernel.org
2213622136
L: linux-rdma@vger.kernel.org
2213722137
L: rds-devel@oss.oracle.com (moderated for non-subscribers)
@@ -24697,7 +24697,7 @@ F: drivers/media/i2c/imx415.c
2469724697
SONY MEMORYSTICK SUBSYSTEM
2469824698
M: Maxim Levitsky <maximlevitsky@gmail.com>
2469924699
M: Alex Dubov <oakad@yahoo.com>
24700-
M: Ulf Hansson <ulf.hansson@linaro.org>
24700+
M: Ulf Hansson <ulfh@kernel.org>
2470124701
L: linux-mmc@vger.kernel.org
2470224702
S: Maintained
2470324703
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git
@@ -27616,7 +27616,7 @@ F: Documentation/fb/uvesafb.rst
2761627616
F: drivers/video/fbdev/uvesafb.*
2761727617

2761827618
Ux500 CLOCK DRIVERS
27619-
M: Ulf Hansson <ulf.hansson@linaro.org>
27619+
M: Ulf Hansson <ulfh@kernel.org>
2762027620
L: linux-clk@vger.kernel.org
2762127621
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
2762227622
S: Maintained

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
VERSION = 7
33
PATCHLEVEL = 0
44
SUBLEVEL = 0
5-
EXTRAVERSION = -rc7
5+
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

88
# *DOCUMENTATION*

arch/arm/boot/dts/microchip/sam9x7.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@
12261226
interrupt-controller;
12271227
#gpio-cells = <2>;
12281228
gpio-controller;
1229-
#gpio-lines = <26>;
1229+
#gpio-lines = <27>;
12301230
clocks = <&pmc PMC_TYPE_PERIPHERAL 3>;
12311231
};
12321232

arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,8 @@
3636
&gpmi {
3737
pinctrl-names = "default";
3838
pinctrl-0 = <&pinctrl_gpmi_nand>;
39+
nand-on-flash-bbt;
3940
status = "okay";
40-
41-
nand@0 {
42-
reg = <0>;
43-
nand-on-flash-bbt;
44-
};
4541
};
4642

4743
&i2c3 {

0 commit comments

Comments
 (0)