<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/misc/fastrpc.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-10-22T06:03:24+00:00</updated>
<entry>
<title>misc: fastrpc: Fix dma_buf object leak in fastrpc_map_lookup</title>
<updated>2025-10-22T06:03:24+00:00</updated>
<author>
<name>Junhao Xie</name>
<email>bigfoot@radxa.com</email>
</author>
<published>2025-10-17T08:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fff111bf45cbeeb659324316d68554e35d350092'/>
<id>urn:sha1:fff111bf45cbeeb659324316d68554e35d350092</id>
<content type='text'>
In fastrpc_map_lookup, dma_buf_get is called to obtain a reference to
the dma_buf for comparison purposes. However, this reference is never
released when the function returns, leading to a dma_buf memory leak.

Fix this by adding dma_buf_put before returning from the function,
ensuring that the temporarily acquired reference is properly released
regardless of whether a matching map is found.

Fixes: 9031626ade38 ("misc: fastrpc: Fix fastrpc_map_lookup operation")
Cc: stable@kernel.org
Signed-off-by: Junhao Xie &lt;bigfoot@radxa.com&gt;
Tested-by: Xilin Wu &lt;sophon@radxa.com&gt;
Rule: add
Link: https://lore.kernel.org/stable/48B368FB4C7007A7%2B20251017083906.3259343-1-bigfoot%40radxa.com
Link: https://patch.msgid.link/48B368FB4C7007A7+20251017083906.3259343-1-bigfoot@radxa.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'char-misc-6.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc</title>
<updated>2025-10-07T19:13:26+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-10-07T19:13:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fdb8d00af919d2403a9e40261cf3f78f0fd75212'/>
<id>urn:sha1:fdb8d00af919d2403a9e40261cf3f78f0fd75212</id>
<content type='text'>
Pull char/misc fixes from Greg KH:
 "Here are some small nvmem and fastrpc fixes that missed the cut-off to
  get into 6.17-final, due to me being slow in getting them out, my
  fault, not the maintainers of these subsystems :(

  Anyway, better late than never.  Changes included in here are:

   - nvmem fix for automatic module loading

   - fastrpc driver fixes for reported issues

  All of these have been in linux-next for weeks (4?) with no reported
  issues"

* tag 'char-misc-6.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  misc: fastrpc: Skip reference for DMA handles
  misc: fastrpc: fix possible map leak in fastrpc_put_args
  misc: fastrpc: Fix fastrpc_map_lookup operation
  misc: fastrpc: Save actual DMA size in fastrpc_map structure
  nvmem: layouts: fix automatic module loading
</content>
</entry>
<entry>
<title>misc: fastrpc: Skip reference for DMA handles</title>
<updated>2025-09-12T14:34:10+00:00</updated>
<author>
<name>Ling Xu</name>
<email>quic_lxu5@quicinc.com</email>
</author>
<published>2025-09-12T13:12:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10df039834f84a297c72ec962c0f9b7c8c5ca31a'/>
<id>urn:sha1:10df039834f84a297c72ec962c0f9b7c8c5ca31a</id>
<content type='text'>
If multiple dma handles are passed with same fd over a remote call
the kernel driver takes a reference and expects that put for the
map will be called as many times to free the map. But DSP only
updates the fd one time in the fd list when the DSP refcount
goes to zero and hence kernel make put call only once for the
fd. This can cause SMMU fault issue as the same fd can be used
in future for some other call.

Fixes: 35a82b87135d ("misc: fastrpc: Add dma handle implementation")
Cc: stable@kernel.org
Co-developed-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ling Xu &lt;quic_lxu5@quicinc.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srini@kernel.org&gt;
Link: https://lore.kernel.org/r/20250912131236.303102-5-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: fastrpc: fix possible map leak in fastrpc_put_args</title>
<updated>2025-09-12T14:34:10+00:00</updated>
<author>
<name>Ling Xu</name>
<email>quic_lxu5@quicinc.com</email>
</author>
<published>2025-09-12T13:12:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=da1ba64176e0138f2bfa96f9e43e8c3640d01e1e'/>
<id>urn:sha1:da1ba64176e0138f2bfa96f9e43e8c3640d01e1e</id>
<content type='text'>
copy_to_user() failure would cause an early return without cleaning up
the fdlist, which has been updated by the DSP. This could lead to map
leak. Fix this by redirecting to a cleanup path on failure, ensuring
that all mapped buffers are properly released before returning.

Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method")
Cc: stable@kernel.org
Co-developed-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ling Xu &lt;quic_lxu5@quicinc.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srini@kernel.org&gt;
Link: https://lore.kernel.org/r/20250912131236.303102-4-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: fastrpc: Fix fastrpc_map_lookup operation</title>
<updated>2025-09-12T14:34:10+00:00</updated>
<author>
<name>Ling Xu</name>
<email>quic_lxu5@quicinc.com</email>
</author>
<published>2025-09-12T13:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9031626ade38b092b72638dfe0c6ffce8d8acd43'/>
<id>urn:sha1:9031626ade38b092b72638dfe0c6ffce8d8acd43</id>
<content type='text'>
Fastrpc driver creates maps for user allocated fd buffers. Before
creating a new map, the map list is checked for any already existing
maps using map fd. Checking with just map fd is not sufficient as the
user can pass offsetted buffer with less size when the map is created
and then a larger size the next time which could result in memory
issues. Check for dma_buf object also when looking up for the map.

Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method")
Cc: stable@kernel.org
Co-developed-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ling Xu &lt;quic_lxu5@quicinc.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srini@kernel.org&gt;
Link: https://lore.kernel.org/r/20250912131236.303102-3-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: fastrpc: Save actual DMA size in fastrpc_map structure</title>
<updated>2025-09-12T14:34:10+00:00</updated>
<author>
<name>Ling Xu</name>
<email>quic_lxu5@quicinc.com</email>
</author>
<published>2025-09-12T13:12:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8b5b456222fd604079b5cf2af1f25ad690f54a25'/>
<id>urn:sha1:8b5b456222fd604079b5cf2af1f25ad690f54a25</id>
<content type='text'>
For user passed fd buffer, map is created using DMA calls. The
map related information is stored in fastrpc_map structure. The
actual DMA size is not stored in the structure. Store the actual
size of buffer and check it against the user passed size.

Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method")
Cc: stable@kernel.org
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Co-developed-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ling Xu &lt;quic_lxu5@quicinc.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srini@kernel.org&gt;
Link: https://lore.kernel.org/r/20250912131236.303102-2-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: fastrpc: add support for gdsp remoteproc</title>
<updated>2025-09-12T13:48:45+00:00</updated>
<author>
<name>Ling Xu</name>
<email>quic_lxu5@quicinc.com</email>
</author>
<published>2025-09-12T13:13:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=698de37f78c7c0100f5506df36871c64588636e9'/>
<id>urn:sha1:698de37f78c7c0100f5506df36871c64588636e9</id>
<content type='text'>
Some platforms (like lemans) feature one or more GPDSPs (General
Purpose DSPs). Similar to other kinds of Hexagon DSPs, they provide
a FastRPC implementation, allowing code execution in both signed and
unsigned protection domains. Extend the checks to allow domain names
starting with "gdsp" (possibly followed by an index).

Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Reviewed-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ling Xu &lt;quic_lxu5@quicinc.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srini@kernel.org&gt;
Link: https://lore.kernel.org/r/20250912131302.303199-5-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: fastrpc: Cleanup the domain names</title>
<updated>2025-09-12T13:48:45+00:00</updated>
<author>
<name>Ling Xu</name>
<email>quic_lxu5@quicinc.com</email>
</author>
<published>2025-09-12T13:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb4679f628956e09467e66835025f9a9bcead238'/>
<id>urn:sha1:fb4679f628956e09467e66835025f9a9bcead238</id>
<content type='text'>
Currently the domain ids are added for each instance of domains, this is
totally not scalable approach. Clean this mess and create domain ids for
only domains not its instances.

Co-developed-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Reviewed-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ling Xu &lt;quic_lxu5@quicinc.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srini@kernel.org&gt;
Link: https://lore.kernel.org/r/20250912131302.303199-4-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: fastrpc: Remove kernel-side domain checks from capability ioctl</title>
<updated>2025-09-12T13:48:45+00:00</updated>
<author>
<name>Ling Xu</name>
<email>quic_lxu5@quicinc.com</email>
</author>
<published>2025-09-12T13:13:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d81c041ed5e444233daaa2d4b0f9ae4008c57f59'/>
<id>urn:sha1:d81c041ed5e444233daaa2d4b0f9ae4008c57f59</id>
<content type='text'>
Domain ID in the uAPI is misleading. Remove checks and log messages
related to 'domain' field in capability structure. Update UAPI to
mark the field as unused.

Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Reviewed-by: Ekansh Gupta &lt;ekansh.gupta@oss.qualcomm.com&gt;
Signed-off-by: Ling Xu &lt;quic_lxu5@quicinc.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srini@kernel.org&gt;
Link: https://lore.kernel.org/r/20250912131302.303199-3-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: fastrpc: Use of_reserved_mem_region_to_resource() for "memory-region"</title>
<updated>2025-07-16T12:17:27+00:00</updated>
<author>
<name>Rob Herring (Arm)</name>
<email>robh@kernel.org</email>
</author>
<published>2025-07-03T18:34:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73cca2a7467b1ca91f7a7371a38b538061c7e58e'/>
<id>urn:sha1:73cca2a7467b1ca91f7a7371a38b538061c7e58e</id>
<content type='text'>
Use the newly added of_reserved_mem_region_to_resource() function to
handle "memory-region" properties.

The error handling is a bit different. "memory-region" is optional, so
failed lookup is not an error. But then an error in
of_reserved_mem_lookup() is treated as an error. However, that
distinction is not really important. Either the region is available
and usable or it is not. So now, it is just
of_reserved_mem_region_to_resource() which is checked for an error.

Signed-off-by: "Rob Herring (Arm)" &lt;robh@kernel.org&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Reviewed-by: Srinivas Kandagatla &lt;srini@kernel.org&gt;
Link: https://lore.kernel.org/r/20250703183455.2074215-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
