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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170123161111.5925-1-mcgrof@kernel.org>
Date:   Mon, 23 Jan 2017 08:11:04 -0800
From:   "Luis R. Rodriguez" <mcgrof@...nel.org>
To:     gregkh@...uxfoundation.org
Cc:     ming.lei@...onical.com, keescook@...omium.org,
        linux-kernel-dev@...khoff.com, jakub.kicinski@...ronome.com,
        chris@...is-wilson.co.uk, oss-drivers@...ronome.com,
        johannes@...solutions.net, j@...fi, teg@...m.no, kay@...y.org,
        jwboyer@...oraproject.org, dmitry.torokhov@...il.com,
        seth.forshee@...onical.com, bjorn.andersson@...aro.org,
        linux-kernel@...r.kernel.org, wagi@...om.org,
        stephen.boyd@...aro.org, zohar@...ux.vnet.ibm.com, tiwai@...e.de,
        dwmw2@...radead.org, fengguang.wu@...el.com, dhowells@...hat.com,
        arend.vanspriel@...adcom.com, kvalo@...eaurora.org,
        "Luis R. Rodriguez" <mcgrof@...nel.org>
Subject: [PATCH 0/7] firmware: expand test units for fallback mechanism

A kernel crash has been reported by a few folks on cancelling the
firmware fallback mechanism introduced by some new code changes in
v4.10. Testing this is not easy as most distributions disable
the option to always use the fallback mechanism by default
(CONFIG_FW_LOADER_USER_HELPER_FALLBACK), and our test driver for the
firmware does not test against the fallback mechanism.

If CONFIG_FW_LOADER_USER_HELPER_FALLBACK is disabled there are only
two ways in which the kernel will use the fallback mechanism, on two
drivers:

  o drivers/firmware/dell_rbu.c
  o drivers/leds/leds-lp55xx-common.c

We need a way to easily test the fallback mechanism then even if
distributions disable CONFIG_FW_LOADER_USER_HELPER_FALLBACK. This
series expands the test_firmware driver to always have a knob to
trigger a request which always requests the fallback mechanism,
so long as CONFIG_FW_LOADER_USER_HELPER=y is enabled (most
distributions), this trigger should help test the fallback mechanism.

This series also fixes the issue reported. I've tested applying the
test unit changes onto v4.9.5 and confirm the issue is not present
there. The crash happens after commit 5d47ec02c37ea6 ("firmware: Correct
handling of fw_state_wait() return value") but this is a fix for
commit 5b029624948d ("firmware: do not use fw_lock for fw_state protection")
which is a functional change introduced only on v4.10.

Moving forward I will ask all parties to use all test scripts before applying
any changes. If any APIs are changed we need a respective test unit for it.

Luis R. Rodriguez (7):
  test_firmware: move misc_device down
  test_firmware: use device attribute groups
  tools: firmware: check for distro fallback udev cancel rule
  tools: firmware: rename fallback mechanism script
  tools: firmware: add fallback cancelation testing
  test_firmware: add test custom fallback trigger
  firmware: firmware: fix NULL pointer dereference in __fw_load_abort()

 drivers/base/firmware_class.c                     |   5 +-
 lib/test_firmware.c                               |  92 ++++++---
 tools/testing/selftests/firmware/Makefile         |   2 +-
 tools/testing/selftests/firmware/fw_fallback.sh   | 224 ++++++++++++++++++++++
 tools/testing/selftests/firmware/fw_userhelper.sh |  99 ----------
 5 files changed, 288 insertions(+), 134 deletions(-)
 create mode 100755 tools/testing/selftests/firmware/fw_fallback.sh
 delete mode 100755 tools/testing/selftests/firmware/fw_userhelper.sh

-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ