Skip to content

rpmb: move into a plugin and split into subcommands - #3889

Merged
igaw merged 1 commit into
linux-nvme:masterfrom
dwsuse:rpmb-plugin
Aug 21, 2026
Merged

rpmb: move into a plugin and split into subcommands#3889
igaw merged 1 commit into
linux-nvme:masterfrom
dwsuse:rpmb-plugin

Conversation

@dwsuse

@dwsuse dwsuse commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

RPMB is not part of the NVMe base specification -- it reuses Security Send/Receive as transport but the protocol itself is a Micron-originated vendor extension. Move it out of the always-built src/ core into an optional nvme-cli plugin (plugins/rpmb/), alongside security and sed.

While moving it, split the single nvme rpmb --cmd= command into one subcommand per action (info, program-key, read-counter, read-data, write-data, read-config, write-config), each with only the options it needs, instead of one flag-driven mega-command. There is no deprecated alias for the old --cmd= form since there's no 1:1 mapping to preserve.

Also fixes a few latent bugs found while touching this code: a malloc()/libnvme_free() allocator mismatch in read_rpmb_key(), a missing NULL check after calloc() in auth_data_write_chunk(), rpmb --cmd=info always returning a failure exit code, and the target option being parsed with OPT_UINT into a char field.

RPMB is not part of the NVMe base specification -- it reuses Security
Send/Receive as transport but the protocol itself is a Micron-originated
vendor extension. Move it out of the always-built src/ core into an
optional nvme-cli plugin (plugins/rpmb/), alongside security and sed.

While moving it, split the single nvme rpmb --cmd=<action> command into
one subcommand per action (info, program-key, read-counter, read-data,
write-data, read-config, write-config), each with only the options it
needs, instead of one flag-driven mega-command. There is no deprecated
alias for the old --cmd= form since there's no 1:1 mapping to preserve.

Also fixes a few latent bugs found while touching this code: a
malloc()/libnvme_free() allocator mismatch in read_rpmb_key(), a missing
NULL check after calloc() in auth_data_write_chunk(), rpmb --cmd=info
always returning a failure exit code, and the target option being parsed
with OPT_UINT into a char field.

Signed-off-by: Daniel Wagner <dwagner@suse.com>
@igaw
igaw merged commit e117ee6 into linux-nvme:master Aug 21, 2026
30 of 31 checks passed
@dwsuse

dwsuse commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

RPMB is not part of the NVMe base specification

This statement is not correct. it is part of the spec. Though it still makes sense to move into a plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants