From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753804Ab2GMWKv (ORCPT ); Fri, 13 Jul 2012 18:10:51 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:49897 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776Ab2GMWKt (ORCPT ); Fri, 13 Jul 2012 18:10:49 -0400 Date: Fri, 13 Jul 2012 15:08:49 -0700 From: Anton Vorontsov To: Colin Cross Cc: Russell King , Jason Wessel , Arve =?utf-8?B?SGrDuG5uZXbDpWc=?= , John Stultz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com, kgdb-bugreport@lists.sourceforge.net Subject: Re: [PATCH 0/6] KGDB/KDB FIQ (NMI) debugger Message-ID: <20120713220849.GA1778@lizard> References: <20120705231034.GA16931@lizard> <20120713094954.GA12917@lizard> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 13, 2012 at 09:43:45AM -0700, Colin Cross wrote: [...] > I was referring to the security implications, not size. Leaving KDB > on is effectively instant root access over the serial console. Oh, I see. Yes, for this we'd need to disable all modification commands. [...] > > The thing is, we even have a standard sequence for entering KDB, > > it is GDB-protocol command $3#33, so it actually makes sense to > > implement this. This would be the only async command, and it doesn't > > affect anything but the new code. I prepared a separate patch for this. > > I would suggest making the sequence longer than just return. A single > character is not that unlikely to be generated by random noise - I've > seen multiple devices reboot when the serial console was connected > because it received a SysRq-Crash (a break is all zeroes, which is > very common while shorting the lines as the console is plugged in, and > then random noise sent a 'c'). No no, it's not just return. It is either return or the longer '$3#33' escape sequence. Default is $3#33, so it should be pretty safe (but of course we can make it even longer, or even configurable). Thanks, -- Anton Vorontsov Email: cbouatmailru@gmail.com