[SRU][Zesty][PATCH 1/1] pstore: Fix flags to enable dumps on powerpc

Joseph Salisbury joseph.salisbury at canonical.com
Fri Jun 2 15:37:33 UTC 2017

From: Ankit Kumar <ankit at linux.vnet.ibm.com>

BugLink: http://bugs.launchpad.net/bugs/1691045

After commit c950fd6f201a kernel registers pstore write based on flag set.
Pstore write for powerpc is broken as flags(PSTORE_FLAGS_DMESG) is not set for
powerpc architecture. On panic, kernel doesn't write message to
/fs/pstore/dmesg*(Entry doesn't gets created at all).

This patch enables pstore write for powerpc architecture by setting

Fixes: c950fd6f201a ("pstore: Split pstore fragile flags")
Cc: stable at vger.kernel.org # v4.9+
Signed-off-by: Ankit Kumar <ankit at linux.vnet.ibm.com>
Signed-off-by: Kees Cook <keescook at chromium.org>
(cherry picked from commit 041939c1ec54208b42f5cd819209173d52a29d34)
Signed-off-by: Joseph Salisbury <joseph.salisbury at canonical.com>
 arch/powerpc/kernel/nvram_64.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index d5e2b83..021db31 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -561,6 +561,7 @@ static ssize_t nvram_pstore_read(u64 *id, enum pstore_type_id *type,
 static struct pstore_info nvram_pstore_info = {
 	.owner = THIS_MODULE,
 	.name = "nvram",
 	.open = nvram_pstore_open,
 	.read = nvram_pstore_read,
 	.write = nvram_pstore_write,

More information about the kernel-team mailing list