From 0c64907a9eee975f60fd6b77a0c43365a089c846 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 9 Mar 2026 02:19:24 +0000 Subject: util/nvmutil: remove the setchecksum command This feature is extremely dangerous, and we should discourage against its use. This is part of a series of changes that I've made to make the code safer. You should only ever run this on a valid GbE file, and nothing else. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index d2bc0aa5..13a4d9db 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -202,7 +202,6 @@ enum { CMD_SWAP, CMD_COPY, CMD_BRICK, - CMD_SETCHECKSUM }; /* @@ -249,6 +248,10 @@ struct commands { * Command table, for nvmutil commands */ static const struct commands command[] = { + /* + * Unlike older versions, we now require + * both checksums to be valid for "dump". + */ { CMD_DUMP, "dump", cmd_dump, ARGC_3, NO_INVERT, SET_MOD_OFF, ARG_NOPART, @@ -288,15 +291,6 @@ static const struct commands command[] = { ARG_PART, CHECKSUM_READ, SKIP_CHECKSUM_WRITE, NVM_SIZE }, - - /* - * The non-target part will not be read. - */ - { CMD_SETCHECKSUM, "setchecksum", NULL, ARGC_4, - NO_INVERT, SET_MOD_N, - ARG_PART, - SKIP_CHECKSUM_READ, CHECKSUM_WRITE, - NVM_SIZE }, }; #define MAX_CMD_LEN 50 -- cgit v1.2.1