summaryrefslogtreecommitdiffstats
path: root/fs/pstore/ram_core.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2018-11-01 14:14:47 -0700
committerKees Cook <keescook@chromium.org>2018-12-03 16:52:35 -0800
commitdc80b1ea4cbff1d72ce3d5edaaf1b6602fd7c780 (patch)
tree812a7b874b01a747f96f47f2dd80f6b79b85dc25 /fs/pstore/ram_core.c
parent9ee85b8bd3cab1a151850b6648cab7ed2e0d8192 (diff)
downloadlinux-dc80b1ea4cbff1d72ce3d5edaaf1b6602fd7c780.tar.gz
linux-dc80b1ea4cbff1d72ce3d5edaaf1b6602fd7c780.tar.xz
pstore/ram: Report backend assignments with finer granularity
In order to more easily perform automated regression testing, this adds pr_debug() calls to report each prz allocation which can then be verified against persistent storage. Specifically, seeing the dividing line between header, data, any ECC bytes. (And the general assignment output is updated to remove the bogus ECC blocksize which isn't actually recorded outside the prz instance.) Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/ram_core.c')
-rw-r--r--fs/pstore/ram_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index f5d0173901aa..62830734deee 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -576,6 +576,12 @@ struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size,
if (ret)
goto err;
+ pr_debug("attached %s 0x%zx@0x%llx: %zu header, %zu data, %zu ecc (%d/%d)\n",
+ prz->label, prz->size, (unsigned long long)prz->paddr,
+ sizeof(*prz->buffer), prz->buffer_size,
+ prz->size - sizeof(*prz->buffer) - prz->buffer_size,
+ prz->ecc_info.ecc_size, prz->ecc_info.block_size);
+
return prz;
err:
persistent_ram_free(prz);