Received: by 10.223.185.116 with SMTP id b49csp2391546wrg; Mon, 12 Feb 2018 08:50:24 -0800 (PST) X-Google-Smtp-Source: AH8x225+2pdT/iDt2SmZ+eJh6dXiDvcmgxpkzWUIPUv0bLVo7ediERa3xbt5JhJfym92p/E0J74O X-Received: by 10.98.98.194 with SMTP id w185mr1420358pfb.9.1518454223964; Mon, 12 Feb 2018 08:50:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518454223; cv=none; d=google.com; s=arc-20160816; b=OQqt7F2qe4cioGWc8k+476isUzHV86Ka7VYB+lnzO8ORToyD/mMS5pj5XsINgU8/aK wMVTX7Y2wTkDCLZ4HAltaZe6LzkJPpmSo7OOm/o40YPetHZ2cuxUM2LToNHktf9tDq6X z0MI6/3v7faJoOoab3mB5ZlXmBFVThIVKUULYyagw1tnSChhF407fMobtIHVbKoXdHe2 h08YhfcQKf8sOyH2oCPJ45b9y/6cwIdeNut0F4ajEldGoukshrnbXmOfDH1USW/Ota3r 54pmtdvoauU5eZJhzhCru7d6fxfXkshQmQRbZCno+pXq5YRMlDCxkdVFbEIIVLmso+++ vM1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:mime-version:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=u7T1TWnhV0UAnf3t0AbcyD+rXE801ZWHvHtG7qT4NSs=; b=hXVugKkeGMr8h/3gp/FLE2SSXJsa0bYBP9kMmg7LmUk60hVV72DC7PygdSdvUkLEVn kE73uX51df0qEpokI52lAi+QianpCBMEaWYs6bBljvI4tH1NAgV0eoDsU8PDpR3yD0ZH bCIjUsCwakrGr8sLDCbMEdiHd3m/pPKC5a6ThvEGaLtTBMII/aY87qiDOxBffToJJv1C Nrnj58dUPmIBp/FfrhmNkLU7AGiYiuBlaaBqRJ9vUdp6faVQj0VUaM1J6ED9Fs9ny9n1 YelAdJkNm41iKWnhjCTflxRdO079zTfOOh1iZvr7kUlEH1fM4FP0zADGG+Wf2SCPdN1U wp9g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si2377731plx.791.2018.02.12.08.50.09; Mon, 12 Feb 2018 08:50:23 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934586AbeBLMfU (ORCPT + 99 others); Mon, 12 Feb 2018 07:35:20 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40990 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932925AbeBLMfR (ORCPT ); Mon, 12 Feb 2018 07:35:17 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1CCYJlo112064 for ; Mon, 12 Feb 2018 07:35:17 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2g3977ckgx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 12 Feb 2018 07:35:16 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Feb 2018 12:35:14 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 12 Feb 2018 12:35:10 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1CCZAQN58327116; Mon, 12 Feb 2018 12:35:10 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 234274C050; Mon, 12 Feb 2018 12:28:56 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E2564C046; Mon, 12 Feb 2018 12:28:53 +0000 (GMT) Received: from vajain21.in.ibm.com (unknown [9.124.35.190]) by d06av22.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 12 Feb 2018 12:28:53 +0000 (GMT) Received: by vajain21.in.ibm.com (sSMTP sendmail emulation); Mon, 12 Feb 2018 18:05:06 +0530 From: Vaibhav Jain To: Balbir Singh Cc: "open list\:LINUX FOR POWERPC \(32-BIT AND 64-BIT\)" , "linux-kernel\@vger.kernel.org" , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin , Douglas Miller , Pan Xinhui Subject: Re: [PATCH] powerpc/xmon: Dont register sysrq key when kernel param xmon=off In-Reply-To: References: <20180212085956.12016-1-vaibhav@linux.vnet.ibm.com> Date: Mon, 12 Feb 2018 18:05:06 +0530 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 18021212-0012-0000-0000-000005ADD8AA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18021212-0013-0000-0000-000019299C6D Message-Id: <8737264c91.fsf@vajain21.in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-12_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802120164 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: ~# cat /proc/cmdline root=UUID=248ad10e-a272-4187-8672-5b25f701e8b9 ro xmon=off ~# echo 'x' > /proc/sysrq-trigger [ 458.904802] sysrq: SysRq : Entering xmon [ snip ] 78:mon> ls cmdline_proc_show cmdline_proc_show: c0000000004196e0 78:mon> bi c0000000004196e0 78:mon> x ~# cat /proc/cmdline [ 505.618702] Oops: Exception in kernel mode, sig: 5 [#1] [ snip ] [ 505.620082] NIP [c0000000004196e4] cmdline_proc_show+0x4/0x60 [ 505.620136] LR [c0000000003b1db0] seq_read+0x130/0x5e0 [ 505.620177] Call Trace: [ 505.620202] [c000200e5078fc00] [c0000000003b1d74] seq_read+0xf4/0x5e0 (unreliable) [ 505.620267] [c000200e5078fca0] [c00000000040cae0] proc_reg_read+0xb0/0x110 [ 505.620322] [c000200e5078fcf0] [c00000000037687c] __vfs_read+0x6c/0x1b0 [ 505.620376] [c000200e5078fd90] [c000000000376a7c] vfs_read+0xbc/0x1b0 [ 505.620430] [c000200e5078fde0] [c00000000037724c] SyS_read+0x6c/0x110 [ 505.620485] [c000200e5078fe30] [c00000000000b320] system_call+0x58/0x6c [ 505.620536] Instruction dump: [ 505.620570] 3c82ff2a 7fe3fb78 38a00000 3884dee0 4bf98c05 60000000 38210030 e8010010 [ 505.620656] ebe1fff8 7c0803a6 4e800020 3c4c00d6 <38422120> 7c0802a6 f8010010 f821ff91 [ 505.620728] ---[ end trace eaf583921860b3de ]--- [ 506.629019] Trace/breakpoint trap ~# > I presume running xmon=off indicates we don't want xmon to take over in case of > panic/die/oops, I believe that when xmon console is available it should be fully functional rather than partially, otherwise it gets really confusing to the user as to why Instruction/Data break points arent working. > why are we tying this to sysrq? With xmon=off sysrq seems to be the only way to enter xmon console. -- Vaibhav Jain Linux Technology Center, IBM India Pvt. Ltd.