Received: by 10.223.185.116 with SMTP id b49csp571597wrg; Wed, 14 Feb 2018 03:42:03 -0800 (PST) X-Google-Smtp-Source: AH8x2267S0DJqNNzrcKeSRA2wvFZZr0wBMNotGmt3TxhAVoryANK8EG5mNCLIXadhnTaxbkMFS/B X-Received: by 10.101.65.71 with SMTP id x7mr3599507pgp.379.1518608523023; Wed, 14 Feb 2018 03:42:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518608522; cv=none; d=google.com; s=arc-20160816; b=P00v4gILjKMEHLrXmn7PWqLP1/KpRGKZOpgMduXLae0k0wrB5/ZQLp4I39bJzCgDPY 9RGDgkyK9ArMoZxvdpTMwfj30n2cgywTukzt9eRz4oTjAmglL257sNF1qz+opSQ6yGbC NjGC37+67KzGOHe3N0AAZrzHbecWoOzeuQJT25H9/bQQNou480aPE7p2mqUSyppl1ELG +IyU1L2HPsG2gZZQBj43T6/MCY/Knl74avl2z8HTyJ1VOi1LAo1YUnNDnQUmg+2JYTZh 93jBnx9ov9bxsNdFAsycFjcKNxA1QWMUjJ3EGYWWqWa3HUW+6mFIH5H7+y+Vn0uxlF8v ahRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=DPYiT3kAWb3F/Ov5XZQ/3LlO37qrkG2cVdiR2JxKvQU=; b=TqWi976uRFTQ6/W6jc56iG2HsaMIuhHnXlXBvE87uXzsKK69VB+ii24EMhjuzypcrK k8fKQ0efH8gjb1BSbtsF2p8YtQZ8g94c/bJwSyPhopF9BqypP9PtcgK0i18k63EF9oEL 66bHjGyUP5aQyalZ8AtsnFIBWGC91ls+vSkyh9HVkDHw7xQJA4beKMJQmXj6owuxTv6i /jdJ/D46nfNBHWyKYA3AdvU5ebFpZdq6GmxLvDZ+Tw7qdlQn2HRsTggJ3xSgtOonstcg ntf5LzQYaGCj5N9hBC2f9ldaoMO5SqMMfoWC7jf5Hgrf73OimusBtED1OHmFS287dgr7 6DHQ== ARC-Authentication-Results: i=1; mx.google.com; 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 g23-v6si1229336plo.341.2018.02.14.03.41.48; Wed, 14 Feb 2018 03:42:02 -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; 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 S967510AbeBNLkz (ORCPT + 99 others); Wed, 14 Feb 2018 06:40:55 -0500 Received: from ozlabs.org ([103.22.144.67]:48249 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967355AbeBNLky (ORCPT ); Wed, 14 Feb 2018 06:40:54 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3zhHXh2MPRz9t3F; Wed, 14 Feb 2018 22:40:52 +1100 (AEDT) From: Michael Ellerman To: Vaibhav Jain , Balbir Singh Cc: "open list\:LINUX FOR POWERPC \(32-BIT AND 64-BIT\)" , "linux-kernel\@vger.kernel.org" , Benjamin Herrenschmidt , Paul Mackerras , Nicholas Piggin , Douglas Miller , Pan Xinhui Subject: Re: [PATCH] powerpc/xmon: Dont register sysrq key when kernel param xmon=off In-Reply-To: <8737264c91.fsf@vajain21.in.ibm.com> References: <20180212085956.12016-1-vaibhav@linux.vnet.ibm.com> <8737264c91.fsf@vajain21.in.ibm.com> Date: Wed, 14 Feb 2018 22:40:51 +1100 Message-ID: <87eflnre7w.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vaibhav Jain writes: > Thanks for reviewing this patch Balbir > > Balbir Singh writes: > >> Any specific issue you've run into without this patch? > Without this patch since xmon is still accessible via sysrq and there is > no indication/warning on the xmon console mentioning that its is not > fully functional. Specifically xmon-console would still allow user to > set instruction/data breakpoint eventhough they wont work and will > result in a kernel-oops. > > Below is command log illustrating this problem on one of my test system > where I tried setting an instruction breakpoint on cmdline_proc_show() > with xmon=off: But the same crash happens with XMON_DEFAULT=n and nothing on the command line. The problem is not xmon=off on the command line. The problem is that when xmon_on = false and we enter xmon via sysrq and then set breakpoints, we need to enable xmon_on before leaving xmon. So this is a bug introduced by: 3b5bf42b81d5 ("powerpc/xmon: Fix an unexpected xmon on/off state change") How to fix it is not entirely clear. In general I like the behaviour we have since the above commit, ie. quickly dropping into xmon and inspecting something doesn't leave xmon enabled, which then causes the system not to kdump/reboot later. What would be nice is if we keep that behaviour, but any action you take in xmon that requires xmon to remain resident, ie. setting a breakpoint, calls a function which makes sure xmon_on = true and if it wasn't prints a nice message saying "Turning xmon on due to breakpoint insertion" or something. cheers