Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1451341
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/7] pstore/ram: Set pstore flags dynamically |
| Date | 2016-07-27 17:20 +0200 |
| Message-ID | <rZyMN-164-7@gated-at.bofh.it> (permalink) |
| References | <rZyD7-12s-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The ramoops can be configured to enable each pstore type by setting
their size. In that case, it'd be better not to register disabled types
in the first place.
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
fs/pstore/ram.c | 8 +++++++-
include/linux/pstore.h | 2 --
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index ba19a74e95bc..6c93268f7ced 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -624,7 +624,13 @@ static int ramoops_probe(struct platform_device *pdev)
goto fail_clear;
}
- cxt->pstore.flags = PSTORE_FLAGS_ALL;
+ cxt->pstore.flags = PSTORE_FLAGS_DMESG;
+ if (cxt->console_size)
+ cxt->pstore.flags |= PSTORE_FLAGS_CONSOLE;
+ if (cxt->ftrace_size)
+ cxt->pstore.flags |= PSTORE_FLAGS_FTRACE;
+ if (cxt->pmsg_size)
+ cxt->pstore.flags |= PSTORE_FLAGS_PMSG;
err = pstore_register(&cxt->pstore);
if (err) {
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index 069b96faf478..9790904de6d2 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -79,8 +79,6 @@ struct pstore_info {
#define PSTORE_FLAGS_FTRACE (1 << 2)
#define PSTORE_FLAGS_PMSG (1 << 3)
-#define PSTORE_FLAGS_ALL ((1 << 4) - 1)
-
extern int pstore_register(struct pstore_info *);
extern void pstore_unregister(struct pstore_info *);
extern bool pstore_cannot_block_path(enum kmsg_dump_reason reason);
--
2.8.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC/PATCHSET 0/7] virtio: Implement virtio pstore device (v2) Namhyung Kim <namhyung@kernel.org> - 2016-07-27 17:10 +0200
[PATCH 2/7] pstore/ram: Set pstore flags dynamically Namhyung Kim <namhyung@kernel.org> - 2016-07-27 17:20 +0200
[PATCH 4/7] virtio: Basic implementation of virtio pstore driver Namhyung Kim <namhyung@kernel.org> - 2016-07-27 17:20 +0200
[PATCH 6/7] qemu: Implement virtio-pstore device Namhyung Kim <namhyung@kernel.org> - 2016-07-27 17:20 +0200
Re: [PATCH 6/7] qemu: Implement virtio-pstore device "Michael S. Tsirkin" <mst@redhat.com> - 2016-07-28 02:10 +0200
Re: [PATCH 6/7] qemu: Implement virtio-pstore device Namhyung Kim <namhyung@kernel.org> - 2016-07-28 07:50 +0200
Re: [PATCH 6/7] qemu: Implement virtio-pstore device Stefan Hajnoczi <stefanha@gmail.com> - 2016-07-28 15:00 +0200
Re: [Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device "Daniel P. Berrange" <berrange@redhat.com> - 2016-07-28 15:10 +0200
Re: [Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device Namhyung Kim <namhyung@kernel.org> - 2016-07-30 10:50 +0200
Re: [Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device "Daniel P. Berrange" <berrange@redhat.com> - 2016-08-01 11:50 +0200
Re: [Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device Namhyung Kim <namhyung@kernel.org> - 2016-08-01 17:40 +0200
Re: [PATCH 6/7] qemu: Implement virtio-pstore device Steven Rostedt <rostedt@goodmis.org> - 2016-07-28 16:40 +0200
Re: [Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device "Daniel P. Berrange" <berrange@redhat.com> - 2016-07-28 15:30 +0200
Re: [Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device Namhyung Kim <namhyung@kernel.org> - 2016-07-30 11:00 +0200
Re: [Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device "Daniel P. Berrange" <berrange@redhat.com> - 2016-08-01 11:30 +0200
Re: [Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device Namhyung Kim <namhyung@kernel.org> - 2016-08-01 18:00 +0200
[PATCH 3/7] pstore: Manage buffer position for async write Namhyung Kim <namhyung@kernel.org> - 2016-07-27 17:20 +0200
[PATCH 1/7] pstore: Split pstore fragile flags Namhyung Kim <namhyung@kernel.org> - 2016-07-27 17:20 +0200
[PATCH 5/7] virtio-pstore: Support PSTORE_TYPE_CONSOLE Namhyung Kim <namhyung@kernel.org> - 2016-07-27 17:20 +0200
[PATCH 7/7] kvmtool: Implement virtio-pstore device Namhyung Kim <namhyung@kernel.org> - 2016-07-27 17:20 +0200
Re: [RFC/PATCHSET 0/7] virtio: Implement virtio pstore device (v2) "Michael S. Tsirkin" <mst@redhat.com> - 2016-07-28 00:20 +0200
Re: [RFC/PATCHSET 0/7] virtio: Implement virtio pstore device (v2) Namhyung Kim <namhyung@kernel.org> - 2016-07-28 04:50 +0200
csiph-web