Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423135AbdD0Vi2 (ORCPT ); Thu, 27 Apr 2017 17:38:28 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:37079 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031315AbdD0ViT (ORCPT ); Thu, 27 Apr 2017 17:38:19 -0400 MIME-Version: 1.0 In-Reply-To: <1493292794-13166-1-git-send-email-ankit@linux.vnet.ibm.com> References: <1493292794-13166-1-git-send-email-ankit@linux.vnet.ibm.com> From: Kees Cook Date: Thu, 27 Apr 2017 14:38:17 -0700 X-Google-Sender-Auth: FtmWnZKfFcG35sUpQOG67dEJD2w Message-ID: Subject: Re: [PATCH] Enabled pstore write for powerpc To: Ankit Kumar Cc: Anton Vorontsov , Colin Cross , Tony Luck , Pan Xinhui , "benh@kernel.crashing.org" , Paul Mackerras , Michael Ellerman , Andrew Donnellan , Daniel Axtens , Geliang Tang , "linuxppc-dev@lists.ozlabs.org" , LKML , "mahesh@linux.vnet.ibm.com" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1334 Lines: 42 On Thu, Apr 27, 2017 at 4:33 AM, Ankit Kumar wrote: > 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 > PSTORE_FLAGS_DMESG flag. > > Fixes:c950fd6f201a pstore: Split pstore fragile flags > Signed-off-by: Ankit Kumar Argh, thanks! I thought I'd caught all of these. I'll include this for -stable. -Kees > --- > > 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", > + .flags = PSTORE_FLAGS_DMESG, > .open = nvram_pstore_open, > .read = nvram_pstore_read, > .write = nvram_pstore_write, > -- > 2.7.4 > -- Kees Cook Pixel Security