Received: by 10.223.176.46 with SMTP id f43csp2256249wra; Thu, 25 Jan 2018 07:14:09 -0800 (PST) X-Google-Smtp-Source: AH8x226gwNbwCXmMwdRDzi6GK4ryARwejj7Sy6kl9WfS6AiPuDvsM5JV89Fu/DqGG2YlGPD3hqKz X-Received: by 10.99.49.88 with SMTP id x85mr13107154pgx.77.1516893249768; Thu, 25 Jan 2018 07:14:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516893249; cv=none; d=google.com; s=arc-20160816; b=ZduyeMcqAdy0yJsFA8YNTLUdIxKhCKoAVzapiwTDICXifSowPF54dO9syNA3ioQHeX XnKFgMfjQ18vT9n9tmxeUDod9Msf5moDd50zOfj2RLxcQdcdUZL+jamP0kkuTXHZ/469 /E1s671dn7mGMfWLxyMlG8aBtkTBaETt4prFRNUc/rneWf7Dtc1pk+P0+RUktbuWJ9UA xYrjY/HfmFIG2jwgupsCP3sbTAyPYVjZ3jiU2oiiX79NVbFNciYJVBR8j9rQ7y/Q9f/2 q04NjLaeEGzCwm7moCXQVzz0iIRvnVKdGZIJbUgRwa871280l4gL96HN7Ll0F9ET+uy9 HFAA== 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=PzVufDOQ3/B1kTjjw4jeTmM3CElqWn6QXobHQr8Qcxw=; b=Ve5auOuOxCUEsP2qXKsPcgjyH6pDvJtr3eVthoX+SPpTLsNqVI0CgZCgBYauTQpid+ C5UUhBR07QJb1QAqKUDpu387WHEXW3UEwNXlOdNqAHAK1+fGYUrR2GtbxjcrD4DW84w1 e320sbHQgRtwuAaEIw/N3AztQmcJdjB2VqhSfTgCrjsC+pv0tfIi5EIbvLraD8ZytbNi X79QyWGukFCyakJADqGsTdsNMuvtlSib5Qu6M2zzK17zPd29hPf2y6/+h3lHXlZ6gLCX GDk/Oo77o0gYhIhESGS7n+/LGX3umvFYexCL+yG1HS9vT675mIJOpWFgvA8UgnuYwvpz +bLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hznUUMWm; 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 t8-v6si2073261plz.719.2018.01.25.07.13.55; Thu, 25 Jan 2018 07:14:09 -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=fail header.i=@gmail.com header.s=20161025 header.b=hznUUMWm; 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 S1751687AbeAYPMg (ORCPT + 99 others); Thu, 25 Jan 2018 10:12:36 -0500 Received: from mail-oi0-f67.google.com ([209.85.218.67]:39762 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751462AbeAYPMV (ORCPT ); Thu, 25 Jan 2018 10:12:21 -0500 Received: by mail-oi0-f67.google.com with SMTP id t8so5427810oie.6 for ; Thu, 25 Jan 2018 07:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PzVufDOQ3/B1kTjjw4jeTmM3CElqWn6QXobHQr8Qcxw=; b=hznUUMWmcy6HbF3TxjrHld3rEMddg6TaiLrxEzBcMoSZtxo9+JfIvHPvhF/63uuKNO l+Ejygqo9hdbwiIAN5dras0vVMzD18JhdaCsrMEiyEVdOiswqmFzhCSSPr1HXYwaaSNu L1x3Xr7ZFMpT3oBDRURI5lPqqHbVCvLtRQnPE0xvzo05eDB6G/CQ1DBKh5vvH3Uf4B8M sdbmCnA+6I4QNpFbqyGuXOngp7HxlG911TvuynRzSc47gW4JemxS30VfepX8SCqXDEgn 8YtzzqWxoIxZJTpboJhEwzJ6s7fgW6ZV6dygPNflhOb6y6zmNND3M8syWdDEkuVkvQKk c/yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PzVufDOQ3/B1kTjjw4jeTmM3CElqWn6QXobHQr8Qcxw=; b=SUgZboObo3qHetg1k8vR8KlwQwrELo5Rs/CmIG9V3h5hBQs2LJQjfilTxr1x07spD7 3anMdGTPbFL8rs2A69ha48l7CKVqyjdjUcM7cUBbUCpI9xXMDALW1mjvP6XakXBNUYgC ddWNE3I3/1l25OE/FLwXS5jw7zUMn5CK5WsUFKKM7AB/P9sCufuczAN4I/E26EgdP5ps Kw6cVSKAxicfsP+XRRrCwuUpCj3HH6a59cUf3OcQUB5hcGa1rAfaP4hE0+yMRbsS3qNz bxIBXms9rn+s7C7u8h9+KULrm5w0tZrAH1iqOd5LvaKw+BgJLko18J1IaCDfpp/UmMw0 /5ew== X-Gm-Message-State: AKwxytdync/gLCHm04+2AKTTYC+eySnNOq46bHGy9uKFTFsYqNZDXxa4 fj/r1jP9or/fhsJQtg6+Duw+osvPDrHyYZwT4dw= X-Received: by 10.202.232.211 with SMTP id f202mr9544093oih.128.1516893140692; Thu, 25 Jan 2018 07:12:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.68.119 with HTTP; Thu, 25 Jan 2018 07:12:19 -0800 (PST) In-Reply-To: References: <20180125113808.3bzgh6zloosw76yv@oak.lan> From: Arnd Bergmann Date: Thu, 25 Jan 2018 16:12:19 +0100 X-Google-Sender-Auth: HBxFq_XjmuxOF1f4uwj-nz2HirI Message-ID: Subject: Re: [PATCH] kdb: Change timespec to use timespec64 To: Jason Wessel Cc: Daniel Thompson , Baolin Wang , 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 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? Arnd