<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/tee/optee, branch v5.0</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>tee: optee: add missing of_node_put after of_device_is_available</title>
<updated>2019-02-28T09:23:04+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.toradex.cn/cgit/linux-toradex.git/commit/?id=c7c0d8df0b94a67377555a550b8d66ee2ad2f4ed'/>
<id>c7c0d8df0b94a67377555a550b8d66ee2ad2f4ed</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'tee-subsys-optee-for-4.21' of https://git.linaro.org/people/jens.wiklander/linux-tee into next/late</title>
<updated>2018-12-31T21:06:30+00:00</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2018-12-31T21:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e0bd98f8ceffce3da9c09cdcf5f5f30d4d9bd59'/>
<id>5e0bd98f8ceffce3da9c09cdcf5f5f30d4d9bd59</id>
<content type='text'>
OP-TEE dynamic shm log message

Adds a log message in the OP-TEE driver to inform that dynamic shared
memory is enabled.

* tag 'tee-subsys-optee-for-4.21' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: log message if dynamic shm is enabled

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OP-TEE dynamic shm log message

Adds a log message in the OP-TEE driver to inform that dynamic shared
memory is enabled.

* tag 'tee-subsys-optee-for-4.21' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: log message if dynamic shm is enabled

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tee: optee: log message if dynamic shm is enabled</title>
<updated>2018-12-11T13:38:40+00:00</updated>
<author>
<name>Victor Chong</name>
<email>victor.chong@linaro.org</email>
</author>
<published>2018-04-11T09:19:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c15ddb97c77f34ba009910becd5921f169770a2'/>
<id>3c15ddb97c77f34ba009910becd5921f169770a2</id>
<content type='text'>
When dynamic shared memory support is enabled in the OP-TEE Trusted
OS, it doesn't mean that the driver supports it, which can confuse
users during debugging. Log a message when dynamic shared memory is
enabled in the driver, to let users know for sure.

Suggested-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Signed-off-by: Victor Chong &lt;victor.chong@linaro.org&gt;
Reviewed-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When dynamic shared memory support is enabled in the OP-TEE Trusted
OS, it doesn't mean that the driver supports it, which can confuse
users during debugging. Log a message when dynamic shared memory is
enabled in the driver, to let users know for sure.

Suggested-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Signed-off-by: Victor Chong &lt;victor.chong@linaro.org&gt;
Reviewed-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Signed-off-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tee: optee: avoid possible double list_del()</title>
<updated>2018-12-11T13:38:21+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.toradex.cn/cgit/linux-toradex.git/commit/?id=b2d102bd0146d9eb1fa630ca0cd19a15ef2f74c8'/>
<id>b2d102bd0146d9eb1fa630ca0cd19a15ef2f74c8</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'tee-drv-for-4.20' of git://git.linaro.org/people/jens.wiklander/linux-tee into next/drivers</title>
<updated>2018-08-26T23:27:32+00:00</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2018-08-26T23:27:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=63c65b872562a2faf8a3a289c117d0c0e3bceb5a'/>
<id>63c65b872562a2faf8a3a289c117d0c0e3bceb5a</id>
<content type='text'>
Misc enhancement for tee driver subsystem

* Adds a kernel internal tee client interface allowing other drivers
  etc to access a TEE
* OP-TEE driver takes DT status property into account

* tag 'tee-drv-for-4.20' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: add kernel internal client interface
  tee: optee: take DT status property into account

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Misc enhancement for tee driver subsystem

* Adds a kernel internal tee client interface allowing other drivers
  etc to access a TEE
* OP-TEE driver takes DT status property into account

* tag 'tee-drv-for-4.20' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: add kernel internal client interface
  tee: optee: take DT status property into account

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tee: optee: take DT status property into account</title>
<updated>2018-08-24T09:55:18+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.toradex.cn/cgit/linux-toradex.git/commit/?id=db878f76b9ff7487da9bb0f686153f81829f1230'/>
<id>db878f76b9ff7487da9bb0f686153f81829f1230</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.toradex.cn/cgit/linux-toradex.git/commit/?id=3249527f19d660c5adfb2b6f4ffd4ca0506b8755'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.toradex.cn/cgit/linux-toradex.git/commit/?id=cf89fe88a676d9482313b6b674e9edce34591400'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.toradex.cn/cgit/linux-toradex.git/commit/?id=5c5f80307ab27c53b56569245a0b12f4e3b577de'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.toradex.cn/cgit/linux-toradex.git/commit/?id=6e112de0427874500fb9c373595481653ae4078d'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
</feed>
