<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tee/tee_core.c, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-11-24T09:29:21+00:00</updated>
<entry>
<title>tee: allow a driver to allocate a tee_device without a pool</title>
<updated>2025-11-24T09:29:21+00:00</updated>
<author>
<name>Amirreza Zarrabi</name>
<email>amirreza.zarrabi@oss.qualcomm.com</email>
</author>
<published>2025-09-12T04:07:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ca9367da5beab9eddf875eaaa8e14342a38a901'/>
<id>urn:sha1:5ca9367da5beab9eddf875eaaa8e14342a38a901</id>
<content type='text'>
[ Upstream commit 6dbcd5a9ab6cb6644e7d728521da1c9035ec7235 ]

A TEE driver doesn't always need to provide a pool if it doesn't
support memory sharing ioctls and can allocate memory for TEE
messages in another way. Although this is mentioned in the
documentation for tee_device_alloc(), it is not handled correctly.

Reviewed-by: Sumit Garg &lt;sumit.garg@oss.qualcomm.com&gt;
Signed-off-by: Amirreza Zarrabi &lt;amirreza.zarrabi@oss.qualcomm.com&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tee: Prevent size calculation wraparound on 32-bit kernels</title>
<updated>2025-06-27T10:08:57+00:00</updated>
<author>
<name>Jann Horn</name>
<email>jannh@google.com</email>
</author>
<published>2025-04-28T13:06:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdc1b9b47bc574bbb6e2e2bc25843249b76d46d9'/>
<id>urn:sha1:cdc1b9b47bc574bbb6e2e2bc25843249b76d46d9</id>
<content type='text'>
[ Upstream commit 39bb67edcc582b3b386a9ec983da67fa8a10ec03 ]

The current code around TEE_IOCTL_PARAM_SIZE() is a bit wrong on
32-bit kernels: Multiplying a user-provided 32-bit value with the
size of a structure can wrap around on such platforms.

Fix it by using saturating arithmetic for the size calculation.

This has no security consequences because, in all users of
TEE_IOCTL_PARAM_SIZE(), the subsequent kcalloc() implicitly checks
for wrapping.

Signed-off-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Tested-by: Rouven Czerwinski &lt;rouven.czerwinski@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>driver core: class: remove module * from class_create()</title>
<updated>2023-03-17T14:16:33+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-03-13T18:18:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1aaba11da9aa7d7d6b52a74d45b31cac118295a1'/>
<id>urn:sha1:1aaba11da9aa7d7d6b52a74d45b31cac118295a1</id>
<content type='text'>
The module pointer in class_create() never actually did anything, and it
shouldn't have been requred to be set as a parameter even if it did
something.  So just remove it and fix up all callers of the function in
the kernel tree at the same time.

Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Link: https://lore.kernel.org/r/20230313181843.1207845-4-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: make struct bus_type.uevent() take a const *</title>
<updated>2023-01-27T12:45:52+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-01-11T11:30:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2a81ada32f0e584fc0c943e0d3a8c9f4fae411d6'/>
<id>urn:sha1:2a81ada32f0e584fc0c943e0d3a8c9f4fae411d6</id>
<content type='text'>
The uevent() callback in struct bus_type should not be modifying the
device that is passed into it, so mark it as a const * and propagate the
function signature changes out into all relevant subsystems that use
this callback.

Acked-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20230111113018.459199-16-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tee: tee_get_drvdata(): fix description of return value</title>
<updated>2022-07-08T08:51:24+00:00</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2022-06-06T11:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5ce073c8a1e01b215a5eb32ba48f8d17ded3bd5'/>
<id>urn:sha1:e5ce073c8a1e01b215a5eb32ba48f8d17ded3bd5</id>
<content type='text'>
This patch fixes the description of tee_get_drvdata()'s return value.
It actually returns the driver_data pointer supplied to
tee_device_alloc() since the TEE subsystem was added to the kernel.

Fixes: 967c9cca2cc5 ("tee: generic TEE subsystem")
Cc: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: remove flags TEE_IOCTL_SHM_MAPPED and TEE_IOCTL_SHM_DMA_BUF</title>
<updated>2022-04-26T08:17:03+00:00</updated>
<author>
<name>Andrew Davis</name>
<email>afd@ti.com</email>
</author>
<published>2022-04-25T14:16:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d8fc1c7c4c9b705ce5f5bba772ad66a0137c685d'/>
<id>urn:sha1:d8fc1c7c4c9b705ce5f5bba772ad66a0137c685d</id>
<content type='text'>
These look to be leftover from an early edition of this driver. Userspace
does not need this information. Checking all users of this that I have
access to I have verified no one is using them.

They leak internal use flags out to userspace. Even more they are not
correct anymore after a45ea4efa358. Lets drop these flags before
someone does try to use them for something and they become ABI.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Acked-by: Sumit Garg &lt;sumit.garg@linaro.org&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: add tee_shm_register_{user,kernel}_buf()</title>
<updated>2022-02-16T06:49:41+00:00</updated>
<author>
<name>Jens Wiklander</name>
<email>jens.wiklander@linaro.org</email>
</author>
<published>2022-02-04T09:33:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=056d3fed3d1ff3f5d699be337f048f9eed2befaf'/>
<id>urn:sha1:056d3fed3d1ff3f5d699be337f048f9eed2befaf</id>
<content type='text'>
Adds the two new functions tee_shm_register_user_buf() and
tee_shm_register_kernel_buf() which should be used instead of the old
tee_shm_register().

This avoids having the caller supplying the flags parameter which
exposes a bit more than desired of the internals of the TEE subsystem.

Reviewed-by: Sumit Garg &lt;sumit.garg@linaro.org&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: add tee_shm_alloc_user_buf()</title>
<updated>2022-02-16T06:49:41+00:00</updated>
<author>
<name>Jens Wiklander</name>
<email>jens.wiklander@linaro.org</email>
</author>
<published>2022-02-04T09:33:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=71cc47d4cc1f7a333584e0f2f7c863c71a6d3ced'/>
<id>urn:sha1:71cc47d4cc1f7a333584e0f2f7c863c71a6d3ced</id>
<content type='text'>
Adds a new function tee_shm_alloc_user_buf() for user mode allocations,
replacing passing the flags TEE_SHM_MAPPED | TEE_SHM_DMA_BUF to
tee_shm_alloc().

Reviewed-by: Sumit Garg &lt;sumit.garg@linaro.org&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: export teedev_open() and teedev_close_context()</title>
<updated>2021-11-17T13:08:55+00:00</updated>
<author>
<name>Jens Wiklander</name>
<email>jens.wiklander@linaro.org</email>
</author>
<published>2021-10-04T14:11:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1e2c3ef0496e72ba9001da5fd1b7ed56ccb30597'/>
<id>urn:sha1:1e2c3ef0496e72ba9001da5fd1b7ed56ccb30597</id>
<content type='text'>
Exports the two functions teedev_open() and teedev_close_context() in
order to make it easier to create a driver internal struct tee_context.

Reviewed-by: Sumit Garg &lt;sumit.garg@linaro.org&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: fix put order in teedev_close_context()</title>
<updated>2021-11-17T13:08:54+00:00</updated>
<author>
<name>Jens Wiklander</name>
<email>jens.wiklander@linaro.org</email>
</author>
<published>2021-06-15T20:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f18397ab3ae23e8e43bba9986e66af6d4497f2ad'/>
<id>urn:sha1:f18397ab3ae23e8e43bba9986e66af6d4497f2ad</id>
<content type='text'>
Prior to this patch was teedev_close_context() calling tee_device_put()
before teedev_ctx_put() leading to teedev_ctx_release() accessing
ctx-&gt;teedev just after the reference counter was decreased on the
teedev. Fix this by calling teedev_ctx_put() before tee_device_put().

Fixes: 217e0250cccb ("tee: use reference counting for tee_context")
Reviewed-by: Sumit Garg &lt;sumit.garg@linaro.org&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
</feed>
