Received: by 10.223.176.46 with SMTP id f43csp71879wra; Thu, 25 Jan 2018 17:42:20 -0800 (PST) X-Google-Smtp-Source: AH8x226TwkrxH14unRf5Pe8s3xMGmJdGGl27LqXhToiJELtv+6eprxAaifoFNvqXJK3vYIa3GH9G X-Received: by 10.99.42.85 with SMTP id q82mr13975362pgq.285.1516930940880; Thu, 25 Jan 2018 17:42:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516930940; cv=none; d=google.com; s=arc-20160816; b=fD1LjrpYTUUyweND2VBjEtUEFnUUfdnO7INgvGESXXJ2yBV07for2ZcFYF2IHrbWrq fs7aUcMMcDwgfy8j4b3gqzQUOKtXtxxNDoC6cEDcLSrmKxRUtYFeZMbvl/TrVoaoMOs1 XccNj2shB7odOf+PlAjc+FWkO0gMw69FiESQyMCct5YBHDMu0bsMraKKquEZY3AEG8Um yl9Oeq5eQGGBHT5Kv1MGuT1NJQ5UIEyyfqwg8jjhq/rEWru+17z5svYjv05bnJ6nRb72 0eVvvbRHfqw4fux2BgO9Z1gADkn2Q96wSbxLj4XPIOyAKElM3Q7UkkIbWiDB4FWD7haT knJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=LIVmiYPDOPAPXMXaxYQ3W4VehSGtQqq/L/aHtNX6urQ=; b=HeO5op7C1MBPdWQepWGSC2K9CU1E8D/VhtpmX+zJP9HHOWskeivFpemQBnTslC3S0O 3kTR1j362dmBasz8TCPvrMMOdqaE4FXH+1jEikXmE5W1P/L4+LcWIYOzNZgZwKEZP4oW Pb4PjSNo4WKlbhlj6tX6kyRXIytJJHfcTPRTQmkCNE6KPLMdxbFbwP+Ln/N5sZ8GEKZY H/X35zMMjUIXc00vwCXmKh61LFnv/DJNMW6VljgjZOZZ/BBPSsM4SCh7pQoSxTqBN0du 24EpQ8/TNaFPBdbjGN19H/XkjuM7vw0bCd5dREFjVVE7oYAFvRkhwBRYeWijiwWR9zXw KgMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y/XiWQfs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o16si2322712pgd.125.2018.01.25.17.41.51; Thu, 25 Jan 2018 17:42:20 -0800 (PST) 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=@linaro.org header.s=google header.b=Y/XiWQfs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751799AbeAZBkN (ORCPT + 99 others); Thu, 25 Jan 2018 20:40:13 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:41597 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751419AbeAZBkL (ORCPT ); Thu, 25 Jan 2018 20:40:11 -0500 Received: by mail-oi0-f66.google.com with SMTP id m83so6949959oik.8 for ; Thu, 25 Jan 2018 17:40:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LIVmiYPDOPAPXMXaxYQ3W4VehSGtQqq/L/aHtNX6urQ=; b=Y/XiWQfs0CJdqIFyuz3muzcJEv9VVcMxBzo+dTdfyKfu/JHSgNmbmtfVGSil/xkJCz HCAP93/fLFdFXlIgyMk2rNpKZhW/HMD8cechkcPASSVah2DLlhRV0mDrSXM8MbRWS4p+ 6RQTKB+/oUBb7jIE2GOyTxwlzO3M+/jvdmI2Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LIVmiYPDOPAPXMXaxYQ3W4VehSGtQqq/L/aHtNX6urQ=; b=AysZBctmpj8c2dncHG2HeBd8wEcdTS1Uld62awE8pdCJKFFjbOQjcuEN2MlNYf0BAz P9GVXzzhOi5Nz/oyIuZBvo9+nzpyMx9gY4n0KMjLT1nbZqpkct6SlAiZGrDgzfdDv60l o+ChsyyCyiSNddsZJP1XMUU1T2uoZCDJEsvR2VGU9+sfHYRcHpO5rHYs80O6YsTyrx+R BpGx+s0tGSX69aGqUPnNmNi3mPqaTYMelaEvgopNs3uboMOVJUV/6LX6sy+XvOtHBahP Th8hxJgdM+cPy0WKlpitufQjVIce6V2mjQI0jaBWlG3hguzt+48kAr+QZs+FZT95DIRl qQKw== X-Gm-Message-State: AKwxytcRAY4xdZSwVA37JvHWQy+AzWJ4xXQoR8Wz7p34gDIiMnnONzpn AMjCnDezwxeF2Dj/V6Ms8teiL585atXtygSdvvb5Pw== X-Received: by 10.202.80.200 with SMTP id e191mr11024470oib.333.1516930811244; Thu, 25 Jan 2018 17:40:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.68.147 with HTTP; Thu, 25 Jan 2018 17:40:10 -0800 (PST) In-Reply-To: References: <20180125113808.3bzgh6zloosw76yv@oak.lan> From: Baolin Wang Date: Fri, 26 Jan 2018 09:40:10 +0800 Message-ID: Subject: Re: [PATCH] kdb: Change timespec to use timespec64 To: Arnd Bergmann Cc: Jason Wessel , Daniel Thompson , Ingo Molnar , Mark Brown , kgdb-bugreport@lists.sourceforge.net, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25 January 2018 at 23:12, Arnd Bergmann wrote: > On Thu, Jan 25, 2018 at 3:49 PM, Jason Wessel > wrote: >> On 01/25/2018 05:38 AM, Daniel Thompson wrote: >>> >>> On Thu, Jan 25, 2018 at 05:18:54PM +0800, Baolin Wang wrote: >>>> >>>> On 25 January 2018 at 16:55, Arnd Bergmann wrote: >>>>> >>>>> On Thu, Jan 25, 2018 at 9:05 AM, Baolin Wang >>>>> wrote: >>>>>> >>>>>> @@ -2554,7 +2554,7 @@ static int kdb_summary(int argc, const char >>>>>> **argv) >>>>>> kdb_printf("domainname %s\n", init_uts_ns.name.domainname); >>>>>> kdb_printf("ccversion %s\n", __stringify(CCVERSION)); >>>>>> >>>>>> - now = __current_kernel_time(); >>>>>> + now = current_kernel_time64(); >>>>>> kdb_gmtime(&now, &tm); >>>>>> kdb_printf("date %04d-%02d-%02d %02d:%02d:%02d " >>>>>> "tz_minuteswest %d\n", >>>>> >>>>> >>>>> Thanks for picking this one up again, we should find a permanent >>>>> solution here. >>>>> Unfortunately you patch is incorrect, as we cannot safely call >>>>> current_kernel_time64() >>>>> from NMI context. >>>> >>>> >>>> Ah, thanks for pointing out the issue, since I do not know what >>>> context the function will be called in kdb. >>>> >>>>> >>>>> The __ prefix on __current_kernel_time() indicates that this is a >>>>> special call >>>>> that intentionally doesn't read the hardware time to avoid taking locks >>>>> that >>>>> might already be held in the context from which we entered the debugger. >>>>> >>>>> See https://patchwork.kernel.org/patch/10002097/ for my earlier patch. >>>> >>>> >>>> This patch had not been merged into mainline? >>> >>> >>> Not yet (and I'm afraid it's not in kgdb-next either) but the ack from >>> Jason is from >>> this kernel cycle so we'll see what can be done! >>> >>> >> >> I thought for what ever reason this was going through the time keeper >> subtree. I added it immediately to kgdb-next so it will be evaluated in >> the linux-next tree in the next day or so, and we can get this merged in the >> merge window. > > Ok, thanks a lot! > > We should still come up with a patch for kdb_sysinfo(), which doesn't > have a problem with time overflow (monotonic time doesn't overflow) > but has an issue with locking and uses 'struct timespec'. > > Baolin, could you respin your patch on top of Jason's tree and > replace ktime_get_ts64() with something based on ktime_get_fast_ns? Sure, I will do that today. -- Baolin.wang Best Regards