Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp806140imm; Fri, 31 Aug 2018 13:56:23 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda9ZR9pFHITMQjqjj5KaKZkkbhdWmAzvxUyNwbp2BP4UOaFS6D0FrAd/S5YttaoD5xOZ5k5 X-Received: by 2002:a63:5055:: with SMTP id q21-v6mr15972581pgl.397.1535748983382; Fri, 31 Aug 2018 13:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535748983; cv=none; d=google.com; s=arc-20160816; b=HjytMHeiWK9VP8h4j8fsPlLjlJ5ck7Gcj+x4UTOoqcfY4N5U5RCRNkniJxwo2WqotY n+YHnmPMEU9NWA3xeIuyYM3s3NXKxRiskJMHWMlxBxn9uqoAo0qBp0SRVT0bc9Qj8Yay DqERgztKIiycGJbuSg7w3z2Ag3mdC3BKGfzhWXcudXSYlLABbEMqYPRr4xN3fxP1yA3L PTVm/4LIHMZE65K2KgezfkjFykgXxmoVMJPCjf1FQpddUTlW0l4r9U86vL9AX+h59uvB FFCwdpTstXnbaqG/FMyryrl26q5naTAz7x4PqcIe1qSeEjD20AWdFeCokDZbKBPDIGT/ RscA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=xA7an3MtvPDHqyv/GmK4u4YNwImf+ORfvSp8ZP9m9CU=; b=ycDEAlQJ/3ivRlqvJG+dlvrnbqr4l5bzUHHdvlbmn+XEHhPXztzvRHilzlr6y3xsuV 9Ri7cYcTrE8mw7zsKytTgvTtYDFEV6ldO8b+JzPf2Sne0EqN8BobQOyV1xzTyUgaT/be bZEi6+R5qXB/7XkOHHoAKZzlDORDJAoW0/FoQgRZOHgY9CL0HVl64vGWFduvotYqKNXo /mJSQNHZOhgj2FA2GTWxcPS+BfkpC/oa0x0m6lYt74yr9iAHaLxoGm/u179MeTDSW3ip oMYIGGMIc7ynkOG4ABaOt3toWYv7TjGzn5BlYZQjxbesUsvWzJ3WN8GMuuXkimztSRY0 wBXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ieRmlfdr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92-v6si10924823pli.518.2018.08.31.13.55.39; Fri, 31 Aug 2018 13:56:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ieRmlfdr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727334AbeIABBn (ORCPT + 99 others); Fri, 31 Aug 2018 21:01:43 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42804 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbeIABBn (ORCPT ); Fri, 31 Aug 2018 21:01:43 -0400 Received: by mail-wr1-f67.google.com with SMTP id v17-v6so12338608wrr.9 for ; Fri, 31 Aug 2018 13:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=xA7an3MtvPDHqyv/GmK4u4YNwImf+ORfvSp8ZP9m9CU=; b=ieRmlfdrMXXHV9W4zShUk7QQaz6/vDGYOJkJKSEAfqiuLaM8yFUeZGTMS2wCUED/Oe MheQ6RWmWqAQCnRe2HKs8Rq2uBBIbeV6eXzHd8RSaHrGFM+qFdB7LBfp/CNS4DZrRVav rkcrBn+0YY+sDloPCHPAtqVgA9K1ZnOzLeDWc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xA7an3MtvPDHqyv/GmK4u4YNwImf+ORfvSp8ZP9m9CU=; b=pVrjHEbuHIWuwoB3LYnxV+sL7u34LufRy7I0CfnjDl1O/SWwbKN+xTjbtbrkUE/T30 /b1hrcV5Yw6MzJ9cKtE4MHqSjahTajSu6SLT+KxejuDJU/H1cQO+Va5bbd7MCLloYzeZ Zr1LXkUJiRsz5/yE47s37u91yq3jv7SOo6pLKmE89jhfRwUK3RymEU37M/3VjqZ6n9PK tIfzIaVYWlbT1XhJd7XFQT2CX8FNBzdlw+tiWbpuJmxigMU5HZA/UYlJcEpvMUKEMMll e1Atoa5dETQb3jEKTOFWcy8UwLluUGoxpvB3m5fuRSxwquiwSOdI41gu3QI61v0adOur 1WJg== X-Gm-Message-State: APzg51AgWZqsYsZHV67+JpDDaDLyhovigHAQBzLnBafb4qipDNRCnrVV YZZ1MDqtdo8sFFpsq4kRHv6pjDf7p7k= X-Received: by 2002:a5d:608b:: with SMTP id w11-v6mr2037619wrt.193.1535748749046; Fri, 31 Aug 2018 13:52:29 -0700 (PDT) Received: from wychelm.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id u4-v6sm7659356wro.47.2018.08.31.13.52.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 Aug 2018 13:52:28 -0700 (PDT) From: Daniel Thompson To: Jason Wessel Cc: Daniel Thompson , kgdb-bugreport@lists.sourceforge.net, linux-kernel@vger.kernel.org, patches@linaro.org Subject: [PATCH 0/5] kdb: Cleanup code to read user input and handle escape sequences Date: Fri, 31 Aug 2018 21:51:37 +0100 Message-Id: <20180831205142.23609-1-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I spend a little time earlier this month looking at kdb_read() and ended up doing a little light refactoring a bit to make easier to read. Most of the patches are simple tidy ups although patches 4 and 5 introduce new behaviours. Patch 4 is probably not controversial but perhaps patch 5 is ;-). Tested as shown here: https://github.com/daniel-thompson/kgdbtest/commit/c65e28d99357c2df6dac2cebe195574e634d04dc Daniel Thompson (5): kdb: Tidy up code to handle escape sequences kdb: Simplify code to fetch characters from console kdb: Remove special case logic from kdb_read() kdb: Improve handling of characters from different input sources kdb: Tweak escape handling for vi users kernel/debug/kdb/kdb_io.c | 218 +++++++++++++++++--------------------- 1 file changed, 99 insertions(+), 119 deletions(-) -- 2.17.1