<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/hwtracing/intel_th, branch linux-4.20.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-01-13T08:24:09Z</updated>
<entry>
<title>intel_th: msu: Fix an off-by-one in attribute store</title>
<updated>2019-01-13T08:24:09Z</updated>
<author>
<name>Alexander Shishkin</name>
</author>
<published>2018-12-19T15:19:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7b14f082590ee05bb410e9188ef7498a00ffda5'/>
<id>urn:sha1:b7b14f082590ee05bb410e9188ef7498a00ffda5</id>
<content type='text'>
commit ec5b5ad6e272d8d6b92d1007f79574919862a2d2 upstream.

The 'nr_pages' attribute of the 'msc' subdevices parses a comma-separated
list of window sizes, passed from userspace. However, there is a bug in
the string parsing logic wherein it doesn't exclude the comma character
from the range of characters as it consumes them. This leads to an
out-of-bounds access given a sufficiently long list. For example:

&gt; # echo 8,8,8,8 &gt; /sys/bus/intel_th/devices/0-msc0/nr_pages
&gt; ==================================================================
&gt; BUG: KASAN: slab-out-of-bounds in memchr+0x1e/0x40
&gt; Read of size 1 at addr ffff8803ffcebcd1 by task sh/825
&gt;
&gt; CPU: 3 PID: 825 Comm: npktest.sh Tainted: G        W         4.20.0-rc1+
&gt; Call Trace:
&gt;  dump_stack+0x7c/0xc0
&gt;  print_address_description+0x6c/0x23c
&gt;  ? memchr+0x1e/0x40
&gt;  kasan_report.cold.5+0x241/0x308
&gt;  memchr+0x1e/0x40
&gt;  nr_pages_store+0x203/0xd00 [intel_th_msu]

Fix this by accounting for the comma character.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Fixes: ba82664c134ef ("intel_th: Add Memory Storage Unit driver")
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>intel_th: pci: Add Ice Lake PCH support</title>
<updated>2018-09-18T14:08:38Z</updated>
<author>
<name>Alexander Shishkin</name>
</author>
<published>2018-09-18T13:10:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59d08d00d43c644ee2011d7ff1807bdd69f31fe0'/>
<id>urn:sha1:59d08d00d43c644ee2011d7ff1807bdd69f31fe0</id>
<content type='text'>
This adds Intel(R) Trace Hub PCI ID for Ice Lake PCH.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Fix resource handling for ACPI glue layer</title>
<updated>2018-09-18T14:08:38Z</updated>
<author>
<name>Alexander Shishkin</name>
</author>
<published>2018-09-18T13:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebe4582281d6e90972f057318a6edea14810ea48'/>
<id>urn:sha1:ebe4582281d6e90972f057318a6edea14810ea48</id>
<content type='text'>
The core of the driver expects the resource array from the glue layer
to be indexed by even numbers, as is the case for 64-bit PCI resources.
This doesn't hold true for others, ACPI in this instance, which leads
to an out-of-bounds access and an ioremap() on whatever address that
access fetches.

This patch fixes the problem by reading resource array differently based
on whether the 64-bit flag is set, which would indicate PCI glue layer.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Fixes: ebc57e399b8e ("intel_th: Add ACPI glue layer")
CC: stable@vger.kernel.org # v4.17+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Fix device removal logic</title>
<updated>2018-09-18T14:08:38Z</updated>
<author>
<name>Alexander Shishkin</name>
</author>
<published>2018-09-18T13:10:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8801922cd94c918e4dc3a108ecaa500c4d40583f'/>
<id>urn:sha1:8801922cd94c918e4dc3a108ecaa500c4d40583f</id>
<content type='text'>
Commit a753bfcfdb1f ("intel_th: Make the switch allocate its subdevices")
brings in new subdevice addition/removal logic that's broken for "host
mode": the SWITCH device has no children to begin with, which is not
handled in the code. This results in a null dereference bug later down
the path.

This patch fixes the subdevice removal code to handle host mode correctly.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Fixes: a753bfcfdb1f ("intel_th: Make the switch allocate its subdevices")
CC: stable@vger.kernel.org # v4.14+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/hwtracing/intel_th/msu.c: change return type to vm_fault_t</title>
<updated>2018-08-24T01:48:43Z</updated>
<author>
<name>Souptick Joarder</name>
</author>
<published>2018-08-24T00:00:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42df050930e7dade82b4d38959320aa05f4022e3'/>
<id>urn:sha1:42df050930e7dade82b4d38959320aa05f4022e3</id>
<content type='text'>
Use new return type vm_fault_t for fault handler.  For now, this is just
documenting that the function returns a VM_FAULT value rather than an
errno.  Once all instances are converted, vm_fault_t will become a
distinct type.

See 1c8f422059ae ("mm: change return type to vm_fault_t") for reference.

Link: http://lkml.kernel.org/r/20180702155801.GA4010@jordon-HP-15-Notebook-PC
Signed-off-by: Souptick Joarder &lt;jrdr.linux@gmail.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Use correct device when freeing buffers</title>
<updated>2018-05-25T16:09:17Z</updated>
<author>
<name>Alexander Shishkin</name>
</author>
<published>2018-05-24T08:27:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ed2424b911f3a058dfea01b78817abed767433d'/>
<id>urn:sha1:0ed2424b911f3a058dfea01b78817abed767433d</id>
<content type='text'>
Commit d5c435df4a890 ("intel_th: msu: Use the real device in case of IOMMU
domain allocation") changes dma buffer allocation to use the actual
underlying device, but forgets to change the deallocation path, which leads
to (if you've got CAP_SYS_RAWIO):

&gt; # echo 0,0 &gt; /sys/bus/intel_th/devices/0-msc0/nr_pages
&gt; ------------[ cut here ]------------
&gt; kernel BUG at ../linux/drivers/iommu/intel-iommu.c:3670!
&gt; CPU: 3 PID: 231 Comm: sh Not tainted 4.17.0-rc1+ #2729
&gt; RIP: 0010:intel_unmap+0x11e/0x130
...
&gt; Call Trace:
&gt;  intel_free_coherent+0x3e/0x60
&gt;  msc_buffer_win_free+0x100/0x160 [intel_th_msu]

This patch fixes the buffer deallocation code to use the correct device.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Fixes: d5c435df4a890 ("intel_th: msu: Use the real device in case of IOMMU domain allocation")
Reported-by: Baofeng Tian &lt;baofeng.tian@intel.com&gt;
CC: stable@vger.kernel.org # v4.14+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Add ACPI glue layer</title>
<updated>2018-03-28T15:47:23Z</updated>
<author>
<name>Alexander Shishkin</name>
</author>
<published>2017-08-23T06:59:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebc57e399b8efb68293f206333985a3394c3acf8'/>
<id>urn:sha1:ebc57e399b8efb68293f206333985a3394c3acf8</id>
<content type='text'>
The Trace Hub devices now can be enumerated as ACPI devices, which
translates into "Host Debugger mode". There are two IDs: one for
PCH Trace Hub, and one for the uncore Trace Hub. These are expected
to stay the same across all platforms.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>intel_th: Allow forcing host mode through drvdata</title>
<updated>2018-03-28T15:47:21Z</updated>
<author>
<name>Alexander Shishkin</name>
</author>
<published>2017-08-23T06:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=282ffec565c2e9fe18bbb48c19767cccd2437f11'/>
<id>urn:sha1:282ffec565c2e9fe18bbb48c19767cccd2437f11</id>
<content type='text'>
Some devices can only operate in host mode, so we need means of
communicating this to the core driver on per-device basis. This
adds a flag to drvdata to signal host-only capability to the core.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>intel_th: Pick up irq number from resources</title>
<updated>2018-03-28T15:47:21Z</updated>
<author>
<name>Alexander Shishkin</name>
</author>
<published>2017-08-23T06:47:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=661b0df8489a35da4ee8acaaf43f204a913ccfc9'/>
<id>urn:sha1:661b0df8489a35da4ee8acaaf43f204a913ccfc9</id>
<content type='text'>
Platform devices pass their IRQs around as resources, so as a convenience
for the glue layer code, allow them pass the IRQ to the core driver in
the resources array.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>intel_th: Don't touch switch routing in host mode</title>
<updated>2018-03-28T15:47:20Z</updated>
<author>
<name>Alexander Shishkin</name>
</author>
<published>2018-03-01T08:17:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2d2c7de972d7a08533bde622c36ff6feb112907'/>
<id>urn:sha1:c2d2c7de972d7a08533bde622c36ff6feb112907</id>
<content type='text'>
When the Trace Hub is operating in Host Debugger mode, it is up to the
debugger to configure master routing even for the software sources. Do
not do this in the driver in this case.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
</content>
</entry>
</feed>
