Received: by 10.223.176.5 with SMTP id f5csp4366190wra; Tue, 30 Jan 2018 06:19:54 -0800 (PST) X-Google-Smtp-Source: AH8x226HXuilnLO68FPQMZ2PrUzA8S0SMWQPKhc91zEFPdcaCZ7Bna1GMSXsFnEEqM00oPyD4F+r X-Received: by 2002:a17:902:bf0a:: with SMTP id bi10-v6mr19227635plb.181.1517321994151; Tue, 30 Jan 2018 06:19:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517321994; cv=none; d=google.com; s=arc-20160816; b=b0zk3UfZIVYXwsy187N/l0y9aRxcNdiisX9eAPOD+nV8mi23bLpgBISd2wSgi1IZSj SGiND+8jGGM6ndi5Lsnu9lK8Q66JVOwCbsDlAA7lcgzExlDNAE0HG/K3c7795jftD3G3 1AG7tiolj5QLv8ryDQ04JaWm+4Y4xKiT6ek6YDlDASK4FUJi3FgDAuK/T1k3fcZDpFXD XqE3ocqYmyaXGYMVSLNJazqnr8+f4jULQQSe6ozYEn/ablX5qdqnTFZAlb2DMQurpHO1 YhHiQEGzKIKWd1z9LEjlcH/8H9umlJ+oq6LliYczu7wErxXZtw8GugIlcP6wZpa522CN YdQw== 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=11Z5U80p/tVqtUkko35jqw6KowgjsUNTI583h8/eGKc=; b=KEB86bziELUGwpZsNDBpG/lpMJybM42gsGkoWh2my075V7Caj7xiccUgvub++QsqyS qblA9Joq0aoxC3iZWzGtRai+GijWPBEr5fT2u3GUYHuhQnM0grbJlvSExGUT1i7QNOCA goUj29jusmIjgNnXSsQsa72DreR60s2u1LrZ0srgnw7CDv5j7gV9dEQl7zkidcJsGCkc r9jq050XEg0FAkydV+Evyp2ygg+gvszWV0l98oVj5LrmX7SP/5SdeKgsdFoJb6Ffz9fl F18AzwcLk2pSyfsgPyfoxSzgDMUstKNwwPYSMtQ4+wLdrxzaYRZ36YNZugcchXXZ18OU Pm3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=CtDXvvQO; 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 v17si9387078pgo.107.2018.01.30.06.19.39; Tue, 30 Jan 2018 06:19:54 -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=CtDXvvQO; 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 S1751842AbeA3Nf0 (ORCPT + 99 others); Tue, 30 Jan 2018 08:35:26 -0500 Received: from mail-oi0-f49.google.com ([209.85.218.49]:36378 "EHLO mail-oi0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbeA3NfY (ORCPT ); Tue, 30 Jan 2018 08:35:24 -0500 Received: by mail-oi0-f49.google.com with SMTP id 24so4757190oij.3 for ; Tue, 30 Jan 2018 05:35:24 -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=11Z5U80p/tVqtUkko35jqw6KowgjsUNTI583h8/eGKc=; b=CtDXvvQOS3JCp7GMiH0mqlu0/8/dokoBwH0z1DJJDA5XodJOZO1e5Eia6GGjn0zdIx HpeQZ9e9tiR50g5mAc7gNpgf78iJLrg5J1FQJQaqxl4CF5zMwy9G7OLiFLw69qZj77xq LVeQgZNppIiztRNZQHz+11khWfU28miuTuiBnLYI6bQmSMyABiRo5mS//iVU4O41i+hx JiEsa3Xc8sG7Dp13uhra1lsL9rugVUOtA/yMHRreebcW/Px738ls59GlERPOFPAc5TMw diSy0Ic1QOnfjTrnnKj5JCVxRNkfn/WJh8kgk6cygcSGTwziDr7V67+cpmAx8pQ/6GLK qm3Q== 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=11Z5U80p/tVqtUkko35jqw6KowgjsUNTI583h8/eGKc=; b=DOsMKc9kkCXMgXX3C/wtOyD6ktNtD4eyUuhH5ydZfwQuBGjmcuf1bW+lyP7AaZ2dBD iwJZXBI2pgEaah6AZmfqpRR51X58kqOntDMbdaL1efyejnDGWcsmGvAvwBR+yKVGa3dZ nIVfpKMOxr6Swe6tmgYljcymtNiUWX44TjJZsOzLsZdhdR8iXSHwToQy6hfJX40PG1Lr I0SX8VTJOlL9oQvaLyaJ7LqHKA9/gC/OCnbIMK/COlbeCZFOHfa1T589W3rVoBK+WmVO qymtqqYqWaSxO+tsaPV+S+itmJLKa3lro6SWzpiTDgpNdzbp4tvxuhrNB6NAg2rLYdF7 +uMg== X-Gm-Message-State: AKwxytd0muAqEmyRUCUPSrUaSvwwZLIfseU/DLqMhsHxhha/A6XmhkW5 7uILz65NMpDtj0WgbawAzfbc53Z/q/tC4yv5WBg= X-Received: by 10.202.232.211 with SMTP id f202mr19164236oih.128.1517319324288; Tue, 30 Jan 2018 05:35:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.68.33 with HTTP; Tue, 30 Jan 2018 05:35:23 -0800 (PST) In-Reply-To: <3f15868475cb4b32353885ee03c983209279fa81.1517192387.git.baolin.wang@linaro.org> References: <3f15868475cb4b32353885ee03c983209279fa81.1517192387.git.baolin.wang@linaro.org> From: Arnd Bergmann Date: Tue, 30 Jan 2018 14:35:23 +0100 X-Google-Sender-Auth: PIX55rQ07vW7VStVvttThASxvcI Message-ID: Subject: Re: [PATCH v2] kdb: use ktime_get_mono_fast_ns() instead of ktime_get_ts() To: Baolin Wang 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 Mon, Jan 29, 2018 at 3:22 AM, Baolin Wang wrote: > The kdb code will print the monotonic time by ktime_get_ts(), but > the ktime_get_ts() will be protected by a sequence lock, that will > introduce one deadlock risk if the lock was already held in the > context from which we entered the debugger. > > Thus we can use the ktime_get_mono_fast_ns() to get the monotonic > time, which is NMI safe access to clock monotonic. Moreover we can > remove the 'struct timespec', which is not y2038 safe. > > Signed-off-by: Baolin Wang Reviewed-by: Arnd Bergmann