Skip to content

firmware_loader: allow firmware_class.path to take multiple paths

Jeff Layton driver-core linux-kselftest lkml 8 versions – In review

Get series with b4
b4 am [email protected] change-id 20260317-fw-path-a094c30259a5

Versions newest first

  1. v8 Latest2 patches 1 replyIn review
  2. v72 patches 0 repliesSuperseded
  3. v62 patches 2 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v52 patches1 replySuperseded
v41 patch2 repliesSuperseded
v31 patch8 repliesSuperseded
v21 patch0 repliesSuperseded
v11 patch3 repliesSuperseded

Changes in v8 from the cover letter

- add newline to output in fw_search_get()
- fix test #3 to test non-present file properly
- Link to v7: https://lore.kernel.org/r/[email protected]

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2firmware_loader: add search_path= module option for multi-path firmware lookupdrivers/base/firmware_loader/main.c+230 -760 replies
2/2selftests/firmware: add search path test for firmware_class.search_path=tools/testing/selftests/firmware/Makefile tools/testing/selftests/firmware/fw_search.sh+218 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCH v8 0/2] firmware_loader: allow firmware_class.path to take multiple paths

This version just has a couple of very minor nits fixed that sashiko flagged. I'd love to see this go into -next soon, so it can make v7.2.

Greg, are you ok with this version?

---
Changes in v8:
- add newline to output in fw_search_get()
- fix test #3 to test non-present file properly
- Link to v7: https://lore.kernel.org/r/[email protected]

Changes in v7:
- re-escape emitted paths in fw_search_get
- fix potential out-of-bounds read in fw_get_filesystem_firmware()
- ensure all files are cleaned up after failed selftests
- Link to v6: https://lore.kernel.org/r/[email protected]

Changes in v6:
- Add fw_search_unescape() to make the search path parsing more readable
- Rename search= to search_path=
- Link to v5: https://lore.kernel.org/r/[email protected]

Changes in v5:
- Increase search= string length from 256 to 4096
- Preprocess search= path when it's set rather than on every firmware load
- Add selftests for search= functionality
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Move search path to new search= option that is tried after path=
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Allow '\' to escape a literal ':' or '\' in the string
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- switch to using ':' as path delimiter
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Jeff Layton (2):
firmware_loader: add search_path= module option for multi-path firmware lookup selftests/firmware: add search path test for firmware_class.search_path=

 drivers/base/firmware_loader/main.c           | 306 +++++++++++++++++++-------
 tools/testing/selftests/firmware/Makefile     |   2 +-
 tools/testing/selftests/firmware/fw_search.sh | 217 ++++++++++++++++++
 3 files changed, 448 insertions(+), 77 deletions(-)

---
base-commit: c369299895a591d96745d6492d4888259b004a9e
change-id: 20260317-fw-path-a094c30259a5

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>