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: <20210519132528.4394-1-wsa+renesas@sang-engineering.com>
Date:   Wed, 19 May 2021 15:25:27 +0200
From:   Wolfram Sang <wsa+renesas@...g-engineering.com>
To:     linux-kernel@...r.kernel.org
Cc:     linux-renesas-soc@...r.kernel.org, linux-gpio@...r.kernel.org,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Ulrich Hecht <ulrich.hecht+renesas@...il.com>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>
Subject: [RFC PATCH v2 0/1] gpio: add simple logic analyzer using polling

The bravery continues with the second RFC for the in-kernel logic
analyzer based on GPIO polling with local irqs disabled. Besides the
driver, there is also a script which isolates a CPU to achieve the best
possible result. I am aware of the latency limitations. However, the
intention is only for debugging. Especially for remote debugging and to
get a first impression, this has already been useful. Documentation is
within the patch, to get a better idea what this is all about.

Changes since RFC v1:

* moved from misc/ to gpio/. Thanks to Linus and Bartosz for offering a
  home for this
* renamed from "simple logic analyzer" to "sloppy logic analyzer"
  everywhere to make its limitations crystal clear
* moved the parser for trigger data from the kernel into the script.
  Much cleaner kernel code but passing binary data now. We'll see...
* all gpios now must be named. This removes ugly fallback code and
  allows to use generic device properties instead of OF properties only.
* added and updated documentation
* triggers are also now checked at sample speed, not full speed
* replaced pr_* printouts with dev_*
* removed bashisms in the script (tested with bash, dash, and busybox
  ash)
* depends on EXPERT now
* small bugfixes, refactoring, cleanups all around

Thanks to Andy, Linus, Randy, and Ulrich for suggestions and testing.

A branch with preparation for the Renesas Salvator-XS boards is here:
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/gpio-logic-analyzer-v2

The documentation is also available online on the elinux wiki:
https://elinux.org/Kernel_GPIO_Logic_analyzer

Looking forward to comments and especially further tests with different
use cases than mine. I have looked enough at the code, fresh view would
really help. And still, if somebody has a pointer how to detect if a
task was requested to be killed (while irqs and preemption are
disabled), I'd appreciate that to avoid the currently unkillable
sub-process.

All the best,

   Wolfram

Wolfram Sang (1):
  misc: add sloppy logic analyzer using polling

 .../dev-tools/gpio-sloppy-logic-analyzer.rst  |  72 ++++
 Documentation/dev-tools/index.rst             |   1 +
 drivers/gpio/Kconfig                          |  17 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-sloppy-logic-analyzer.c     | 317 ++++++++++++++++++
 tools/gpio/gpio-sloppy-logic-analyzer         | 200 +++++++++++
 6 files changed, 608 insertions(+)
 create mode 100644 Documentation/dev-tools/gpio-sloppy-logic-analyzer.rst
 create mode 100644 drivers/gpio/gpio-sloppy-logic-analyzer.c
 create mode 100755 tools/gpio/gpio-sloppy-logic-analyzer

-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ