From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933407AbeCGNZi (ORCPT ); Wed, 7 Mar 2018 08:25:38 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35536 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754153AbeCGNZh (ORCPT ); Wed, 7 Mar 2018 08:25:37 -0500 Date: Wed, 7 Mar 2018 07:25:35 -0600 From: Josh Poimboeuf To: Borislav Petkov Cc: Linus Torvalds , X86 ML , Andy Lutomirski , Peter Zijlstra , LKML Subject: Re: [PATCH 5/9] x86/dumpstack: Improve opcodes dumping in the Code: section Message-ID: <20180307132535.g7c2jro5n7okavbh@treble> References: <20180306094920.16917-1-bp@alien8.de> <20180306094920.16917-6-bp@alien8.de> <20180307101314.GC23662@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180307101314.GC23662@pd.tnic> User-Agent: Mutt/1.6.0.1 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 07, 2018 at 11:13:14AM +0100, Borislav Petkov wrote: > And that is fine if I do a 64-byte default, on-stack buffer but that > code_bytes= thing can be 2 pages max which is yuck. No way I'm doing > on-stack buffers then. How about we just remove the 'code_bytes=' option? (Or at the very least, reduce its possible range to a reasonable max?) I doubt anybody actually uses it. I'd never heard of it before, nor have I ever seen an oops with a long code dump. I can't fathom why somebody would even need it. 64 bytes is plenty, and an 8k code dump just sounds insane. It comes from the following commit: commit 86c418374223be3f328b5522545196db02c8ceda Author: Chuck Ebbert Date: Tue Feb 13 13:26:25 2007 +0100 [PATCH] i386: add option to show more code in oops reports Sometimes developers need to see more object code in an oops report, e.g. when kernel may be corrupted at runtime. Add the "code_bytes" option for this. Signed-off-by: Chuck Ebbert Signed-off-by: Andi Kleen Cc: Andi Kleen Signed-off-by: Andrew Morton But I've never seen a case where somebody needed to use it. -- Josh