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: <1519210220-22437-1-git-send-email-arend.vanspriel@broadcom.com>
Date:   Wed, 21 Feb 2018 11:50:17 +0100
From:   Arend van Spriel <arend.vanspriel@...adcom.com>
To:     Kalle Valo <kvalo@...eaurora.org>,
        Marcel Holtmann <marcel@...tmann.org>
Cc:     linux-wireless@...r.kernel.org, linux-bluetooth@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arend van Spriel <arend.vanspriel@...adcom.com>
Subject: [PATCH 0/3] drivers: support for sysfs initiated coredump

This series is intended for 4.17 adding support for sysfs initiated
coredump. This uses new functionality that was added in drivers base.
Device drivers can now implement a .coredump() callback upon which a
sysfs entry is created when the device is bound to the driver. From
user-space a device coredump can be initiated. The easiest way is by
going the drivers entry and enter into the bound device folder like
this:

  # cd /sys/bus/pci/drivers/brcmfmac/0000:02:00.0
  # echo 1 > coredump
  # ls /sys/class/devcoredump/
  devcd1	disabled
  # ls -l /sys/class/devcoredump/devcd1/
  total 0
  -rw------- 1 root root    0 Feb 19 23:49 data
  lrwxrwxrwx 1 root root    0 Feb 19 23:49 failing_device ->
  	../../../pci0000:00/0000:00:1c.0/0000:02:00.0
  drwxr-xr-x 2 root root    0 Feb 19 23:49 power
  lrwxrwxrwx 1 root root    0 Feb 19 23:49 subsystem ->
  	../../../../class/devcoredump
  -rw-r--r-- 1 root root 4096 Feb 19 23:49 uevent

The device driver can implement the .coredump() callback as they like.
The use of the dev_coredump api is not enforced although the sysfs entry
is only created when CONFIG_DEV_COREDUMP is selected.

Apart from brcmfmac, the other drivers used dev_coredump api and had a
mechanism in place through debugfs, which is removed in these patches.
With these patches initiating the coredump can be done without selecting
CONFIG_DEBUGFS. No attempt was made to look for drivers providing some sore
of coredump functionality by other means than the dev_coredump api.

The first 2 patches apply to the master branch of the wireless-drivers-next
repository. The last patch applies to the master branch of the bluetooth-next.

Arend van Spriel (3):
  brcmfmac: add support for sysfs initiated coredump
  mwifiex: support sysfs initiated device coredump
  btmrvl: support sysfs initiated firmware coredump

 drivers/bluetooth/btmrvl_debugfs.c                 | 31 ----------------------
 drivers/bluetooth/btmrvl_drv.h                     |  2 --
 drivers/bluetooth/btmrvl_main.c                    |  6 -----
 drivers/bluetooth/btmrvl_sdio.c                    | 18 ++++++++-----
 .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c  |  1 +
 .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h |  2 ++
 .../wireless/broadcom/brcm80211/brcmfmac/core.c    |  7 +++++
 .../wireless/broadcom/brcm80211/brcmfmac/pcie.c    |  1 +
 drivers/net/wireless/marvell/mwifiex/debugfs.c     | 31 +---------------------
 drivers/net/wireless/marvell/mwifiex/pcie.c        | 19 +++++++++++--
 drivers/net/wireless/marvell/mwifiex/sdio.c        | 13 +++++++++
 drivers/net/wireless/marvell/mwifiex/usb.c         | 14 ++++++++++
 12 files changed, 68 insertions(+), 77 deletions(-)

-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ