lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1442926040-15150-1-git-send-email-alexander.shishkin@linux.intel.com>
Date:	Tue, 22 Sep 2015 15:47:09 +0300
From:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org, mathieu.poirier@...aro.org,
	peter.lachner@...el.com, norbert.schulz@...el.com,
	keven.boell@...el.com, yann.fouassier@...el.com,
	laurent.fert@...el.com,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Subject: [PATCH v4 00/11] Introduce Intel Trace Hub support

Hi Greg and everybody,

Here's a patchset adding support for Intel Trace Hub (TH) [1] to the
kernel. Full description follows the changelog. I took some time
discussing matters with Mathieu wrt our common needs from the STM
driver framework and also to fix things that I found in the
process, so the changelog is a bit hefty. A lot of Intel Trace Hub
driver fixes were contributed by Laurent Fert.

Changes since v3:
  * Added Mathieu's reviewed-bys.

Changes since v2:
  * STM framework changes:
    - Addressed Greg KH's comments (struct device usage, attributes,
      etc etc),
    - Started using STM device name in the policy name to make
      interface more logical,
    - Tried to improve initcall ordering to accomodate coresight
      modules (we might need more work on that when the time comes),
    - Fixed output assignment on unlinking,
    - Refcounting and locking fixes in stm vs stm_source code,
    - Added missing cleanup_srcu_struct() in exit call,
    - Changed stm_data::ioctl() to a more specific set_options()
      callback, which is what the underlying driver actually wants,
    - Allocated our ioctl commands "by the book" throught
      ioctl-number.txt,
    - Made stm_data::link() callback return an error code in case the
      driver doesn't like something; handle this condition
      accordingly;
  * STM console module got renamed to "stm_console";
  * Intel TH: fixed resource printing;
  * Intel TH/GTH:
    - Added an output attribute to control maintenance packet
      frequency: smcfreq,
    - Undo master assignment on master disabling (Laurent),
    - Disable global destination overriding (Laurent),
    - Clear force capture done bit on trace disabling (Laurent),
    - Fixed handling of masters above 256;
  * Intel TH/MSU:
    - Reworked block iteration in multiblock mode (Laurent),
    - Use pgprot_noncached() for user mappings,
    - Fixed window's page offset based on previous window's offset and
      size (Laurent),
    - Fixed user_count when no buffer is allocated (Laurent),
    - Reset hw headers in multiblock mode (Laurent);
  * Intel TH/STH:
    - Handle failure to register stm device.

Changes since v1:

  * fixed Kconfig whitespaces and removed defaults per comments from
  Paul Bolle,
  * addressed comments from Joe Perches.

Changes since v0:

  * filter-branch'ed everything under drivers/hwtracing where Mathieu
  is also moving coresight drivers,
  * added some more comments to the stm class code to address
  Mathieu's questions,
  * fixed CONFIG_STM=m case, which failed to build in the previous
  version as pointed out by Paul Bolle,
  * fixed a rather embarrassing memory leak in the error path of
  stm_char_policy_set_ioctl(),
  * added ioctl() callback to struct stm_data so that downstream
  stm drivers can serve their own commands on top of the same file
  descriptor, as suggested by Mathieu.

Intel Trace Hub (TH) is a set of hardware blocks that produce, switch
and output trace data from multiple hardware and software sources over
several types of trace output ports encoded in System Trace Protocol
(MIPI STPv2) and is intended to perform full system debugging.

The first part of this patchset introduces an abstraction for STM
devices, or the devices that combine trace data from multiple trace
sources into a STP trace stream. It provides a generic interface for
software writers to send their trace data and also solves the problem
of mapping STP master/channel asignments to trace sources between the
system under tracing and the STP decoder on the debug host end. This
part is also useful for the Coresight STM driver as it uses a similar
interface and has the same channel mapping problem.

The remainder of the patchset is Intel TH support. The core part is
platform independant and is called into by glue layers such as the pci
driver that follows. The core provides a bus, on which Intel TH
subdevices are allocated. Each subdevice has its own driver.
Subdevices are divided into 3 types: sources, outputs and a switch
(there's usually just one). The latter is the central component in
this scheme of things and is required for other drivers to load and
function. Other drivers, however, are optional. Sources are producers
of trace data. Outputs are means of exporting the resulting STP trace
to the debug host via trace ports or system memory.

All configuration is done via sysfs and doesn't require any specific
userspace beyond a shell.

Currently supported Intel TH subdevices are Software Trace Hub
(STH, source), Memory Storage Unit (MSU, output), Parallel Tracing
Interface unit (PTI, output), Global Trace Hub (GTH, switch). Support
for other subdevices can be added later.

Also this patchset adds MAINTAINERS entries for stm class and Intel TH
code.

[1] https://software.intel.com/sites/default/files/managed/d3/3c/intel-th-developer-manual.pdf

Alexander Shishkin (11):
  stm class: Introduce an abstraction for System Trace Module devices
  MAINTAINERS: add an entry for System Trace Module device class
  stm class: dummy_stm: Add dummy driver for testing stm class
  stm class: stm_console: Add kernel-console-over-stm driver
  intel_th: Add driver infrastructure for Intel(R) Trace Hub devices
  intel_th: Add pci glue layer for Intel(R) Trace Hub
  intel_th: Add Global Trace Hub driver
  intel_th: Add Software Trace Hub driver
  intel_th: Add Memory Storage Unit driver
  intel_th: Add PTI output driver
  MAINTAINERS: add an entry for Intel(R) Trace Hub

 Documentation/ABI/testing/configfs-stp-policy      |   48 +
 .../ABI/testing/sysfs-bus-intel_th-devices-gth     |   49 +
 .../ABI/testing/sysfs-bus-intel_th-devices-msc     |   33 +
 .../ABI/testing/sysfs-bus-intel_th-devices-pti     |   24 +
 .../ABI/testing/sysfs-bus-intel_th-output-devices  |   13 +
 Documentation/ABI/testing/sysfs-class-stm          |   14 +
 Documentation/ABI/testing/sysfs-class-stm_source   |   11 +
 Documentation/ioctl/ioctl-number.txt               |    3 +
 Documentation/trace/intel_th.txt                   |   99 ++
 Documentation/trace/stm.txt                        |   80 ++
 MAINTAINERS                                        |   14 +
 drivers/Kconfig                                    |    4 +
 drivers/Makefile                                   |    2 +
 drivers/hwtracing/intel_th/Kconfig                 |   72 +
 drivers/hwtracing/intel_th/Makefile                |   18 +
 drivers/hwtracing/intel_th/core.c                  |  692 +++++++++
 drivers/hwtracing/intel_th/debug.c                 |   36 +
 drivers/hwtracing/intel_th/debug.h                 |   34 +
 drivers/hwtracing/intel_th/gth.c                   |  706 +++++++++
 drivers/hwtracing/intel_th/gth.h                   |   66 +
 drivers/hwtracing/intel_th/intel_th.h              |  244 ++++
 drivers/hwtracing/intel_th/msu.c                   | 1509 ++++++++++++++++++++
 drivers/hwtracing/intel_th/msu.h                   |  116 ++
 drivers/hwtracing/intel_th/pci.c                   |   86 ++
 drivers/hwtracing/intel_th/pti.c                   |  252 ++++
 drivers/hwtracing/intel_th/pti.h                   |   29 +
 drivers/hwtracing/intel_th/sth.c                   |  259 ++++
 drivers/hwtracing/intel_th/sth.h                   |   42 +
 drivers/hwtracing/stm/Kconfig                      |   25 +
 drivers/hwtracing/stm/Makefile                     |    9 +
 drivers/hwtracing/stm/console.c                    |   80 ++
 drivers/hwtracing/stm/core.c                       | 1029 +++++++++++++
 drivers/hwtracing/stm/dummy_stm.c                  |   66 +
 drivers/hwtracing/stm/policy.c                     |  529 +++++++
 drivers/hwtracing/stm/stm.h                        |   87 ++
 include/linux/stm.h                                |  126 ++
 include/uapi/linux/stm.h                           |   50 +
 37 files changed, 6556 insertions(+)
 create mode 100644 Documentation/ABI/testing/configfs-stp-policy
 create mode 100644 Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth
 create mode 100644 Documentation/ABI/testing/sysfs-bus-intel_th-devices-msc
 create mode 100644 Documentation/ABI/testing/sysfs-bus-intel_th-devices-pti
 create mode 100644 Documentation/ABI/testing/sysfs-bus-intel_th-output-devices
 create mode 100644 Documentation/ABI/testing/sysfs-class-stm
 create mode 100644 Documentation/ABI/testing/sysfs-class-stm_source
 create mode 100644 Documentation/trace/intel_th.txt
 create mode 100644 Documentation/trace/stm.txt
 create mode 100644 drivers/hwtracing/intel_th/Kconfig
 create mode 100644 drivers/hwtracing/intel_th/Makefile
 create mode 100644 drivers/hwtracing/intel_th/core.c
 create mode 100644 drivers/hwtracing/intel_th/debug.c
 create mode 100644 drivers/hwtracing/intel_th/debug.h
 create mode 100644 drivers/hwtracing/intel_th/gth.c
 create mode 100644 drivers/hwtracing/intel_th/gth.h
 create mode 100644 drivers/hwtracing/intel_th/intel_th.h
 create mode 100644 drivers/hwtracing/intel_th/msu.c
 create mode 100644 drivers/hwtracing/intel_th/msu.h
 create mode 100644 drivers/hwtracing/intel_th/pci.c
 create mode 100644 drivers/hwtracing/intel_th/pti.c
 create mode 100644 drivers/hwtracing/intel_th/pti.h
 create mode 100644 drivers/hwtracing/intel_th/sth.c
 create mode 100644 drivers/hwtracing/intel_th/sth.h
 create mode 100644 drivers/hwtracing/stm/Kconfig
 create mode 100644 drivers/hwtracing/stm/Makefile
 create mode 100644 drivers/hwtracing/stm/console.c
 create mode 100644 drivers/hwtracing/stm/core.c
 create mode 100644 drivers/hwtracing/stm/dummy_stm.c
 create mode 100644 drivers/hwtracing/stm/policy.c
 create mode 100644 drivers/hwtracing/stm/stm.h
 create mode 100644 include/linux/stm.h
 create mode 100644 include/uapi/linux/stm.h

-- 
2.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ