From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751739AbeAYLiO (ORCPT ); Thu, 25 Jan 2018 06:38:14 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36213 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750769AbeAYLiM (ORCPT ); Thu, 25 Jan 2018 06:38:12 -0500 X-Google-Smtp-Source: AH8x225DK+gNxt0z2dTYzJ51P4PYuPrkUEYHZ5lgm14vaujLGTo7tJG/0mVDYM6OwnAnYJmE2WJ4oA== Date: Thu, 25 Jan 2018 11:38:08 +0000 From: Daniel Thompson To: Baolin Wang Cc: Arnd Bergmann , Jason Wessel , Ingo Molnar , Mark Brown , kgdb-bugreport@lists.sourceforge.net, Linux Kernel Mailing List Subject: Re: [PATCH] kdb: Change timespec to use timespec64 Message-ID: <20180125113808.3bzgh6zloosw76yv@oak.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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! Daniel.