<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/thunderbolt/domain.c, branch linux-5.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-06-22T16:58:32Z</updated>
<entry>
<title>thunderbolt: Split common NVM functionality into a separate file</title>
<updated>2020-06-22T16:58:32Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2020-03-05T09:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=719a5fe87ecd71d140c3ef76d855c70f82893411'/>
<id>urn:sha1:719a5fe87ecd71d140c3ef76d855c70f82893411</id>
<content type='text'>
We are going to reuse some of this functionality to implement retimer
NVM upgrade so move common NVM functionality into its own file. We also
rename the structure from tb_switch_nvm to tb_nvm to make it clear that
it is not just for switches.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Use scnprintf() for avoiding potential buffer overflow</title>
<updated>2020-03-12T08:27:41Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2020-03-11T09:28:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3010518964dc96c41848a05a5b0ec11ccf8d5ebe'/>
<id>urn:sha1:3010518964dc96c41848a05a5b0ec11ccf8d5ebe</id>
<content type='text'>
Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>crypto: shash - remove shash_desc::flags</title>
<updated>2019-04-25T07:38:12Z</updated>
<author>
<name>Eric Biggers</name>
</author>
<published>2019-04-15T00:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=877b5691f27a1aec0d9b53095a323e45c30069e2'/>
<id>urn:sha1:877b5691f27a1aec0d9b53095a323e45c30069e2</id>
<content type='text'>
The flags field in 'struct shash_desc' never actually does anything.
The only ostensibly supported flag is CRYPTO_TFM_REQ_MAY_SLEEP.
However, no shash algorithm ever sleeps, making this flag a no-op.

With this being the case, inevitably some users who can't sleep wrongly
pass MAY_SLEEP.  These would all need to be fixed if any shash algorithm
actually started sleeping.  For example, the shash_ahash_*() functions,
which wrap a shash algorithm with the ahash API, pass through MAY_SLEEP
from the ahash API to the shash API.  However, the shash functions are
called under kmap_atomic(), so actually they're assumed to never sleep.

Even if it turns out that some users do need preemption points while
hashing large buffers, we could easily provide a helper function
crypto_shash_update_large() which divides the data into smaller chunks
and calls crypto_shash_update() and cond_resched() for each chunk.  It's
not necessary to have a flag in 'struct shash_desc', nor is it necessary
to make individual shash algorithms aware of this at all.

Therefore, remove shash_desc::flags, and document that the
crypto_shash_*() functions can be called from any context.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Export IOMMU based DMA protection support to userspace</title>
<updated>2018-12-05T09:01:56Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2018-10-31T11:06:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dcc3c9e37fbd70e728d08cce0e50121605390fa0'/>
<id>urn:sha1:dcc3c9e37fbd70e728d08cce0e50121605390fa0</id>
<content type='text'>
Recent systems with Thunderbolt ports may support IOMMU natively. In
practice this means that Thunderbolt connected devices are placed behind
an IOMMU during the whole time it is connected (including during boot)
making Thunderbolt security levels redundant. This is called Kernel DMA
protection [1] by Microsoft.

Some of these systems still have Thunderbolt security level set to
"user" in order to support OS downgrade (the older version of the OS
might not support IOMMU based DMA protection so connecting a device
still relies on user approval).

Export this information to userspace by introducing a new sysfs
attribute (iommu_dma_protection). Based on it userspace tools can make
more accurate decision whether or not authorize the connected device.

In addition update Thunderbolt documentation regarding IOMMU based DMA
protection.

[1] https://docs.microsoft.com/en-us/windows/security/information-protection/kernel-dma-protection-for-thunderbolt

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Convert rest of the driver files to use SPDX identifier</title>
<updated>2018-10-02T22:52:08Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2018-10-01T09:31:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd3b339cbb6047dacfa7ccc81c846efcb61032a9'/>
<id>urn:sha1:fd3b339cbb6047dacfa7ccc81c846efcb61032a9</id>
<content type='text'>
This gets rid of the licence boilerplate duplicated in each file. While
there fix doubled space in domain.c author line.

No functional changes intended.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Yehezkel Bernat &lt;yehezkelshb@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add support for runtime PM</title>
<updated>2018-07-25T08:55:29Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2018-07-25T08:48:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d8ff0b586fb1c5bd81a3ab286dcc6bbc432044e'/>
<id>urn:sha1:2d8ff0b586fb1c5bd81a3ab286dcc6bbc432044e</id>
<content type='text'>
When Thunderbolt host controller is set to RTD3 mode (Runtime D3) it is
present all the time. Because of this it is important to runtime suspend
the controller whenever possible. In case of ICM we have following rules
which all needs to be true before the host controller can be put to D3:

  - The controller firmware reports to support RTD3
  - All the connected devices announce support for RTD3
  - There is no active XDomain connection

Implement this using standard Linux runtime PM APIs so that when all the
children devices are runtime suspended, the Thunderbolt host controller
PCI device is runtime suspended as well. The ICM firmware then starts
powering down power domains towards RTD3 but it can prevent this if it
detects that there is an active Display Port stream (this is not visible
to the software, though).

The Thunderbolt host controller will be runtime resumed either when
there is a remote wake event (device is connected or disconnected), or
when there is access from userspace that requires hardware access.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: No need to take tb-&gt;lock in domain suspend/complete</title>
<updated>2018-07-25T08:15:24Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2018-07-25T08:03:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84db68587651d453a9b5e901c787a49866e34b1e'/>
<id>urn:sha1:84db68587651d453a9b5e901c787a49866e34b1e</id>
<content type='text'>
If the connection manager implementation needs to touch the domain
structures it ought to take the lock itself. Currently only ICM
implements these hooks and it does not need the lock because we there
will be no notifications before driver ready message is sent to it.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Notify userspace when boot_acl is changed</title>
<updated>2018-07-07T15:29:17Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2018-06-26T11:46:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=007a74907deeceefef9dc3ec4679fbd7921eaa51'/>
<id>urn:sha1:007a74907deeceefef9dc3ec4679fbd7921eaa51</id>
<content type='text'>
The commit 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL")
introduced boot_acl attribute but missed the fact that now userspace
needs to poll the attribute constantly to find out whether it has
changed or not. Fix this by sending notification to the userspace
whenever the boot_acl attribute is changed.

Fixes: 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL")
Reported-and-tested-by: Christian Kellner &lt;christian@kellner.me&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Christian Kellner &lt;christian@kellner.me&gt;
Acked-by: Yehezkel Bernat &lt;yehezkelshb@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Introduce USB only (SL4) security level</title>
<updated>2018-03-09T09:54:11Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2017-12-08T11:11:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6fc14e1a44e53c472865252b47398346a27d600e'/>
<id>urn:sha1:6fc14e1a44e53c472865252b47398346a27d600e</id>
<content type='text'>
This new security level works so that it creates one PCIe tunnel to the
connected Thunderbolt dock, removing PCIe links downstream of the dock.
This leaves only the internal USB controller visible.

Display Port tunnels are created normally.

While there make sure security sysfs attribute returns "unknown" for any
future security level.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add support for preboot ACL</title>
<updated>2018-03-09T09:54:11Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2018-01-21T10:08:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9aaa3b8b4c56d24210acef37b7c800ca218c3d40'/>
<id>urn:sha1:9aaa3b8b4c56d24210acef37b7c800ca218c3d40</id>
<content type='text'>
Preboot ACL is a mechanism that allows connecting Thunderbolt devices
boot time in more secure way than the legacy Thunderbolt boot support.
As with the legacy boot option, this also needs to be enabled from the
BIOS before booting is allowed. Difference to the legacy mode is that
the userspace software explicitly adds device UUIDs by sending a special
message to the ICM firmware. Only the devices listed in the boot ACL are
connected automatically during the boot. This works in both "user" and
"secure" security levels.

We implement this in Linux by exposing a new sysfs attribute (boot_acl)
below each Thunderbolt domain. The userspace software can then update
the full list as needed.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
</content>
</entry>
</feed>
