From patchwork Wed Aug 15 11:00:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 1325321 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 92DF9DFFED for ; Wed, 15 Aug 2012 11:01:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753723Ab2HOLBB (ORCPT ); Wed, 15 Aug 2012 07:01:01 -0400 Received: from mail.x86-64.org ([217.9.48.20]:42982 "EHLO mail.x86-64.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317Ab2HOLBA (ORCPT ); Wed, 15 Aug 2012 07:01:00 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.x86-64.org (Postfix) with ESMTP id DBFB614003E; Wed, 15 Aug 2012 13:00:58 +0200 (CEST) X-Virus-Scanned: Nedap ESD1 at etzel.amd.com Received: from mail.x86-64.org ([127.0.0.1]) by localhost (www.amd64.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id At42xtKaUpUl; Wed, 15 Aug 2012 13:00:58 +0200 (CEST) Received: from gwo.osrc.amd.com (gwo.osrc.amd.com [10.97.0.252]) by mail.x86-64.org (Postfix) with ESMTP; Wed, 15 Aug 2012 13:00:58 +0200 (CEST) Received: from aftab.osrc.amd.com (aftab.osrc.amd.com [165.204.15.109]) by gwo.osrc.amd.com (Postfix) with ESMTP id C585949C0D5; Wed, 15 Aug 2012 12:00:58 +0100 (BST) From: Borislav Petkov To: LKML Cc: Borislav Petkov , Andrew Morton , Linus Torvalds , linux-kbuild@vger.kernel.org Subject: [PATCH] scripts/decodecode: Fixup trapping instruction marker Date: Wed, 15 Aug 2012 13:00:51 +0200 Message-Id: <1345028451-14709-1-git-send-email-bp@amd64.org> X-Mailer: git-send-email 1.7.11.rc1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Borislav Petkov When dumping "Code: " sections from an oops, the trapping instruction %rip points to can be a string copy 2b:* f3 a5 rep movsl %ds:(%rsi),%es:(%rdi) and the line contain a bunch of ":". Current "cut" selects only the and the second field output looks funnily overlaid this: 2b:* f3 a5 rep movsl %ds <-- trapping instruction:(%rsi),%es:(%rdi Fix this by selecting the remaining fields too. Cc: Andrew Morton Cc: Linus Torvalds Cc: linux-kbuild@vger.kernel.org Signed-off-by: Borislav Petkov --- scripts/decodecode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/decodecode b/scripts/decodecode index 18ba881c3415..4f8248d5a11f 100755 --- a/scripts/decodecode +++ b/scripts/decodecode @@ -89,7 +89,7 @@ echo $code >> $T.s disas $T cat $T.dis >> $T.aa -faultline=`cat $T.dis | head -1 | cut -d":" -f2` +faultline=`cat $T.dis | head -1 | cut -d":" -f2-` faultline=`echo "$faultline" | sed -e 's/\[/\\\[/g; s/\]/\\\]/g'` cat $T.oo | sed -e "s/\($faultline\)/\*\1 <-- trapping instruction/g"