<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tee/optee, branch v4.19.112</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-02-05T14:43:50+00:00</updated>
<entry>
<title>tee: optee: Fix compilation issue with nommu</title>
<updated>2020-02-05T14:43:50+00:00</updated>
<author>
<name>Vincenzo Frascino</name>
<email>vincenzo.frascino@arm.com</email>
</author>
<published>2020-01-10T12:28:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3ac901fc064ddcfbe3e24af4a25f67ee182e4581'/>
<id>urn:sha1:3ac901fc064ddcfbe3e24af4a25f67ee182e4581</id>
<content type='text'>
[ Upstream commit 9e0caab8e0f96f0af7d1dd388e62f44184a75372 ]

The optee driver uses specific page table types to verify if a memory
region is normal. These types are not defined in nommu systems. Trying
to compile the driver in these systems results in a build error:

  linux/drivers/tee/optee/call.c: In function ‘is_normal_memory’:
  linux/drivers/tee/optee/call.c:533:26: error: ‘L_PTE_MT_MASK’ undeclared
     (first use in this function); did you mean ‘PREEMPT_MASK’?
     return (pgprot_val(p) &amp; L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC;
                             ^~~~~~~~~~~~~
                             PREEMPT_MASK
  linux/drivers/tee/optee/call.c:533:26: note: each undeclared identifier is
     reported only once for each function it appears in
  linux/drivers/tee/optee/call.c:533:44: error: ‘L_PTE_MT_WRITEALLOC’ undeclared
     (first use in this function)
     return (pgprot_val(p) &amp; L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC;
                                            ^~~~~~~~~~~~~~~~~~~

Make the optee driver depend on MMU to fix the compilation issue.

Signed-off-by: Vincenzo Frascino &lt;vincenzo.frascino@arm.com&gt;
[jw: update commit title]
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: optee: add missing of_node_put after of_device_is_available</title>
<updated>2019-11-24T07:19:08+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2019-02-23T13:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f4ab0b49cf2e85a9dd94fa1a34e782fba15c8e1'/>
<id>urn:sha1:4f4ab0b49cf2e85a9dd94fa1a34e782fba15c8e1</id>
<content type='text'>
commit c7c0d8df0b94a67377555a550b8d66ee2ad2f4ed upstream.

Add an of_node_put when a tested device node is not available.

The semantic patch that fixes this problem is as follows
(http://coccinelle.lip6.fr):

// &lt;smpl&gt;
@@
identifier f;
local idexpression e;
expression x;
@@

e = f(...);
... when != of_node_put(e)
    when != x = e
    when != e = x
    when any
if (&lt;+...of_device_is_available(e)...+&gt;) {
  ... when != of_node_put(e)
(
  return e;
|
+ of_node_put(e);
  return ...;
)
}
// &lt;/smpl&gt;

Fixes: db878f76b9ff ("tee: optee: take DT status property into account")
Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Cc: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tee: optee: take DT status property into account</title>
<updated>2019-11-20T17:45:20+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2018-08-01T09:48:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75a600d7f062a9633fe9f5728aa2e26c13193e40'/>
<id>urn:sha1:75a600d7f062a9633fe9f5728aa2e26c13193e40</id>
<content type='text'>
[ Upstream commit db878f76b9ff7487da9bb0f686153f81829f1230 ]

DT nodes may have a 'status' property which, if set to anything other
than 'ok' or 'okay', indicates to the OS that the DT node should be
treated as if it was not present. So add that missing logic to the
OP-TEE driver.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&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: optee: avoid possible double list_del()</title>
<updated>2019-02-12T18:47:08+00:00</updated>
<author>
<name>Zhizhou Zhang</name>
<email>zhizhouzhang@asrmicro.com</email>
</author>
<published>2018-11-21T03:01:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39d4c1c0dd7678d19bdab1f7e3ba8dc4217f636d'/>
<id>urn:sha1:39d4c1c0dd7678d19bdab1f7e3ba8dc4217f636d</id>
<content type='text'>
[ Upstream commit b2d102bd0146d9eb1fa630ca0cd19a15ef2f74c8 ]

This bug occurs when:

- a new request arrives, one thread(let's call it A) is pending in
  optee_supp_req() with req-&gt;busy is initial value false.

- tee-supplicant is killed, then optee_supp_release() is called, this
  function calls list_del(&amp;req-&gt;link), and set supp-&gt;ctx to NULL. And
  it also wake up process A.

- process A continues, it firstly checks supp-&gt;ctx which is NULL,
  then checks req-&gt;busy which is false, at last run list_del(&amp;req-&gt;link).
  This triggers double list_del() and results kernel panic.

For solve this problem, we rename req-&gt;busy to req-&gt;in_queue, and
associate it with state of whether req is linked to supp-&gt;reqs. So we
can just only check req-&gt;in_queue to make decision calling list_del()
or not.

Signed-off-by: Zhizhou Zhang &lt;zhizhouzhang@asrmicro.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: optee: making OPTEE_SHM_NUM_PRIV_PAGES configurable via Kconfig</title>
<updated>2018-06-20T09:20:36+00:00</updated>
<author>
<name>Sahil Malhotra</name>
<email>sahil.malhotra@nxp.com</email>
</author>
<published>2018-06-08T07:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3249527f19d660c5adfb2b6f4ffd4ca0506b8755'/>
<id>urn:sha1:3249527f19d660c5adfb2b6f4ffd4ca0506b8755</id>
<content type='text'>
This change adds KCONFIG option to set number of pages out of
whole shared memory to be used for OP-TEE driver private data
structures.

Signed-off-by: Sahil Malhotra &lt;sahil.malhotra@nxp.com&gt;
[jw: fixing trivial merge conflict]
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
</entry>
<entry>
<title>tee: replace getnstimeofday64() with ktime_get_real_ts64()</title>
<updated>2018-06-19T14:37:14+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-06-18T14:24:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf89fe88a676d9482313b6b674e9edce34591400'/>
<id>urn:sha1:cf89fe88a676d9482313b6b674e9edce34591400</id>
<content type='text'>
The two do the same thing, but we want to have a consistent
naming in the kernel.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&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:55+00:00</updated>
<author>
<name>Jérôme Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2017-11-24T14:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/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:55+00:00</updated>
<author>
<name>Jérôme Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2017-11-24T14:47:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/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>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:06+00:00</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2018-01-12T02:05:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/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: optee: check type of registered shared memory</title>
<updated>2017-12-28T12:21:27+00:00</updated>
<author>
<name>Jens Wiklander</name>
<email>jens.wiklander@linaro.org</email>
</author>
<published>2017-12-28T10:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/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>
