Received: by 10.213.65.68 with SMTP id h4csp661285imn; Fri, 6 Apr 2018 06:57:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx48M37LVEVADjUbuiM98MGPT1DlYLfEEDgrdIRDS61Z9SMbnExw/FkzSTm5d+Md8UfF7mQ2m X-Received: by 10.98.69.217 with SMTP id n86mr18730971pfi.41.1523023071450; Fri, 06 Apr 2018 06:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523023071; cv=none; d=google.com; s=arc-20160816; b=w9C4kHooeHuzZ7Z+hXaDWw/OyEmZCNJLWkdhgvEcAk8faGOyEX6HVAelQA/x3huW+l dI+SW5aoLozAbXbWboLH2l/KkILgEUsLIf6mo/evmjI+DrnqX6i8l/brGbvD7lZwIl1V qv0ZjwkTHdTr4pzNvSmZ5XBq3lmTyAZp71B7Hr+7PTJ7GZ0SXIomuH1DsJNgzZ3/dhl8 9bnqsY7LcMfGBdQH0R9wgY0HVFxZJpSts4ig+xtBVUN+4nE8wYymadSeiwIc6OiO9kGU K4ylWAqhXh8mvku8HC0BklhwwrKSqCmaAL9V5fl5ObDdHaie5GpLkQd6xwAb+xsnw7dV G0Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=jTazMVJZabQFObZwoCHSJDswgWM860pyLA1p3GzBCrA=; b=fZLPDImeSmmr0zzfWzrQUwHkZAshaj/a4DBlVw5Btw7oFOePMT97DtncvTdwpY2mn0 Vl8vE9XVOHWYzan1EAy/bNOJx4IjnSLeblfQgvzwL1wWZUOIkpmUhaZnJQkABZXRu8ry vrwLdKf3aCL0CGRwQE8+IfpAVF0CqFxYRHqlGVj2uDm5pzG95wynSMWuGoJuOp5595Jg 5kEHBNzs/D2SNHYtVAm+8ngjvZFSSwmYwggLTu8V1TLy4pFtNK/dv6+Zi8XrqSJjaFQu wPe38i97WuPDxTwcgAuB8a2X/18c7IAlOgMg86lLN4LqJjYGc7qgPcwlM210TO0E8cqX S4Gg== ARC-Authentication-Results: i=1; mx.google.com; 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 i21si8196039pfk.34.2018.04.06.06.57.37; Fri, 06 Apr 2018 06:57:51 -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; 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 S1756746AbeDFNnb (ORCPT + 99 others); Fri, 6 Apr 2018 09:43:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37338 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752790AbeDFNn3 (ORCPT ); Fri, 6 Apr 2018 09:43:29 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 90007DFF; Fri, 6 Apr 2018 13:43:28 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Frysinger Subject: [PATCH 4.15 65/72] vt: change SGR 21 to follow the standards Date: Fri, 6 Apr 2018 15:24:40 +0200 Message-Id: <20180406084353.786867142@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084349.367583460@linuxfoundation.org> References: <20180406084349.367583460@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mike Frysinger commit 65d9982d7e523a1a8e7c9af012da0d166f72fc56 upstream. ECMA-48 [1] (aka ISO 6429) has defined SGR 21 as "doubly underlined" since at least March 1984. The Linux kernel has treated it as SGR 22 "normal intensity" since it was added in Linux-0.96b in June 1992. Before that, it was simply ignored. Other terminal emulators have either ignored it, or treat it as double underline now. xterm for example added support in its 304 release (May 2014) [2] where it was previously ignoring it. Changing this behavior shouldn't be an issue: - It isn't a named capability in ncurses's terminfo database, so no script is using libtinfo/libcurses to look this up, or using tput to query & output the right sequence. - Any script assuming SGR 21 will reset intensity in all terminals already do not work correctly on non-Linux VTs (including running under screen/tmux/etc...). - If someone has written a script that only runs in the Linux VT, and they're using SGR 21 (instead of SGR 22), the output should still be readable. imo it's important to change this as the Linux VT's non-conformance is sometimes used as an argument for other terminal emulators to not implement SGR 21 at all, or do so incorrectly. [1]: https://www.ecma-international.org/publications/standards/Ecma-048.htm [2]: https://github.com/ThomasDickey/xterm-snapshots/commit/2fd29cb98d214cb536bcafbee00bc73b3f1eeb9d Signed-off-by: Mike Frysinger Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/tty/vt/vt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -1354,6 +1354,11 @@ static void csi_m(struct vc_data *vc) case 3: vc->vc_italic = 1; break; + case 21: + /* + * No console drivers support double underline, so + * convert it to a single underline. + */ case 4: vc->vc_underline = 1; break; @@ -1389,7 +1394,6 @@ static void csi_m(struct vc_data *vc) vc->vc_disp_ctrl = 1; vc->vc_toggle_meta = 1; break; - case 21: case 22: vc->vc_intensity = 1; break;