Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp707267ybt; Fri, 26 Jun 2020 09:35:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4c3o6HDcSuguY2eK94UNnXeCfhL99Yab2XKHbHI0+K5V+67ktcw2v1L4gleJl+hxCIefd X-Received: by 2002:a17:906:3e13:: with SMTP id k19mr3231343eji.476.1593189344853; Fri, 26 Jun 2020 09:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593189344; cv=none; d=google.com; s=arc-20160816; b=M3cnTq0XC962mivJQBwWNwsAAAei7CmgDbOIo8V9m8SPZJT89IIA3acjdQ+WFnRaYX djVY56EgTatQsSWyTuRAXGwuhE2FQqbqITiJKqEgRVrfYOa630cIKKPm4emOnuyvBs7n Fx+bynejxBoWm8B/J4gBuajMS8ayg3AAs/j7Nnss8N7z4qqCoAYvVlkXUExxRtMpQKqN YUO1jYR2/9wiu1oaX4gqOS65wcwg74UDuLI74VmLOwxSwNpHkoy2oiKI7/Ai9Z+PXjHz gan8L/4V+JKKp0dtrwyBhj9HaNj95AFje8AKsTk1irNbdBXbSa6ncN/GXB9slAHTVjts mM1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=HR4bEOxs7v9kCssDbScsWg1pJoSGN7JebNfZuKn5wuo=; b=uoa5BsrSyNsEcFbsqtvZWmPjAVLeczESTihIrPRTPnK/coP/adn6BM08aPYg1MXRDe LKFdFS9JBRMErL03oDQaa/CueoTKfGbf3AsyI+s6mucjs/sOO2WudTpwxaNcnQtf7IS/ k+pnNFa7ilRuPPfba6l/eNgkikUHdFVVLKy4e+8dc6bPDFylV+X3RjwUPpPSFHHLGVeq 3HFpNrr2KnxihFfvYtVq1ouZpW92WEgxr7MEcNoLCxghUxCSA5bXVicvNnmwhzGbEFQH wKL+763vCC2JKz0CH/7tlMfgJDPDQJdn0s3oRv1xhvkH9p6ue84Nz1xc+9N5C0EJpRhV JZEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mt9ekr0o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id gu14si4598970ejb.589.2020.06.26.09.35.21; Fri, 26 Jun 2020 09:35:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mt9ekr0o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727883AbgFZOzC (ORCPT + 99 others); Fri, 26 Jun 2020 10:55:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbgFZOzB (ORCPT ); Fri, 26 Jun 2020 10:55:01 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5011FC03E979 for ; Fri, 26 Jun 2020 07:55:01 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id h15so9782109wrq.8 for ; Fri, 26 Jun 2020 07:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=HR4bEOxs7v9kCssDbScsWg1pJoSGN7JebNfZuKn5wuo=; b=Mt9ekr0ofSNl/CmAF2rA2LbmjOQBfb9ws/Pnfxn+BB5oVzuL8VW1Yu181JEl6/RtZh PYK0XUBI+FrHNLDlLfUfPZV3AbnIxwMi0m+JdqjIsT3JFSvga2Tc7PDdIjPklKxxuzuI 6VY1XWXMIiVLlID7Qdg9drCZcEf+z54TxT7h+st9tTeQ7lzB6z1nf+UWXWutfNx+aWrH p6JOpyivN5SvkBnWPSEGq29iXARyLim8Yww7eP+uE7Hirrowhsr65kfasi1I+ztawaaG zHovhC88tQD+EGr0RooWpilSFr4ZmqEmtSXUQOQk715ytwkH/LDKbBnetby8lnhRzrS3 DTAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=HR4bEOxs7v9kCssDbScsWg1pJoSGN7JebNfZuKn5wuo=; b=oBEn/mEE79OlVRZsnoYjZyoT7vp+naohmzSjUqMshd4GKPfLCvU5D2sbVip2yOjagM mDcAypBMBPQZp3PQ69woDDt2EeWyM5vCow0iQFJGiW+LUe1Rk3RENTDT5ZinjDhvq1qT M9avC0hQ+N/OixRGSx8Ac02w5qa4fsZBzHXwKscV9NzlxneORqr9fIcqFvRzarAMwQTE wXlt/+Op1IeoRYtCmsw44UqCwhfFAu+BLnKCqxxzNdxuPZXcXQPS55f9BNYkQ4Mu2KIv lm1f1PvyaEE5b4ovRnRwABkHl7ML45q/YetgYVLzWhytR7BUnm5ZgFGsHmGvvqC9+unR 9onA== X-Gm-Message-State: AOAM531VbXsjX/LrY02QtQ6frYduIYjEIXDiZSrgd9JIMYIbYFa2ssw6 2kwj+2Hp0mQCNcK6mJMVZETQSA== X-Received: by 2002:adf:f08b:: with SMTP id n11mr4127634wro.312.1593183300019; Fri, 26 Jun 2020 07:55:00 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id u186sm18273745wmu.10.2020.06.26.07.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 07:54:59 -0700 (PDT) Date: Fri, 26 Jun 2020 15:54:57 +0100 From: Daniel Thompson To: Linus Torvalds Cc: Jason Wessel , linux-kernel@vger.kernel.org, Douglas Anderson , Greg Kroah-Hartman , Sumit Garg , Sergey Senozhatsky , Petr Mladek Subject: [GIT PULL] kgdb changes for v5.8-rc3 Message-ID: <20200626145457.5weza5ow3hrm7kum@holly.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus The following changes since commit 48778464bb7d346b47157d21ffde2af6b2d39110: Linux 5.8-rc2 (2020-06-21 15:45:29 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux.git/ tags/kgdb-5.8-rc3 for you to fetch changes up to 440ab9e10e2e6e5fd677473ee6f9e3af0f6904d6: kgdb: Avoid suspicious RCU usage warning (2020-06-26 15:41:40 +0100) ---------------------------------------------------------------- kgdb patches for 5.8-rc3 The main change here is a fix for a number of unsafe interactions between kdb and the console system. The fixes are specific to kdb (pure kgdb debugging does not use the console system at all). On systems with an NMI then kdb, if it is enabled, must get messages to the user despite potentially running from some "difficult" calling contexts. These fixes avoid using the console system where we have been provided an alternative (safer) way to interact with the user and, if using the console system in unavoidable, use oops_in_progress for deadlock avoidance. These fixes also ensure kdb honours the console enable flag. Also included is a fix that wraps kgdb trap handling in an RCU read lock to avoids triggering diagnostic warnings. This is a wide lock scope but this is OK because kgdb is a stop-the-world debugger. When we stop the world we put all the CPUs into holding pens and this inhibits RCU update anyway. Signed-off-by: Daniel Thompson ---------------------------------------------------------------- Douglas Anderson (1): kgdb: Avoid suspicious RCU usage warning Sumit Garg (4): kdb: Re-factor kdb_printf() message write code kdb: Check status of console prior to invoking handlers kdb: Make kdb_printf() console handling more robust kdb: Switch to use safer dbg_io_ops over console APIs drivers/tty/serial/kgdb_nmi.c | 2 +- drivers/tty/serial/kgdboc.c | 32 +++++++++---------- drivers/usb/early/ehci-dbgp.c | 3 +- include/linux/kgdb.h | 5 ++- kernel/debug/debug_core.c | 4 +++ kernel/debug/kdb/kdb_io.c | 72 ++++++++++++++++++++++++++----------------- 6 files changed, 68 insertions(+), 50 deletions(-)