<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blaster4385/linux-IllusionX/drivers/i3c/master, branch v6.12.1</title>
<subtitle>Linux kernel with personal config changes for arch linux</subtitle>
<id>http://git.tablaster.dev/blaster4385/linux-IllusionX/atom?h=v6.12.1</id>
<link rel='self' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/atom?h=v6.12.1'/>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/'/>
<updated>2024-09-17T14:51:45Z</updated>
<entry>
<title>i3c: master: svc: Fix use after free vulnerability in svc_i3c_master Driver Due to Race Condition</title>
<updated>2024-09-17T14:51:45Z</updated>
<author>
<name>Kaixin Wang</name>
<email>kxwang23@m.fudan.edu.cn</email>
</author>
<published>2024-09-14T16:39:33Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=61850725779709369c7e907ae8c7c75dc7cec4f3'/>
<id>urn:sha1:61850725779709369c7e907ae8c7c75dc7cec4f3</id>
<content type='text'>
In the svc_i3c_master_probe function, &amp;master-&gt;hj_work is bound with
svc_i3c_master_hj_work, &amp;master-&gt;ibi_work is bound with
svc_i3c_master_ibi_work. And svc_i3c_master_ibi_work  can start the
hj_work, svc_i3c_master_irq_handler can start the ibi_work.

If we remove the module which will call svc_i3c_master_remove to
make cleanup, it will free master-&gt;base through i3c_master_unregister
while the work mentioned above will be used. The sequence of operations
that may lead to a UAF bug is as follows:

CPU0                                         CPU1

                                    | svc_i3c_master_hj_work
svc_i3c_master_remove               |
i3c_master_unregister(&amp;master-&gt;base)|
device_unregister(&amp;master-&gt;dev)     |
device_release                      |
//free master-&gt;base                 |
                                    | i3c_master_do_daa(&amp;master-&gt;base)
                                    | //use master-&gt;base

Fix it by ensuring that the work is canceled before proceeding with the
cleanup in svc_i3c_master_remove.

Fixes: 0f74f8b6675c ("i3c: Make i3c_master_unregister() return void")
Cc: stable@vger.kernel.org
Signed-off-by: Kaixin Wang &lt;kxwang23@m.fudan.edu.cn&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Link: https://lore.kernel.org/stable/20240914154030.180-1-kxwang23%40m.fudan.edu.cn
Link: https://lore.kernel.org/r/20240914163932.253-1-kxwang23@m.fudan.edu.cn
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>i3c: master: cdns: Fix use after free vulnerability in cdns_i3c_master Driver Due to Race Condition</title>
<updated>2024-09-17T14:50:18Z</updated>
<author>
<name>Kaixin Wang</name>
<email>kxwang23@m.fudan.edu.cn</email>
</author>
<published>2024-09-11T15:35:44Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=609366e7a06d035990df78f1562291c3bf0d4a12'/>
<id>urn:sha1:609366e7a06d035990df78f1562291c3bf0d4a12</id>
<content type='text'>
In the cdns_i3c_master_probe function, &amp;master-&gt;hj_work is bound with
cdns_i3c_master_hj. And cdns_i3c_master_interrupt can call
cnds_i3c_master_demux_ibis function to start the work.

If we remove the module which will call cdns_i3c_master_remove to
make cleanup, it will free master-&gt;base through i3c_master_unregister
while the work mentioned above will be used. The sequence of operations
that may lead to a UAF bug is as follows:

CPU0                                      CPU1

                                     | cdns_i3c_master_hj
cdns_i3c_master_remove               |
i3c_master_unregister(&amp;master-&gt;base) |
device_unregister(&amp;master-&gt;dev)      |
device_release                       |
//free master-&gt;base                  |
                                     | i3c_master_do_daa(&amp;master-&gt;base)
                                     | //use master-&gt;base

Fix it by ensuring that the work is canceled before proceeding with
the cleanup in cdns_i3c_master_remove.

Signed-off-by: Kaixin Wang &lt;kxwang23@m.fudan.edu.cn&gt;
Link: https://lore.kernel.org/r/20240911153544.848398-1-kxwang23@m.fudan.edu.cn
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>i3c: master: svc: adjust SDR according to i3c spec</title>
<updated>2024-09-17T14:48:40Z</updated>
<author>
<name>Carlos Song</name>
<email>carlos.song@nxp.com</email>
</author>
<published>2024-07-19T08:02:33Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=96267f358c14e88e07f1d96ed6f1827da59e9ecc'/>
<id>urn:sha1:96267f358c14e88e07f1d96ed6f1827da59e9ecc</id>
<content type='text'>
According to I3C Specification(Version 1.1) 5.1.2.4 "Use of Clock
Speed to Prevent Legacy I2C Devices From Seeing I3C traffic", when
slow i2c devices(FM/FM+ rate i2c frequency without 50ns filter)
works on i3c bus, i3c SDR should work at FM/FM+ rate.

Adjust timing for difference mode.

Signed-off-by: Clark Wang &lt;xiaoning.wang@nxp.com&gt;
Signed-off-by: Carlos Song &lt;carlos.song@nxp.com&gt;
Signed-off-by: Frank Li &lt;frank.li@nxp.com&gt;
Acked-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20240719080233.842771-1-carlos.song@nxp.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>i3c: master: svc: use slow speed for first broadcast address</title>
<updated>2024-09-17T14:46:22Z</updated>
<author>
<name>Carlos Song</name>
<email>carlos.song@nxp.com</email>
</author>
<published>2024-09-10T05:16:26Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=20ade67bb1645f5ce8f37fa79ddfebbc5b5b24ef'/>
<id>urn:sha1:20ade67bb1645f5ce8f37fa79ddfebbc5b5b24ef</id>
<content type='text'>
I3C controller should support adjusting open drain timing for the first
broadcast address to make I3C device working as a i2c device can see slow
broadcast address to close its Spike Filter to change working at i3c mode.

Signed-off-by: Carlos Song &lt;carlos.song@nxp.com&gt;
Reviewed-by: Frank Li &lt;frank.li@nxp.com&gt;
Link: https://lore.kernel.org/r/20240910051626.4052552-2-carlos.song@nxp.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>i3c/master: cmd_v1: Fix the rule for getting i3c mode</title>
<updated>2024-09-06T15:36:02Z</updated>
<author>
<name>Billy Tsai</name>
<email>billy_tsai@aspeedtech.com</email>
</author>
<published>2024-08-26T03:38:21Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=061dd21ca712cd7103c26ed77bb4a04d98930981'/>
<id>urn:sha1:061dd21ca712cd7103c26ed77bb4a04d98930981</id>
<content type='text'>
Based on the I3C TCRI specification, the rules for determining the I3C
mode are as follows:
I3C SCL rate &gt; 8MHz: use SDR0, as SDR1 has a maximum data rate of 8MHz
I3C SCL rate &gt; 6MHz: use SDR1, as SDR2 has a maximum data rate of 6MHz
I3C SCL rate &gt; 4MHz: use SDR2, as SDR3 has a maximum data rate of 4MHz
I3C SCL rate &gt; 2MHz: use SDR3, as SDR4 has a maximum data rate of 2MHz
Otherwise, use SDR4

Signed-off-by: Billy Tsai &lt;billy_tsai@aspeedtech.com&gt;
Link: https://lore.kernel.org/r/20240826033821.175591-1-billy_tsai@aspeedtech.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>i3c: master: cdns: fix module autoloading</title>
<updated>2024-09-05T16:46:19Z</updated>
<author>
<name>Liao Chen</name>
<email>liaochen4@huawei.com</email>
</author>
<published>2024-08-26T12:39:57Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=133f67bea5e03134b4b388a884e59a052809403d'/>
<id>urn:sha1:133f67bea5e03134b4b388a884e59a052809403d</id>
<content type='text'>
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from of_device_id table.

Signed-off-by: Liao Chen &lt;liaochen4@huawei.com&gt;
Link: https://lore.kernel.org/r/20240826123957.379212-1-liaochen4@huawei.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>i3c: mipi-i3c-hci: Add a quirk to set Response buffer threshold</title>
<updated>2024-09-05T16:34:09Z</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2024-08-29T09:17:13Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=ced86959d28cc26bbfc5f2fd6e37407637c20e11'/>
<id>urn:sha1:ced86959d28cc26bbfc5f2fd6e37407637c20e11</id>
<content type='text'>
The current driver sets the response buffer threshold value to 1
(N+1, 2 DWORDS) in the QUEUE THRESHOLD register. However, the AMD
I3C controller only generates interrupts when the response buffer
threshold value is set to 0 (1 DWORD).

Therefore, a quirk is added to set the response buffer threshold value
to 0.

Reviewed-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Co-developed-by: Krishnamoorthi M &lt;krishnamoorthi.m@amd.com&gt;
Signed-off-by: Krishnamoorthi M &lt;krishnamoorthi.m@amd.com&gt;
Co-developed-by: Guruvendra Punugupati &lt;Guruvendra.Punugupati@amd.com&gt;
Signed-off-by: Guruvendra Punugupati &lt;Guruvendra.Punugupati@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://lore.kernel.org/r/20240829091713.736217-7-Shyam-sundar.S-k@amd.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>i3c: mipi-i3c-hci: Add a quirk to set timing parameters</title>
<updated>2024-09-05T16:34:09Z</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2024-08-29T09:17:12Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=46d4daa517e91a197ad253c1d81de29e8e2980be'/>
<id>urn:sha1:46d4daa517e91a197ad253c1d81de29e8e2980be</id>
<content type='text'>
The AMD HCI controller is currently unstable at 12.5 MHz. To address this,
a quirk is added to configure the clock rate to 9 MHz as a workaround,
with proportional adjustments to the Open-Drain (OD) and Push-Pull (PP)
values.

Reviewed-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Co-developed-by: Guruvendra Punugupati &lt;Guruvendra.Punugupati@amd.com&gt;
Signed-off-by: Guruvendra Punugupati &lt;Guruvendra.Punugupati@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://lore.kernel.org/r/20240829091713.736217-6-Shyam-sundar.S-k@amd.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>i3c: mipi-i3c-hci: Relocate helper macros to HCI header file</title>
<updated>2024-09-05T16:34:09Z</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2024-08-29T09:17:11Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=216201b3d7df0a9d2c848789b65c7f332f84a3af'/>
<id>urn:sha1:216201b3d7df0a9d2c848789b65c7f332f84a3af</id>
<content type='text'>
The reg_* helper macros are currently limited to core.c. Moving them to
hci.h will allow their functionality to be utilized in other files outside
of core.c.

Reviewed-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Co-developed-by: Guruvendra Punugupati &lt;Guruvendra.Punugupati@amd.com&gt;
Signed-off-by: Guruvendra Punugupati &lt;Guruvendra.Punugupati@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://lore.kernel.org/r/20240829091713.736217-5-Shyam-sundar.S-k@amd.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>i3c: mipi-i3c-hci: Add a quirk to set PIO mode</title>
<updated>2024-09-05T16:34:08Z</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2024-08-29T09:17:10Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=01408932995319eaa3d892c3c5d7739cff5da25b'/>
<id>urn:sha1:01408932995319eaa3d892c3c5d7739cff5da25b</id>
<content type='text'>
The AMD HCI controller currently only supports PIO mode but exposes DMA
rings to the OS, which leads to the controller being configured in DMA
mode. To address this, add a quirk to avoid configuring the controller in
DMA mode and default to PIO mode.

Additionally, introduce a generic quirk infrastructure to the mipi-i3c-hci
driver to facilitate seamless future quirk additions.

Reviewed-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Co-developed-by: Krishnamoorthi M &lt;krishnamoorthi.m@amd.com&gt;
Signed-off-by: Krishnamoorthi M &lt;krishnamoorthi.m@amd.com&gt;
Co-developed-by: Guruvendra Punugupati &lt;Guruvendra.Punugupati@amd.com&gt;
Signed-off-by: Guruvendra Punugupati &lt;Guruvendra.Punugupati@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://lore.kernel.org/r/20240829091713.736217-4-Shyam-sundar.S-k@amd.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
</feed>
