Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3392394ybp; Sun, 6 Oct 2019 10:56:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/XOjHDIfR0zdIt0gZcfa1Bkum/iklKLI5c9fU0m3qZDPgyyaKKL30b67OlU7zoUEGB2jX X-Received: by 2002:aa7:c749:: with SMTP id c9mr25542045eds.232.1570384586205; Sun, 06 Oct 2019 10:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570384586; cv=none; d=google.com; s=arc-20160816; b=Ukq7n5DSox+pAlpAzKY5TcSoFoKlVIsM0BRlsqWdRecoHEP1OYpAEWQrf5D0BpRtBB MVNXG0rSQElE8Peu5O896wpwlZJ5zyMp5IjALv0eNKOFAyG/JiB9a7+mK57UFsE0zwBq WRDmLONROsVZLa53oD3IQP2GGEkot4a7OEeGvqHeUnddHOAj3/BICMXo9QOPC84naG/E AB+KkV4B8d5Yrq21YOIxXa+LbOrLTA4GVUElZ95aWzGFA9zyAk8iXZjuHIyoA28foNhJ /c/hy1/sbRcRcUUkfXiY355x7VnFGSyfuiauKrsjlJ81r10ANd/DmCK4vjQSxvb/w16q Ee6A== 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=djgz0lqpbudrctO955nZ37v4n/BjQSJcAdvMiKDrye8=; b=c2RiUyV1YU1LHLJRczzkSWdWrpq7LQ0BB/zVWatM1SFXgezL8uYqsZYcWXRKSMbM2E sYRjcuHYXKrfVXMzxdbJgKP7AidTucCfF5KE2+0fS7eEm9s5MKFgs1XD4zY7tJ6ElVkn Of1ArmWfE+PRVwHX5fZM8tUVAM23mCAnaRVal/y3d15MevS94LonxthawyjEg6/CxhLD XHNLi+DdlMCw4Np4S964ATFCWpalCdTBVBd6Ax2LBe4EYekhmTq/mPc1JuBV8jI3fPpy DY9Q1Gs1C40mPP8nBuHZvTDDn4dNBjIfh0g9pEDmPz0eLpvWnNbclWmvjCRHTk6VtMMi zhHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lK/CUGby"; 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 d1si6612274edr.446.2019.10.06.10.56.02; Sun, 06 Oct 2019 10:56:26 -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="lK/CUGby"; 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 S1728010AbfJFRzz (ORCPT + 99 others); Sun, 6 Oct 2019 13:55:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:34658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730214AbfJFRfz (ORCPT ); Sun, 6 Oct 2019 13:35:55 -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 EF9662087E; Sun, 6 Oct 2019 17:35:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383354; bh=2n/Df1WVmgoy0vgbYlwsWecg+mwB5LQ52yY6MOGpQcM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lK/CUGbyXPhlULOEyC1W/HWC8tXfnDXsXQG1aap79Ko8j31MajkSm6/+mmsUQKg3o Wamh+3iX4H8uqsrQ0NmJTHUUAxdivr3ko6OLXKbt0KdAc2JYRKGTonYYc5Jy7FTQUB 5FJxDvWEYiJIt5nOz+AUeFGDmkei5jNVgcbPHXs4= 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 5.2 072/137] pstore: fs superblock limits Date: Sun, 6 Oct 2019 19:20:56 +0200 Message-Id: <20191006171215.116163269@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171209.403038733@linuxfoundation.org> References: <20191006171209.403038733@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 5b77098944151..db9f67d34af37 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -144,6 +144,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 @@ -151,6 +152,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