Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp756740imu; Sat, 15 Dec 2018 06:44:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/UCr24WdUScmMmeIubI/7IFZcdD1enmXWfIl0nXltZpbEt2p+Tx2cE6dKmfXrlf7azzsOdP X-Received: by 2002:a17:902:6e0f:: with SMTP id u15mr6501747plk.175.1544885055863; Sat, 15 Dec 2018 06:44:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544885055; cv=none; d=google.com; s=arc-20160816; b=oOiIfYZzbexuMjJ8xMuQEKFwtcAFjxkBDECogmymQlJ67cSMys4hwkPWGd7mmzFyok 0hxQxgYk2d6Kc1fXn4zTIeaELQ2a81rPYQAyl2o3LgFkrn+DZdPCiUs33IGri42L0rfQ 2vySwqjFIaaDAztcSFXre1MUqMCjsGXlFgc3vKthmuP90gYLStAXLJKVmKH9NofX+8ec cPlRHiTBKAbMgVCmoDAKDX+ZtR/8Nukh06mmoHywyeJqRW0BbfuE922heJsZoU2HYMxi 3yiE2h36X1MvpCNdH6nVfKPTdx3NbTYHrU4lEvdSzkWB3TQ3h4pRgewCQHE9Nz6nBCSc Y3ZA== 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; bh=iNfmduslXZjVqZXLn7lrK12pcyUJNYTCYYWEvDTg++U=; b=CIoulx4Wq+67Hpfx0q6wIWSY7qc23XiRLTCS4NQ9yv1k90/kg452cJkBTl3iWSkOHA xSI3xlmljK7I8YN6ri/3X+Vy/6AuLtEGFSUm/TuclmqBzl5QZtzC7NmNzG/KE5OJf0pb VVGNf1cROHr87M7kMD/V181RVCpLYpRpGTJRJo6hsKpcZD1YzhLG+aeCLqb0ufWNVDC3 +FY6c8bSSis0Rjf+y7b1KMMIbEjvrdM8EmpiMPkfmArg1lSCqg0VuSN4IyMxgOdFDmLs FkNHpDd0EW6JRgLUPSiTXNCOM+WrNAZneqo9nbErkjcpxcHPmIcQWGBmxKdK8HcLEuTE P5uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@uchuujin.de header.s=h header.b=kWOp+BS9; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i64si6376970pge.361.2018.12.15.06.44.00; Sat, 15 Dec 2018 06:44:15 -0800 (PST) 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=fail header.i=@uchuujin.de header.s=h header.b=kWOp+BS9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730315AbeLOOkv (ORCPT + 99 others); Sat, 15 Dec 2018 09:40:51 -0500 Received: from static.85-10-192-230.clients.your-server.de ([85.10.192.230]:39325 "EHLO mxout.uchuujin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729707AbeLOOkv (ORCPT ); Sat, 15 Dec 2018 09:40:51 -0500 Received: by neutronstar.dyndns.org (Postfix, from userid 1000) id 1FE3E1430BAEE; Sat, 15 Dec 2018 15:34:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uchuujin.de; s=h; t=1544884483; bh=NNUPWcAu9yrDygZ63hknAzF8mD32Wb0kLGlCzaBq7tU=; h=From:To:Cc:Subject:Date:From; b=kWOp+BS9MUo1OohgTLoF6jVyGOn1jKGoDvsIMkmlUsYUZ/oMhEr3AEK3aim56Sh11 ZyOkQdNnKxL3E/t642bmWHzHV0OFH+PA79QVMKzWX9L/xct2QPnOSIBoX8Ayfgh2cz /46ZcFmwPcGEkn108hQ8gz3DLIKSkKwREdqBZxOh5p6BF1Shu016mqi/1KT0rumgYj s6NnMXcdV2+Zl6jlNOkgS3mX7nBSAvuVJgLs5Yxk0iAnVXSjyafk+s2sw8AttSwxj1 g7bgkDqeYbQAG0aFiTzOhMM/+iQYjXNIaWAn1tNAzaCWu3g2DlLSz/52RK+9gMeeW4 91lFcreOMcHdA== From: Martin Hostettler To: Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Nicolas Pitre , Adam Borowski , Egmont Koblinger Subject: vt: Improve CSI parsing Date: Sat, 15 Dec 2018 15:34:19 +0100 Message-Id: <20181215143423.4556-1-textshell@uchuujin.de> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series improves parsing of csi sequences to be more compliant with current practice. ECMA-64 defines the format of CSI sequences which allow more characters than what the vt parser currently accepts. More importantly many of these characters are used in sequences that more capable terminal terminal implementations use. Adjust the parsing of CSI sequences to match xterm* by ignoring all unknown sequences of the form (ESC [)|CSI [\x20-\x3f]*[\x40-\x7e] This avoids printing unwanted characters when application send valid sequences not supported by linux either while querying the terminal for it's identity or when applications print sequences without knowing what terminal implementation they are connected to (e.g. when connected over serial lines, android's adb, simple tcp connects, etc) * and other common terminals