diff options
author | Kees Cook <keescook@chromium.org> | 2018-11-01 17:03:07 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2018-12-03 19:52:35 -0500 |
commit | 0eed84ffb094bbddfb4b9378ef0a2eccf4dda99c (patch) | |
tree | 67a4d68cf26f25dde588702cb4ed4f905436e91b | |
parent | c208f7d4b037e1c71e5c839bb5dfcc3e0df19890 (diff) |
pstore: Improve and update some comments and status output
This improves and updates some comments:
- dump handler comment out of sync from calling convention
- fix kern-doc typo
and improves status output:
- reminder that only kernel crash dumps are compressed
- do not be silent about ECC infrastructure failures
Signed-off-by: Kees Cook <keescook@chromium.org>
-rw-r--r-- | fs/pstore/platform.c | 7 | ||||
-rw-r--r-- | fs/pstore/ram_core.c | 4 | ||||
-rw-r--r-- | include/linux/pstore.h | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index a75756c48e10..32340e7dd6a5 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c | |||
@@ -304,7 +304,7 @@ static void allocate_buf_for_compression(void) | |||
304 | big_oops_buf_sz = size; | 304 | big_oops_buf_sz = size; |
305 | big_oops_buf = buf; | 305 | big_oops_buf = buf; |
306 | 306 | ||
307 | pr_info("Using compression: %s\n", zbackend->name); | 307 | pr_info("Using crash dump compression: %s\n", zbackend->name); |
308 | } | 308 | } |
309 | 309 | ||
310 | static void free_buf_for_compression(void) | 310 | static void free_buf_for_compression(void) |
@@ -354,9 +354,8 @@ void pstore_record_init(struct pstore_record *record, | |||
354 | } | 354 | } |
355 | 355 | ||
356 | /* | 356 | /* |
357 | * callback from kmsg_dump. (s2,l2) has the most recently | 357 | * callback from kmsg_dump. Save as much as we can (up to kmsg_bytes) from the |
358 | * written bytes, older bytes are in (s1,l1). Save as much | 358 | * end of the buffer. |
359 | * as we can from the end of the buffer. | ||
360 | */ | 359 | */ |
361 | static void pstore_dump(struct kmsg_dumper *dumper, | 360 | static void pstore_dump(struct kmsg_dumper *dumper, |
362 | enum kmsg_dump_reason reason) | 361 | enum kmsg_dump_reason reason) |
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 3e9e3ba4fb07..e6375439c5ac 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c | |||
@@ -503,8 +503,10 @@ static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig, | |||
503 | bool zap = !!(prz->flags & PRZ_FLAG_ZAP_OLD); | 503 | bool zap = !!(prz->flags & PRZ_FLAG_ZAP_OLD); |
504 | 504 | ||
505 | ret = persistent_ram_init_ecc(prz, ecc_info); | 505 | ret = persistent_ram_init_ecc(prz, ecc_info); |
506 | if (ret) | 506 | if (ret) { |
507 | pr_warn("ECC failed %s\n", prz->label); | ||
507 | return ret; | 508 | return ret; |
509 | } | ||
508 | 510 | ||
509 | sig ^= PERSISTENT_RAM_SIG; | 511 | sig ^= PERSISTENT_RAM_SIG; |
510 | 512 | ||
diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 30fcec375a3a..81669aa80027 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h | |||
@@ -85,7 +85,7 @@ struct pstore_record { | |||
85 | /** | 85 | /** |
86 | * struct pstore_info - backend pstore driver structure | 86 | * struct pstore_info - backend pstore driver structure |
87 | * | 87 | * |
88 | * @owner: module which is repsonsible for this backend driver | 88 | * @owner: module which is responsible for this backend driver |
89 | * @name: name of the backend driver | 89 | * @name: name of the backend driver |
90 | * | 90 | * |
91 | * @buf_lock: spinlock to serialize access to @buf | 91 | * @buf_lock: spinlock to serialize access to @buf |