Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3375935ybp; Sun, 6 Oct 2019 10:33:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWtWQH/npJYQZHlzj7OC+dd/iHvB9/mChajza7wHn9FfgOAIZSJdAG0s1aNy1u9KZXQ398 X-Received: by 2002:a17:906:6c98:: with SMTP id s24mr20106789ejr.28.1570383233090; Sun, 06 Oct 2019 10:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570383233; cv=none; d=google.com; s=arc-20160816; b=PYZa+wpIlezbfVsTXy5oNy6qRjXK/oui/CsJ3RYbH2tA6lpLYkOK52YFqg+s4R388S aziUMN35mqHPVhjihG7mHHWmAtPiRqe9U636kNaHHRGrkZDxQiEWzkfcfIoiJ5+obrwy XlX6T6a5RSLZ6qx+m6qYRvgrTe6JLK+vvG3H/XASvNOwDWVvssqM+2numZcgrpuOVDQ4 pofsS/4sY3g9Ix6MAw0lgGdXr8ZGhyotcYLBmE5MaPnntYY8jZDER0Fank9Yec+nPA14 Xy6g3NF8/reAQhlKi/xJHHecOCIS8BO1oleATqfPn32ph2BpFh34p4AlFGzj/sE/qk+b 7s0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JbyTTlyTddrKDW2TzWNw3LcrCjotWJGgPSJBEJyHLwY=; b=VM+7QP1IUqzYw4BocbBH1xgr6LhgF0mjanCdLrYUA7wTKj9BkUie0RfnTOpXNSD5dJ sRm0+FXO/JPjdxjUMaIz/TauW0830s3q+hSPgm/2zuSgVv7CDb67B4wJ468nFtHQVM9J WK3XR1+aagfzNDIgeXLiKcKpHiuLBwlA/NM7Zd5q6NmINb95P2gfN8/DiNEfFZuieEhN GZ+7u15hTcQW+GJuuupvN9Ssy6Q+vxsQYGWOxCkI7+GfMzHvFsdAAAfLzo7a+vZC7hZE 49T0iRlGwqV6+t+nf4+fTlOahC61vKeZBXP+fVkQ3W3trjBBYZnitzTAYiGvSbBdXYZZ SOlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qc9437Gx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12si7150803edf.212.2019.10.06.10.33.29; Sun, 06 Oct 2019 10:33:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qc9437Gx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729506AbfJFRbv (ORCPT + 99 others); Sun, 6 Oct 2019 13:31:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:58114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729497AbfJFRbs (ORCPT ); Sun, 6 Oct 2019 13:31:48 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CCB3B21479; Sun, 6 Oct 2019 17:31:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383108; bh=xwr8Gf+ZGbLNOhIHlpy1MgCwANMR3tLyATZ+L+siVIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qc9437Gx7P+XPhxMDWvw245ccppvWjRvl2xw5i6a8Ea/XfZB3lVZa5pEvvAfTMeD9 6KNighCRHMdBlRGC6vjyPnzkMs08FxUpNR0ACGue04EYE0MTeKZtfC7SMMpqIUEYhe cM1S8KE3kHRM5TVKQ3MyvVU5/S4N1Z9O0teUC6PA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Deepa Dinamani , Kees Cook , Jeff Layton , anton@enomsg.org, ccross@android.com, tony.luck@intel.com, Sasha Levin Subject: [PATCH 4.19 036/106] pstore: fs superblock limits Date: Sun, 6 Oct 2019 19:20:42 +0200 Message-Id: <20191006171140.714722041@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171124.641144086@linuxfoundation.org> References: <20191006171124.641144086@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Deepa Dinamani [ Upstream commit 83b8a3fbe3aa82ac3c253b698ae6a9be2dbdd5e0 ] Leaving granularity at 1ns because it is dependent on the specific attached backing pstore module. ramoops has microsecond resolution. Fix the readback of ramoops fractional timestamp microseconds, which has incorrectly been reporting the value as nanoseconds. Fixes: 3f8f80f0cfeb ("pstore/ram: Read and write to the 'compressed' flag of pstore"). Signed-off-by: Deepa Dinamani Acked-by: Kees Cook Acked-by: Jeff Layton Cc: anton@enomsg.org Cc: ccross@android.com Cc: keescook@chromium.org Cc: tony.luck@intel.com Signed-off-by: Sasha Levin --- fs/pstore/ram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 316c16463b20f..015d74ee31a03 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -162,6 +162,7 @@ static int ramoops_read_kmsg_hdr(char *buffer, struct timespec64 *time, if (sscanf(buffer, RAMOOPS_KERNMSG_HDR "%lld.%lu-%c\n%n", (time64_t *)&time->tv_sec, &time->tv_nsec, &data_type, &header_length) == 3) { + time->tv_nsec *= 1000; if (data_type == 'C') *compressed = true; else @@ -169,6 +170,7 @@ static int ramoops_read_kmsg_hdr(char *buffer, struct timespec64 *time, } else if (sscanf(buffer, RAMOOPS_KERNMSG_HDR "%lld.%lu\n%n", (time64_t *)&time->tv_sec, &time->tv_nsec, &header_length) == 2) { + time->tv_nsec *= 1000; *compressed = false; } else { time->tv_sec = 0; -- 2.20.1