Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752660AbdFZMxV (ORCPT ); Mon, 26 Jun 2017 08:53:21 -0400 Received: from mail-cys01nam02on0051.outbound.protection.outlook.com ([104.47.37.51]:54512 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751704AbdFZMwo (ORCPT ); Mon, 26 Jun 2017 08:52:44 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=nxp.com; From: Leonard Crestez To: Jan Kiszka , Kieran Bingham CC: Subject: [PATCH v2 2/2] scripts/gdb: lx-dmesg: Use explicit encoding=utf8 errors=replace Date: Mon, 26 Jun 2017 15:52:22 +0300 Message-ID: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131429551579150570;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.158.2;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39380400002)(39400400002)(39450400003)(39850400002)(39860400002)(39410400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(38730400002)(118296001)(305945005)(356003)(106466001)(86362001)(966005)(105606002)(47776003)(104016004)(2906002)(77096006)(53936002)(33646002)(50226002)(81166006)(189998001)(76176999)(8676002)(5660300001)(48376002)(4326008)(498600001)(50466002)(6666003)(2950100002)(8936002)(6306002)(36756003)(5003940100001)(85426001)(50986999);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB2572;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1AFFO11OLC003;1:xA7l5xDPh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ybu/y6KPPJQYZyWMGZOFVK7LL8F9lcWv4ZD3Cs3W4gEzMpRIe/JYSBO3?= =?us-ascii?Q?HRfHWSqRVs5ZI0ffkWqejLpeU9BOUtQwO5dllc8gmQ=3D=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4831cd85-62ea-48cc-2dfa-08d4bc923941 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506067)(300135500095);SRVR:DM5PR03MB2572; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2572;3:r6kroxWMZNL3oZt36ngqbj6Q0y65m9X82L9GPzzvE2bLtyr6e2fYEkBSGj+UwO2WJkvEmFW5Dl7Fhens7Jzo/cbspBt77Bs4Jo9QRvDrboPAuoUYX/usklz6H26XfVku6gL8LflBgMRn+E0whH5rtlf8IXMsp4Hpx9YwJGJcI3lgpy+hDiu5QMG86Ik4A3z79yVVwCecyBPJwdIjPIEHpf0KD3qmIrYPlBoy7WPf9zKsWgCagZ+VOHAPfB/7OH/Y9vyIRjV3rYUWT7B1mnK/7YV0wXmxe5Fr0oTuKh7MkBN/NKmhirE86U10tPZASROsJP3zAMU34mSDnMgmgkv+H3kqsergm3dBlxlx6ZZFJU9tjQvs3iAWgwFBve9p4PS9T/EKDu3xjBECuUGfLehT2hhwoHNqWXwle0jo4kPVvBvhOufR7LJyRqRQrbXxT35mCELOq4o1BulG+kM9ftjZLsqTymLrg/PDwecc64+OoZZPdyjRj0y696ui0HNWP5R4UQI8EMLIWc0zXGYb+RYoxZW/kY2u8Fzq5C4V3BreyCvJinKv9iw7V9n27Lw+B1BRIltGdq5Q5nB2ufgylIVKC7ZF1o6LJrw9XuklLWJX1cHFsWERLY9QXE3QE7Yoaf0fYqfigWxOv085/RicvO9J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8Tc712QxlFoq1JrpwEF+toBKdj0Mz72W51ltUO8K04OSmUym/B4wUH0aW+7sJFjWQGoAZc5R9IbF6u5grNY+JYpyARdrZ1W1GYnCH2eXKTdjlFU1OJzXZ2s+2Ux7+xloMY6I= X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2572;31:c2814JTHAuh9tChLLzHSPpAjQ4pP4vmmY00K+QwxgDfHeJws9mKToxyyeO0FQmCQXV0dnbqZcJBbnFun7ka9t5pN6GM5uUDwP8db0qwcdqAlc2x8VxuqSl9DJNvZktpIlqPRPyOhvY6fzj2cgZbOJ8D0/VCKLjGkKhT5OhPlQ9jQBq912XFDv+pVYX+op+kXf6w5VYjZE8gio+GnF1yxYVLBYxoPYznhHVFVbiB91IDJho22tfJwWzsAMB6xhpL4075mbGDb9R9qorRtX/5gkOiTmMOxJWutC/eOwEedmLhm49DPROcmilTgdcibR1UqWO8hnVo73Tp9UKVc72YC7Uq4eIAzzOOlzZcfmCzHL22hPNaYQu2Ua6Ym1xcyBHj7pDOBH0FG0hxgSSHofdZVMq7vJlsLCb1IBdLQzZBtTq/cb5R8JcbfbtHUKDgfiRjgHDKiGrBB5OE+gwPyi4i92bwWpj1yPRDkLXHsWX8vB1byGqNkXrEd71wA4mkx0PNEQ5uMt/dxVPeTxGoEM1wOztOda56jbKcXo7ayUhaKjkbbcEzVtrQefIkksOz+delJesvzNwRL2gPQ4sQs0dxTlSpb92A5unxVLJk1octxB2qb9ajr19RkJVgSFMCW9bBHFuwbSvkl7N4b/aawp5XhroX2HH+MxRIN7QyQjIB6zwov/5KetfNN3m5eEGuWUZ88 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(185117386973197)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123559100)(20161123556025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123561025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM5PR03MB2572;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM5PR03MB2572; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR03MB2572;4:S7oSVjcT8fVm4Kz7IBiJxkyPZf/iWpTeghG8cDbiE7?= =?us-ascii?Q?HzyP2E1izUgNWpHBbUOGfMhHMoA8rJGpJttba9L74uuTnj6Q+TrfXA14PUn+?= =?us-ascii?Q?abucBMvofNUborQi2JVqzuB+AlrrEEEsXLjud+ZEbgTLKAYGHjDFLMeU5Gig?= =?us-ascii?Q?M7bcPGA0LD0EesGK0dw2wyBFJhU/Y5sI/IZNoavXogASYFWDpqEbfu2SBcJO?= =?us-ascii?Q?TG7hJT+mgCQIWPP7saSjMFl2vyxnbQxU5/61YNkENHtRFsxuMfyf7TvaEZ7t?= =?us-ascii?Q?vjYjMzcA2/ShsSQg5RkIt86KYcvzZR3rst+7sJJ4iN2/ouEFx/cy5gPMKWrz?= =?us-ascii?Q?rQHWAIzjgNrJHyimXzy2hruNDA3qiAyexbLSigsJqd2FWFR8vvKKDaOFdIon?= =?us-ascii?Q?HbQXvf4JnfplEEpbfe1lKI6rj4S2eRt2Skbc1u12FmvyNbHumTQnr9GAsGjR?= =?us-ascii?Q?UlB3z5LG/Bw+p2zAHzWY9j5ue83aSZNDIv2UkzKCAy3XrFOQ+tWEztPM/ZyD?= =?us-ascii?Q?V9dGAwq+LlgW8Bb7hyQstBdRtQ2uQg/Ppeq6uEtIULnJK3ZMlf+ZJpNRxZp9?= =?us-ascii?Q?b3b4CaycsvpPZn3gt9P7sneV3E57fRToNOz/YGvWmgOdwVeIcCb4NDulz9i3?= =?us-ascii?Q?pxbL/Bp8UJdGWpYF+lTOZNC9+h7PkIBg0TxwwAkWfmlLVBZDr/3z5DWB1ICJ?= =?us-ascii?Q?wbQWg51aPKwWr0mTfuATMGAKH/ZM8z0+dLrqPF1Z+4hCJ1XTtCCYYF7SjFxH?= =?us-ascii?Q?8rPvk+9Zj4oPlUvKuNwC4pAua3E7azoBIUFixqQrGUvddBdi59Hoqv09Pbqe?= =?us-ascii?Q?b73GnBeDhftFDb9MAlS05p16cDIsgQuCMwzDUyt5Iy1crGvrMjIoweD1rlPA?= =?us-ascii?Q?j7IfS3nv7m4yC9x4/v1vC88JtBEb1VMMFPZn0Q9noTbjKedjowH44JYjY+YM?= =?us-ascii?Q?RfiaW7xWLj8zBXxwYkffrYj3Rts2ysk0k48cmozdSlzw+Skvb/EVv2vsnM3V?= =?us-ascii?Q?fOEHhnOgdHuM4BIE3+DBHJwxd/mCuYUANmE9b7lqv8Ixhp8OD0A2tEAY7p5Q?= =?us-ascii?Q?XciLdWe+Fu+jOw5Fl/a9eEbAc3n9KA4eS8byABRB+TyVravKPei5C0Qg9oZt?= =?us-ascii?Q?icMLoqUdREs2Pn6YytyQkBNIDfUFLtZY73y8k800Y9TwlsEnvJDy43nMEfit?= =?us-ascii?Q?BbSJGBGTgmd1iVFRdzMVkerctjV83vNJOx+rPSqMDVT4c85qPBzchtupUzxr?= =?us-ascii?Q?mSWD5zfs6dRaGONLmWhxjE4dF6sgg/MmCttj7DGihLd3M7KwjSTwNMfKJKLk?= =?us-ascii?Q?UD3jJi2vbIE1I6AZYQCuA=3D?= X-Forefront-PRVS: 0350D7A55D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR03MB2572;23:DzRuZtc53aH7B6L2tm7tZxBO1rfx9/OFrSFvU6w2Y?= =?us-ascii?Q?VnQ94+uTJDCesBPP1WBNfbOZrqs18fyylM0AeyF04A71TCbv2+fUTbo5zI3e?= =?us-ascii?Q?+stclSQE0pzWfkE7kC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A+eocj5ul9x8mnBUS02L/GDf9EFQ/BqK48tDRP134EVdgvGvlIZxTwG041do1f1futZtwZHtYwNT/nAo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2572;7:txbygdtYzSWEgVasOeGoUyZyjvhZY2I77EgsPPNkMJGC9dRvm1EAvcKqhm7Irwqaf9dDepjPUim0xyNLOrZ79v0y5OlTbx3G7zHhBAtFGjXlcQfXRGb8SnXX/AJvRb+FXKxGpdN11xyPQUNd4ulN+VhFEJ7F0ACBsgG3w/dnUoxi/Beggbvcoq+sFme6Me6HJSxVA7rs/g55q40uz7vdCWS4YLMxHzm+4OT63JEbISm9UM4cYhB06xsKQKfWhqqOUKXfECo14rSr3BCMLWarIOrK5z0WOcBDFf5VMwytGjwDV+q9UUwsyxhmQ97DMOJTU2oaH6ezgEbdQjDoKDXpPPGL+VRabC1xJpMfWopvZcr4OY98FVZoY+sMK3Uz8x/hT1GsPHpIk40zRfhEyAZWce7mDwjhOMdGmB2QAcm0HisgdaSZlrTtde/MkS7ApxZiile5+CQdbFzE9JfD6ToTVSiQ/CVfeDolpSj7BYgroc58xkuRK7TqDuzqwg8pPBrUBMN60JJ755AGHOcbv2idYWtltiL1HfIMMMWdn47ABemi0L8K+5iRVezkUBYeCFfWOkfKt02UXCmo/l0upVlx4/ol0UPOC9dz2GpXfYXBIwB+SpLXrLHrvXH2G/D7Jvk1GhRUsiVXuHQS4jgIklTX7nntygW/36Yl0gNXg0ie5DufRtltGJ+OoL7PsxB2GBkfMa95jh0e72jJchl4SJ6lsxpscds4D4fceOUAfqGE5e4oocyR6i69Q1aFiSqHiX/O+xzxoVqJEneEgs8w5dV8hE+5hJoKkkMRQLz8jsD1C9g= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 12:52:37.5250 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2572 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2515 Lines: 68 Use errors=replace because it is never desirable for lx-dmesg to fail on string decoding errors, not even if the log buffer is corrupt and we show incorrect info. The kernel will sometimes print utf8, for example the copyright symbol from jffs2. In order to make this work specify 'utf8' everywhere because python2 otherwise defaults to 'ascii'. In theory the second errors='replace' is not be required because everything that can be decoded as utf8 should also be encodable back to utf8. But it's better to be extra safe here. It's worth noting that this is definitely not true for encoding='ascii', unknown characters are replaced with U+FFFD REPLACEMENT CHARACTER and they fail to encode back to ascii. Signed-off-by: Leonard Crestez --- Changes since v1: * Add encoding='utf8' * Only do an explicit encode for python2. On python3 this returns a bytes object which formats to b'BLAH' instead. * Elaborate commit message explaining what's wrong. The original patch was hacked together while debugging something else. Link: https://lkml.org/lkml/2017/6/23/405 Signed-off-by: Leonard Crestez --- scripts/gdb/linux/dmesg.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py index f5a0303..6d2e09a 100644 --- a/scripts/gdb/linux/dmesg.py +++ b/scripts/gdb/linux/dmesg.py @@ -12,6 +12,7 @@ # import gdb +import sys from linux import utils @@ -52,13 +53,19 @@ class LxDmesg(gdb.Command): continue text_len = utils.read_u16(log_buf[pos + 10:pos + 12]) - text = log_buf[pos + 16:pos + 16 + text_len].decode() + text = log_buf[pos + 16:pos + 16 + text_len].decode( + encoding='utf8', errors='replace') time_stamp = utils.read_u64(log_buf[pos:pos + 8]) for line in text.splitlines(): - gdb.write("[{time:12.6f}] {line}\n".format( + msg = u"[{time:12.6f}] {line}\n".format( time=time_stamp / 1000000000.0, - line=line)) + line=line) + # With python2 gdb.write will attempt to convert unicode to + # ascii and might fail so pass an utf8-encoded str instead. + if sys.hexversion < 0x03000000: + msg = msg.encode(encoding='utf8', errors='replace') + gdb.write(msg) pos += length -- 2.7.4