<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/tee, branch v4.17.13</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.17.13</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.17.13'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-05-07T09:51:03Z</updated>
<entry>
<title>tee: check shm references are consistent in offset/size</title>
<updated>2018-05-07T09:51:03Z</updated>
<author>
<name>Etienne Carriere</name>
<email>etienne.carriere@linaro.org</email>
</author>
<published>2018-04-29T12:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ab9d3db5b320a052452b9cd035599ee3c84bbee9'/>
<id>urn:sha1:ab9d3db5b320a052452b9cd035599ee3c84bbee9</id>
<content type='text'>
This change prevents userland from referencing TEE shared memory
outside the area initially allocated by its owner. Prior this change an
application could not reference or access memory it did not own but
it could reference memory not explicitly allocated by owner but still
allocated to the owner due to the memory allocation granule.

Reported-by: Alexandre Jutras &lt;alexandre.jutras@nxp.com&gt;
Signed-off-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: shm: fix use-after-free via temporarily dropped reference</title>
<updated>2018-05-07T09:50:25Z</updated>
<author>
<name>Jann Horn</name>
<email>jannh@google.com</email>
</author>
<published>2018-04-04T19:03:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bb765d1c331f62b59049d35607ed2e365802bef9'/>
<id>urn:sha1:bb765d1c331f62b59049d35607ed2e365802bef9</id>
<content type='text'>
Bump the file's refcount before moving the reference into the fd table,
not afterwards. The old code could drop the file's refcount to zero for a
short moment before calling get_file() via get_dma_buf().

This code can only be triggered on ARM systems that use Linaro's OP-TEE.

Fixes: 967c9cca2cc5 ("tee: generic TEE subsystem")
Signed-off-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: optee: report OP-TEE revision information</title>
<updated>2018-03-06T10:03:55Z</updated>
<author>
<name>Jérôme Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2017-11-24T14:47:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5c5f80307ab27c53b56569245a0b12f4e3b577de'/>
<id>urn:sha1:5c5f80307ab27c53b56569245a0b12f4e3b577de</id>
<content type='text'>
When the driver initializes, report the following information
about the OP-TEE OS:
- major and minor version,
- build identifier (if available).

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Matthias Brugger &lt;mbruger@suse.com&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: optee: GET_OS_REVISION: document a2 as a build identifier</title>
<updated>2018-03-06T10:03:55Z</updated>
<author>
<name>Jérôme Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2017-11-24T14:47:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6e112de0427874500fb9c373595481653ae4078d'/>
<id>urn:sha1:6e112de0427874500fb9c373595481653ae4078d</id>
<content type='text'>
In the OPTEE_SMC_CALL_GET_OS_REVISION request, the previously reserved
parameter a2 is now documented as being an optional build identifier
(such as an SCM revision or commit ID, for instance).

A new structure optee_smc_call_get_os_revision_result is introduced to
be used when querying the secure OS version, instead of re-using the
struct defined for OPTEE_SMC_CALLS_REVISION.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Matthias Brugger &lt;mbruger@suse.com&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: correct max value for id allocation</title>
<updated>2018-03-06T10:03:55Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2018-01-15T09:27:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7dd003aec2016e90d33f25f90ad4cebb12224a8a'/>
<id>urn:sha1:7dd003aec2016e90d33f25f90ad4cebb12224a8a</id>
<content type='text'>
The privileged dev id range is [TEE_NUM_DEVICES / 2, TEE_NUM_DEVICES).
The non-privileged dev id range is [0, TEE_NUM_DEVICES / 2).

So when finding a slot for them, need to use different max value.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'tee-drv-dynamic-shm+fixes-for-v4.16' of https://git.linaro.org/people/jens.wiklander/linux-tee into next/drivers</title>
<updated>2018-01-12T02:05:06Z</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2018-01-12T02:05:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ffdc98c4f25b1f4fb96cd9190917b53a760f3fec'/>
<id>urn:sha1:ffdc98c4f25b1f4fb96cd9190917b53a760f3fec</id>
<content type='text'>
This pull request updates the previous tee-drv-dynamic-shm-for-v4.16 pull
request with five new patches fixing review comments and errors.

Apart from three small fixes there's two larger patches that in the end
checks that memory to be registered really is normal cached memory.

* tag 'tee-drv-dynamic-shm+fixes-for-v4.16' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: shm: Potential NULL dereference calling tee_shm_register()
  tee: shm: don't put_page on null shm-&gt;pages
  tee: shm: make function __tee_shm_alloc static
  tee: optee: check type of registered shared memory
  tee: add start argument to shm_register callback

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
</entry>
<entry>
<title>tee: shm: Potential NULL dereference calling tee_shm_register()</title>
<updated>2018-01-09T13:34:00Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-01-06T09:22:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2490cdf6435b1d3cac0dbf710cd752487c67c296'/>
<id>urn:sha1:2490cdf6435b1d3cac0dbf710cd752487c67c296</id>
<content type='text'>
get_user_pages_fast() can return zero in certain error paths.  We should
handle that or else it means we accidentally return ERR_PTR(0) which is
NULL instead of an error pointer.  The callers are not expecting that
and will crash with a NULL dereference.

Fixes: 033ddf12bcf5 ("tee: add register user memory")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: shm: don't put_page on null shm-&gt;pages</title>
<updated>2017-12-28T21:20:10Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-12-22T17:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c94f31b526fe658c25dd2d07c90486a85437f01c'/>
<id>urn:sha1:c94f31b526fe658c25dd2d07c90486a85437f01c</id>
<content type='text'>
In the case that shm-&gt;pages fails to allocate, the current exit
error path will try to put_page on a null shm-&gt;pages and cause
a null pointer dereference when accessing shm-&gt;pages[n]. Fix this
by only performing the put_page and kfree on shm-&gt;pages if it
is not null.

Detected by CoverityScan, CID#1463283 ("Dereference after null check")

Fixes: 033ddf12bcf5 ("tee: add register user memory")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: shm: make function __tee_shm_alloc static</title>
<updated>2017-12-28T21:19:57Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-12-22T17:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=80ec6f5de60b6934f145b2f7e5369592bcab85f3'/>
<id>urn:sha1:80ec6f5de60b6934f145b2f7e5369592bcab85f3</id>
<content type='text'>
The function __tee_shm_alloc is local to the source and does
not need to be in global scope, so make it static.

Cleans up sparse warning:
symbol '__tee_shm_alloc' was not declared. Should it be static?

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: optee: check type of registered shared memory</title>
<updated>2017-12-28T12:21:27Z</updated>
<author>
<name>Jens Wiklander</name>
<email>jens.wiklander@linaro.org</email>
</author>
<published>2017-12-28T10:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cdbcf83d29c1bf2aaa65260e74beaac1bcdc231c'/>
<id>urn:sha1:cdbcf83d29c1bf2aaa65260e74beaac1bcdc231c</id>
<content type='text'>
Checks the memory type of the pages to be registered as shared memory.
Only normal cached memory is allowed.

Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
</feed>
