From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753891AbcHRHXV (ORCPT ); Thu, 18 Aug 2016 03:23:21 -0400 Received: from mga11.intel.com ([192.55.52.93]:60465 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753237AbcHRHXU (ORCPT ); Thu, 18 Aug 2016 03:23:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,538,1464678000"; d="scan'208";a="157621479" From: Chen Yu To: "Rafael J. Wysocki" Cc: Thomas Gleixner , Janek Kozicki , Xunlei Pang , Zhang Rui , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, John Stultz Subject: Re: [PATCH] timekeeping: Cap array access in timekeeping_debug to protect against invalid sleep times References: <1469892465-15853-1-git-send-email-yu.c.chen@intel.com> <1471461530-19575-1-git-send-email-john.stultz@linaro.org> <2035113.3OJj8z3OVW@vostro.rjw.lan> Message-ID: Date: Thu, 18 Aug 2016 15:31:20 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <2035113.3OJj8z3OVW@vostro.rjw.lan> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年08月18日 09:09, Rafael J. Wysocki wrote: > If pm_trace_enabled is set, we can (or maybe even should) just skip > timekeeping_inject_sleeptime() entirely in rtc_resume() at least, because > sleep_time is almost certainly bogus in that case, even if it doesn't > overflow. > > Of course, the above is still needed then. > > Thanks, > Rafael > OK, I'll provide another version on top of John's patch and consider the pm_trace. thanks. Yu