Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5936199rdb; Thu, 14 Dec 2023 04:11:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9uKaWPpVaDaJmLAZlYIY69T0gao0nbIuLw1zCjUfkhWQiLxZSFAO9D+w4Z9MAX0KZZwfw X-Received: by 2002:a17:90a:1d4e:b0:28a:e89f:5f9d with SMTP id u14-20020a17090a1d4e00b0028ae89f5f9dmr3439941pju.5.1702555885710; Thu, 14 Dec 2023 04:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702555885; cv=none; d=google.com; s=arc-20160816; b=YSustBt1eekUtqFr6oVbDLunPi606Tu494p3plGHo5uwBQBhOyfNWLp6DmrHNcygB1 R0fQQjG992Mq+DtlgGjPwTW00FmVvHKmO3z265ccyhmAwsq/HQS7WMLQ0O4jwzzPAh4S 7INTYFercBzdBSIc7nDcsoUWO/XvaWKA7ZxfAEcXTgtZVl1bO2hXsQonOweJtECl7lAj OQvi18cl8Yxw8DrzP33WmurRVfngArrWDuwxYomxYjcJWHaof8n13ZsgmM8HpPY+2DNg t3BVTv0vdCSF0h02v7qRLQdkEnMwX4S+mUIdghJ5KXgsulAUb/4pSdDAsTX34VfMFrk9 1yVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id; bh=z4eNwAfIehFKtPOPmHLKCOJJwUcBy9/deOcszQI8ZXM=; fh=w6Cg2dgZK/7Qq3mKXI9Z13t97xczi6qooOYRjC2mYsY=; b=IqPbOmwp9jBGB9UO6QVKv9iuGAbVoxt7x8uDNMk7iqweDyQIIWGw+j4nG/+GbHKtuj MdIITor+5Gm2j8QB3obaQtVMV5Jcn6KTKwCDZ5L/bvRoICv6d8v/eY/lYXf3Lbpn1rv0 d3REOO9TT1gsKlucGeMKZjjW37RURFmj+/MZdm/ziZyfOP9zIjGQ+6zTTAiIsuM2sN/N bMweiDDi+h+XPgF+n/ItXJ4CCElhRvoin5NkE2X/CPvxyefvpwLlMCv1kmmTj4f6NGow irH0RBm0c1HTHBvmgaRtUtfDTIVdLvA3OZgSDQ3Yd7vGgL9wznqYb2sW5fbQYJeMdtP4 Z+FQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id g6-20020a17090a640600b0028ae82e48absi2548077pjj.118.2023.12.14.04.11.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 96607807C75B; Thu, 14 Dec 2023 04:10:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1572911AbjLNMKF (ORCPT + 99 others); Thu, 14 Dec 2023 07:10:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1572903AbjLNMKE (ORCPT ); Thu, 14 Dec 2023 07:10:04 -0500 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AD6610A; Thu, 14 Dec 2023 04:10:10 -0800 (PST) Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-54c77e0835bso11133601a12.2; Thu, 14 Dec 2023 04:10:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702555809; x=1703160609; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=z4eNwAfIehFKtPOPmHLKCOJJwUcBy9/deOcszQI8ZXM=; b=h0Coc+xGywoGprdJ5ilmeTINxWDMSafTqI8msq8P65P++vZNtmMa4WqzCh9Q/pcMHs bHdAPxbKLB8DE7qNtjy9AI85x3JOWU7utEYSq8xNPVwEXqJUWL6WsrdECfTjVIqJTiLW lU/C1t8qXcpH7v5Pz2oGTYjpS8RRrGjwZetk9oJePQAKV/iZknTrKNyilJuwsmUK40hQ RTsxcameq30ymO05G1nU4Sp/UE3M8bqUzpg1MmquHRC0o/RUjlrZtjsyjRAK4gTUaNRm CArK3jzIce5KSn9idSh+5Dkyb/FUP6gXbW5laKKXucxaDzrzjIizH6Rk26maJs0JAz6J 5SSg== X-Gm-Message-State: AOJu0Yz7hGEHXS/uxq7n4Cjy8LwPcryZRDo6f5Twshz99XDN5x7kN9Bp Vm285tkIZdsJNoniOh1xkPg= X-Received: by 2002:a17:906:c0c5:b0:a19:a19b:78cf with SMTP id bn5-20020a170906c0c500b00a19a19b78cfmr5028334ejb.146.1702555808698; Thu, 14 Dec 2023 04:10:08 -0800 (PST) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:59? ([2a0b:e7c0:0:107::aaaa:59]) by smtp.gmail.com with ESMTPSA id vc11-20020a170907d08b00b00a1ce58e9fc7sm9221901ejc.64.2023.12.14.04.10.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Dec 2023 04:10:08 -0800 (PST) Message-ID: Date: Thu, 14 Dec 2023 13:10:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/4] vt: ignore csi sequences with intermediate characters. Content-Language: en-US To: Martin Hostettler , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Nicolas Pitre , Adam Borowski , Egmont Koblinger References: <20181215143423.4556-1-textshell@uchuujin.de> <20181215143423.4556-4-textshell@uchuujin.de> From: Jiri Slaby Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEkSVz6FoqCHrUTx wr+aw6qqQVgvT/McQtsI0S66uIkQjzPUrgAEtWUv76rM4ekqL9stHyvTGw0Fjsualwb0Gwdx ReTZzMgheAyoy/umIOKrSEpWouVoBt5FFSZUyjuDdlPPYyPav+hpI6ggmCTld3u2hyiHji2H cDpcLM2LMhlHBipu80s9anNeZhCANDhbC5E+NZmuwgzHBcan8WC7xsPXPaiZSIm7TKaVoOcL 9tE5aN3jQmIlrT7ZUX52Ff/hSdx/JKDP3YMNtt4B0cH6ejIjtqTd+Ge8sSttsnNM0CQUkXps w98jwz+Lxw/bKMr3NSnnFpUZaxwji3BC9vYyxKMAwNelBCHEgS/OAa3EJoTfuYOK6wT6nadm YqYjwYbZE5V/SwzMbpWu7Jwlvuwyfo5mh7w5iMfnZE+vHFwp/wARAQABzS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2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: <20181215143423.4556-4-textshell@uchuujin.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Dec 2023 04:10:26 -0800 (PST) On 15. 12. 18, 15:34, Martin Hostettler wrote: > Various csi sequences contain intermediate characters between the > parameters and the final character. Introduce a additional state that > cleanly ignores these sequences. > > This allows the vt to ignore these sequences used by more capable > terminal implementations such as "request mode", etc. > > Signed-off-by: Martin Hostettler > --- > drivers/tty/vt/vt.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c > index 448b4f6be7d1..24cd0e9c037b 100644 > --- a/drivers/tty/vt/vt.c > +++ b/drivers/tty/vt/vt.c > @@ -2023,7 +2023,7 @@ static void restore_cur(struct vc_data *vc) > } > > enum { ESnormal, ESesc, ESsquare, ESgetpars, ESfunckey, > - EShash, ESsetG0, ESsetG1, ESpercent, ESignore, ESnonstd, > + EShash, ESsetG0, ESsetG1, ESpercent, EScsiignore, ESnonstd, > ESpalette, ESosc }; > > /* console_lock is held (except via vc_init()) */ > @@ -2259,6 +2259,10 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) > vc->vc_par[vc->vc_npar] += c - '0'; > return; > } > + if (c >= 0x20 && c <= 0x2f) { > + vc->vc_state = EScsiignore; > + return; > + } > vc->vc_state = ESnormal; > switch(c) { > case 'h': > @@ -2421,6 +2425,11 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) > return; > } > return; > + case EScsiignore: > + if (c >= 20 && c <= 0x3f) Staring at the current code, I am confused as I cannot find out why "20". Was this supposed to be 0x20 (the same as above -- 0x20 is SPACE and that _is_ sensible)? Or why was this arbitrary 20 chosen? thanks, -- js suse labs