Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4657302yba; Wed, 8 May 2019 00:03:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnD/x4VwQbaWIhe7cYZeL82Edld7qA1MET/P2eiRjp00Q8byxXuYUZU1PoQc8Lmr+jnVyW X-Received: by 2002:a63:9a52:: with SMTP id e18mr44402840pgo.335.1557299009533; Wed, 08 May 2019 00:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557299009; cv=none; d=google.com; s=arc-20160816; b=TyHpKf51wIvfnosk+Mc1N0b9Ameaj7X0v+woJMBiy9wQDGVC/bQYT5YUVrjCRdPtPn whwn64CqnEltZZMRJWdVATIhln3kMOMakOTvZmWk+JwOL5kI52cGvbJ/qaVwzWJcrKh0 mpkijlZkJurJEne6+xHC1pcbQJYISsY6DydywNfbxRKiuRkIsudqw4hrOK5WflxtZmhs Ggq+Tgxa1AnujeghfTnwUT/nZWo+//27lsZfZCAfsxOKNW6TafkM2zBSim+ZQQ3qVK+g S2/YS2fGOzMUACES97lAawS3wd4nck8KiZ0qahw+H19bL3CVgGSdBFQPnHeBBEOn2721 K0OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:date:subject:cc:to:from; bh=YbmfDZVL/DAMUeDHHZpDoK+ay/pm6WB7gFa0JphCbOM=; b=EJQwbTkcSF7NBpy8IJPpF5g46IftH54FHt+swRY+gAMyB5Pjjhk/qOK2AKj2TUh5RN O9dMVdHm4sCCosFZE17KegB6MQ/yugKA/rw4/2vslQcRdhS7rd2uQyD/bpSHpX3yJ4jx YYbbiC8Vk0CIt35GHKOxOD0xJijQkICSPtT9kjBCKdjqlzKZUOkrltLv/qKU3odAHgpH 1c0HK7VvY/osfvfhHQZ3rTj3qN6c1UPhT8fSQ2+YjqFsr2EoWK8qmZ3NrHPI5mfxRT8N I503oAm70LVTfe8+u1uyBeboRTmIL2txSyF+MSK0nWKuPYdbWs1pacKR8k63xw+Weg8W Op6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 t26si21214486pgu.327.2019.05.08.00.03.01; Wed, 08 May 2019 00:03:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 S1726883AbfEHHCz (ORCPT + 99 others); Wed, 8 May 2019 03:02:55 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49202 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726817AbfEHHCw (ORCPT ); Wed, 8 May 2019 03:02:52 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x48722h7138618 for ; Wed, 8 May 2019 03:02:52 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sbs3hkav5-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 08 May 2019 03:02:51 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 May 2019 08:02:47 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 8 May 2019 08:02:39 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4872cSV59900032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 May 2019 07:02:38 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 17E1442045; Wed, 8 May 2019 07:02:38 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 646DD4203F; Wed, 8 May 2019 07:02:37 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 8 May 2019 07:02:37 +0000 (GMT) Received: from adsilva.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 04A30A01A2; Wed, 8 May 2019 17:02:35 +1000 (AEST) From: "Alastair D'Silva" To: alastair@d-silva.org Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Dan Carpenter , Karsten Keil , Jassi Brar , Tom Lendacky , "David S. Miller" , Jose Abreu , Kalle Valo , Stanislaw Gruszka , Benson Leung , Enric Balletbo i Serra , "James E.J. Bottomley" , "Martin K. Petersen" , Greg Kroah-Hartman , Alexander Viro , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , David Laight , Andrew Morton , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 0/7] Hexdump Enhancements Date: Wed, 8 May 2019 17:01:40 +1000 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19050807-4275-0000-0000-00000332844B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19050807-4276-0000-0000-00003841F1F3 Message-Id: <20190508070148.23130-1-alastair@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-08_05:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905080046 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Alastair D'Silva Apologies for the large CC list, it's a heads up for those responsible for subsystems where a prototype change in generic code causes a change in those subsystems. This series enhances hexdump. These improve the readability of the dumped data in certain situations (eg. wide terminals are available, many lines of empty bytes exist, etc). The default behaviour of hexdump is unchanged, however, the prototype for hex_dump_to_buffer() has changed, and print_hex_dump() has been renamed to print_hex_dump_ext(), with a wrapper replacing it for compatibility with existing code, which would have been too invasive to change. Hexdump selftests have be run & confirmed passed. Changelog: - Fix failing selftests - Fix precedence bug in 'Replace ascii bool in hex_dump_to_buffer...' - Remove hardcoded new lengths & instead relax the checks in hex_dump_to_buffer, allocating the buffer from the heap instead of the stack. - Replace the skipping of lines of 0x00/0xff with skipping lines of repeated characters, announcing what has been skipped. - Add spaces as an optional N-group separator - Allow byte ordering to be maintained when HEXDUMP_RETAIN_BYTE_ORDERING is set. - Updated selftests to cover 'Relax rowsize checks' & 'Optionally retain byte ordering' Alastair D'Silva (7): lib/hexdump.c: Fix selftests lib/hexdump.c: Relax rowsize checks in hex_dump_to_buffer lib/hexdump.c: Optionally suppress lines of repeated bytes lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags lib/hexdump.c: Allow multiple groups to be separated by lines '|' lib/hexdump.c: Allow multiple groups to be separated by spaces lib/hexdump.c: Optionally retain byte ordering drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- drivers/isdn/hardware/mISDN/mISDNisar.c | 6 +- drivers/mailbox/mailbox-test.c | 2 +- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +- .../net/ethernet/synopsys/dwc-xlgmac-common.c | 2 +- drivers/net/wireless/ath/ath10k/debug.c | 3 +- .../net/wireless/intel/iwlegacy/3945-mac.c | 2 +- drivers/platform/chrome/wilco_ec/debugfs.c | 2 +- drivers/scsi/scsi_logging.c | 8 +- drivers/staging/fbtft/fbtft-core.c | 2 +- fs/seq_file.c | 3 +- include/linux/printk.h | 34 ++- lib/hexdump.c | 260 +++++++++++++++--- lib/test_hexdump.c | 146 +++++++--- 14 files changed, 372 insertions(+), 102 deletions(-) -- 2.21.0