From patchwork Wed Jul 18 01:02:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 142229 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp220083ljj; Tue, 17 Jul 2018 18:03:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfZIBnyvoiral1YwCot+XGgBXGIHnbkiCMqvno1uvvOxLQ5cdKs8Msiq07E6I0+atmR7buz X-Received: by 2002:a17:902:9687:: with SMTP id n7-v6mr3643209plp.33.1531875791203; Tue, 17 Jul 2018 18:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531875791; cv=none; d=google.com; s=arc-20160816; b=yJjHJldM12Q9kOcSRsIBFPkglGHkiXSKXwxa4nxEFj3eXdIwViUorC66Ny5e9WxWxY 8Eod5zYqDE8ow3UeatYSuvTNEl0+wBtdkmLJjjB64jcs8NBDL2w9Zc97KzS4zD89bAI8 qT5VqajClWmQd12lUQpW/UI/5aZAvahJ5zMOU+wnm2C26U5WEoXNSCES5aEv/JUPdBvy 60fP+X7YA/P/ssC4WaU/C6MAvL+Sy/0m2pmM6uttLAID5n4bniz9xaQHdSwA/u+zo+kq hnEfLf8qNYFKtmcmkV960ut+o/aGgbTQw5Cf1CpQuZqLh1jf2WhCzr3+lMVI7gp3C5YV mWVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=GwA3VnsEM1cysAa3byCjW7NaMWmmNc4Zj6OlBrUh0Ec=; b=CRbF1xII+u4yzYI0j/RdfdM886bpPsXtcmFlCdhUHDgjpqIkQVyfqeveNWUxTR61Xh yDm1qWiZH9TZg3+MvqNobW2aWEFIiFoOy53RTJMii5MF7WuZGPeU+jtcMXMdFnxOqJZx KkdHbq4CxlgRr+nDTZLP5gn0T7gu5QBeAjCDym0z68HoxpukPCeJPCbsvIKGPpjRI4r7 2V2qz2898ax+i4oLjBRP+1TFIOJCME89x5+zrPVdWV5vdzp6f9ehqGcjaXrm6XXlGn+w MHDk8n5rfU4ALAZ6tKhBVzmdBaW05NHNZZ5TAQLL9V/JIrIHBgDwlVJlYYDGNbRbIq16 X5Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=OzW4KCOd; 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=fail (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 w17-v6si1919042plq.221.2018.07.17.18.03.10; Tue, 17 Jul 2018 18:03:11 -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=@pobox.com header.s=sasl header.b=OzW4KCOd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731465AbeGRBiD (ORCPT + 31 others); Tue, 17 Jul 2018 21:38:03 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:60165 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730652AbeGRBiD (ORCPT ); Tue, 17 Jul 2018 21:38:03 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id E16F6EDF44; Tue, 17 Jul 2018 21:02:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=sasl; bh=9hsx isrz4BLrEl8XObgHlrjSsws=; b=OzW4KCOdmo8spVgkr75GOZKgdUx6eIiYKmH3 zTfQOCQjHPvlrAynzpeqMU76Bj31mXV6xXZQ8dx6CvlVBTZnfsQX57WH6dFlZLKA Z9lBv9FuVIQwhWDTes27bk8dcG0wbYnZnDIFb01+OfLSWBQGMUpZymdYl7fC8/fG XBp/uds= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id CAD06EDF40; Tue, 17 Jul 2018 21:02:45 -0400 (EDT) Received: from yoda.home (unknown [70.82.104.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 3ACD4EDF3B; Tue, 17 Jul 2018 21:02:45 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 629022DA0492; Tue, 17 Jul 2018 21:02:44 -0400 (EDT) From: Nicolas Pitre To: Greg Kroah-Hartman Cc: Kees Cook , Geert Uytterhoeven , Adam Borowski , Dave Mielke , Samuel Thibault , linux-kernel@vger.kernel.org, linux-console@vger.kernel.org Subject: [PATCH 1/3] vt: avoid a VLA in the unicode screen scroll function Date: Tue, 17 Jul 2018 21:02:40 -0400 Message-Id: <20180718010242.5254-2-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180718010242.5254-1-nicolas.pitre@linaro.org> References: <20180718010242.5254-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: 47C947BC-8A26-11E8-A67C-063AD72159A7-78420484!pb-smtp1.pobox.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The nr argument is typically small: most often nr == 1. However this could be abused with a very large explicit scroll in a resized screen. Make the code scroll lines one at a time in all cases to avoid the VLA. Anything smarter is most likely not warranted here. Requested-by: Kees Cook Signed-off-by: Nicolas Pitre --- drivers/tty/vt/vt.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) -- 2.17.1 Signed-off-by: Nicolas Pitre diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 2d14bb195d..03e79f7787 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -433,20 +433,22 @@ static void vc_uniscr_scroll(struct vc_data *vc, unsigned int t, unsigned int b, if (uniscr) { unsigned int s, d, rescue, clear; - char32_t *save[nr]; s = clear = t; - d = t + nr; - rescue = b - nr; + d = t + 1; + rescue = b - 1; if (dir == SM_UP) { swap(s, d); swap(clear, rescue); } - memcpy(save, uniscr->lines + rescue, nr * sizeof(*save)); - memmove(uniscr->lines + d, uniscr->lines + s, - (b - t - nr) * sizeof(*uniscr->lines)); - memcpy(uniscr->lines + clear, save, nr * sizeof(*save)); - vc_uniscr_clear_lines(vc, clear, nr); + while (nr--) { + char32_t *tmp; + tmp = uniscr->lines[rescue]; + memmove(uniscr->lines + d, uniscr->lines + s, + (b - t - 1) * sizeof(*uniscr->lines)); + uniscr->lines[clear] = tmp; + vc_uniscr_clear_lines(vc, clear, 1); + } } } From patchwork Wed Jul 18 01:02:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 142226 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp219842ljj; Tue, 17 Jul 2018 18:02:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfeRqQh3N/SBLqhiSyqHgT3Yg1ID0yMNoL7hHdk138zk7SfZ8AV+s8G0VVCEqLISg/Q5VrW X-Received: by 2002:a62:6d02:: with SMTP id i2-v6mr2932926pfc.218.1531875773671; Tue, 17 Jul 2018 18:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531875773; cv=none; d=google.com; s=arc-20160816; b=avrNzZZ4oVw14SYEegUK+ibmO/3y5s/zvSYlh+r3WfjGii5t/FHcKAQshnRiFL0N9E V5xt8pfBzXCGVYCaZjG+u2hUfrFnn5OS29u3uvKRDUaFLnwQOL6VM7JCrCUMyrbCeOpG /CSKUZNCUINtJaWJL1S13mjeSH8ni8ThPYc7rDd76XZFdedmptcCfrsEKRd+tLRNOgaE AdL47Aph6gASxKmksx9ZzLVULzD80zKto15XEml/4rFvdbo2ZwnuabQuR/N+rQZqcXNL Z8pijQxHq7VufmaPaqzGccVNRw3DrBQWGWk42w1qrc9p4H3v+YjskDfOhI4AQfat75mQ 27pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=nI5omes7ApS9ptVu/VgB1ARrYu6dA+yZLlNBuYaDtGA=; b=BcVw2nPhoiUtO+kjtuUb5H0ta37WNdbZwWhegXPYgDbmenQtN4nIgC4Rk6JxOUmG0K rSIHAgfJNYjEz6Brj6aSzk6QB4/tfzFascLqUG0W2FeQtN0KqSBVlVq9QcVw1wrRarVl yzAQ4QGcmclYUcYwaDahHlhsaV8WlMIdVqE/Xc6hxFIBEfmPMINwqy3B6eWItQMEF7dr neI/yad8V2R1mANyv9hR6UH828WZrGuj/bHNLxgGK1YILi/i2PHMbMDCdMl9+gsB4mZS 8F5p1ORvr/u8ofdoA2RQQgGpu8X3DBCpQSm0o3zvUhdKRh827qK3hjQFZEkfomm12aJy +VJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=DETh6Rmj; 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=fail (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 a18-v6si2205807pfc.106.2018.07.17.18.02.53; Tue, 17 Jul 2018 18:02:53 -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=@pobox.com header.s=sasl header.b=DETh6Rmj; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731659AbeGRBiE (ORCPT + 31 others); Tue, 17 Jul 2018 21:38:04 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:59416 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731114AbeGRBiD (ORCPT ); Tue, 17 Jul 2018 21:38:03 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id EEB91EDF45; Tue, 17 Jul 2018 21:02:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=sasl; bh=Z9a3 /MBdtj9jXUeSkq/yeCQ5zso=; b=DETh6RmjmbiGozGx70xavXS/vISp7hoKMcdN SSwgrzVOGCWo7CcZ5AWuKRsm2iJhxFx9v6fMgndBJB/ez/WFVXMQkxjiRrLKLgN0 aYPxt/w8MmjkxHZrv2uAthC8oSsILwzvJwzNd2Xtq0E4ow0oXgQ0myQ0veEf1xxV o/0aRKc= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id DE65CEDF43; Tue, 17 Jul 2018 21:02:45 -0400 (EDT) Received: from yoda.home (unknown [70.82.104.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 46200EDF3C; Tue, 17 Jul 2018 21:02:45 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 6E7DE2DA0674; Tue, 17 Jul 2018 21:02:44 -0400 (EDT) From: Nicolas Pitre To: Greg Kroah-Hartman Cc: Kees Cook , Geert Uytterhoeven , Adam Borowski , Dave Mielke , Samuel Thibault , linux-kernel@vger.kernel.org, linux-console@vger.kernel.org Subject: [PATCH 2/3] vt: coherence validation code for the unicode screen buffer Date: Tue, 17 Jul 2018 21:02:41 -0400 Message-Id: <20180718010242.5254-3-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180718010242.5254-1-nicolas.pitre@linaro.org> References: <20180718010242.5254-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: 47D0A818-8A26-11E8-8E70-063AD72159A7-78420484!pb-smtp1.pobox.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make sure the unicode screen buffer matches the video screen content. This is provided for debugging convenience and disabled by default. Signed-off-by: Nicolas Pitre --- drivers/tty/vt/vt.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) -- 2.17.1 diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 03e79f7787..331f175265 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -328,6 +328,8 @@ void schedule_console_callback(void) #define get_vc_uniscr(vc) vc->vc_uni_screen #endif +#define VC_UNI_SCREEN_DEBUG 0 + typedef uint32_t char32_t; /* @@ -571,6 +573,42 @@ void vc_uniscr_copy_line(struct vc_data *vc, void *dest, int viewed, } } +/* this is for validation and debugging only */ +static void vc_uniscr_debug_check(struct vc_data *vc) +{ + struct uni_screen *uniscr = get_vc_uniscr(vc); + unsigned short *p; + int x, y, mask; + + if (!VC_UNI_SCREEN_DEBUG || !uniscr) + return; + + WARN_CONSOLE_UNLOCKED(); + + /* + * Make sure our unicode screen translates into the same glyphs + * as the actual screen. This is brutal indeed. + */ + p = (unsigned short *)vc->vc_origin; + mask = vc->vc_hi_font_mask | 0xff; + for (y = 0; y < vc->vc_rows; y++) { + char32_t *line = uniscr->lines[y]; + for (x = 0; x < vc->vc_cols; x++) { + u16 glyph = scr_readw(p++) & mask; + char32_t uc = line[x]; + int tc = conv_uni_to_pc(vc, uc); + if (tc == -4) + tc = conv_uni_to_pc(vc, 0xfffd); + if (tc == -4) + tc = conv_uni_to_pc(vc, '?'); + if (tc != glyph) + pr_err_ratelimited( + "%s: mismatch at %d,%d: glyph=%#x tc=%#x\n", + __func__, x, y, glyph, tc); + } + } +} + static void con_scroll(struct vc_data *vc, unsigned int t, unsigned int b, enum con_scroll dir, unsigned int nr) @@ -2719,6 +2757,7 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co do_con_trol(tty, vc, orig); } con_flush(vc, draw_from, draw_to, &draw_x); + vc_uniscr_debug_check(vc); console_conditional_schedule(); console_unlock(); notify_update(vc); From patchwork Wed Jul 18 01:02:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 142228 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp219997ljj; Tue, 17 Jul 2018 18:03:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpen7U4sEo6IvuuJ4g9CuoqcV8EdNL7wvX1flbwLv3A7LqPz/zjfwJRTHc+r5iHpP2VfUyZW X-Received: by 2002:a62:2983:: with SMTP id p125-v6mr2988917pfp.128.1531875785975; Tue, 17 Jul 2018 18:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531875785; cv=none; d=google.com; s=arc-20160816; b=wiy+ktcPu//Wvlw8RbLoCBQe7A3skfxpTYBzRElZ8xOuza89gHgGuDjEJfOsII+Xkk D0sERbmW8tX5Zetf6I6FKHGWy8R4DaWD3ObT62TwOYunCCbAaObUGOlrlx7mOQlBGq7R PW6yKiRitSb7Ynw5GFCYmnDJiikJsgqcVGS2wFovopFhlcgcFGkgqCGLKcCmAfdgZwXV qG1b+OP3wE19Ca8cEIvDxfM4D5Tx8eJlTR2MAzOpopviGbDJN2GjRUsT2LgcszB1HqIs yYN9UZuQHSKOCz4bgMB6hGsVpXD16p7QJmSR5tNLemUJhHFVtVhtcGaX9ocZ19CUy9Li bFoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=CQZCptecnpZa8CCMUPkKWlqKGsiuf2bO++2PqHCNofg=; b=dxWNAhNqYclURzvQkmJX52dLkS7ZIbLSbR/oeFarwcxENsMPKazh+UmhjjW0+k9CtC MNwOJCX+8RLuiKzq6b5bjB1l0BCOz0xQjmiv0IUeEBArqIBKllPMZIMd4sEw4l0tbUCH sn/5rKNi+JbbznWk5NYB377iy3OycA8Gx7H96WnkCiJDOlOKOSu41zPHZpic+Pmeh9OH J6BLtEjiZgTciMhEObUN6a3LnovzVi+v4o2wSjxRyVrxd0pdkiOPBlWnJ48lFEQatUmF pDttoedNIzvteAMqDgL1q/xnw5ylY7g5nOoXBc/xCeOyUSuzsaagN7rfjpbzOcqcU0UP PntA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=hk69AUoo; 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=fail (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 i10-v6si2376214pfe.119.2018.07.17.18.03.05; Tue, 17 Jul 2018 18:03:05 -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=@pobox.com header.s=sasl header.b=hk69AUoo; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731595AbeGRBiD (ORCPT + 31 others); Tue, 17 Jul 2018 21:38:03 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:59494 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730614AbeGRBiD (ORCPT ); Tue, 17 Jul 2018 21:38:03 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id D1498EDF42; Tue, 17 Jul 2018 21:02:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=sasl; bh=msGo G7BxDRXFQvdEbTnebXwVP5E=; b=hk69AUoom8AvtyRNcbVhrmzdw+THwpg1tiZq iPdfrPHfdTQJ/Ma1q4Dap73ukiF12ALg0gjQFtm7UidQKTGMiPBtVMYdl8KbNv4+ jwBDJLjJ90QAS2RKHA62qzNzoOLQk9OclpJQsRPtLiUwYwFuSYsImMrcDVdzCQ6D aatDXMo= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id C7B0DEDF3F; Tue, 17 Jul 2018 21:02:45 -0400 (EDT) Received: from yoda.home (unknown [70.82.104.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 47D72EDF3D; Tue, 17 Jul 2018 21:02:45 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 7A60D2DA0698; Tue, 17 Jul 2018 21:02:44 -0400 (EDT) From: Nicolas Pitre To: Greg Kroah-Hartman Cc: Kees Cook , Geert Uytterhoeven , Adam Borowski , Dave Mielke , Samuel Thibault , linux-kernel@vger.kernel.org, linux-console@vger.kernel.org Subject: [PATCH 3/3] vt: add /dev/vcsu* to devices.txt Date: Tue, 17 Jul 2018 21:02:42 -0400 Message-Id: <20180718010242.5254-4-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180718010242.5254-1-nicolas.pitre@linaro.org> References: <20180718010242.5254-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: 47D1D3D2-8A26-11E8-98DB-063AD72159A7-78420484!pb-smtp1.pobox.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Also mention that the traditional devices provide glyph values whereas /dev/vcsu* is unicode based. Suggested-by: Geert Uytterhoeven Signed-off-by: Nicolas Pitre --- Documentation/admin-guide/devices.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) -- 2.17.1 Reviewed-by: Geert Uytterhoeven diff --git a/Documentation/admin-guide/devices.txt b/Documentation/admin-guide/devices.txt index 4ec843123c..1649117e60 100644 --- a/Documentation/admin-guide/devices.txt +++ b/Documentation/admin-guide/devices.txt @@ -173,14 +173,18 @@ they are redirected through the parport multiplex layer. 7 char Virtual console capture devices - 0 = /dev/vcs Current vc text contents - 1 = /dev/vcs1 tty1 text contents + 0 = /dev/vcs Current vc text (glyph) contents + 1 = /dev/vcs1 tty1 text (glyph) contents ... - 63 = /dev/vcs63 tty63 text contents - 128 = /dev/vcsa Current vc text/attribute contents - 129 = /dev/vcsa1 tty1 text/attribute contents + 63 = /dev/vcs63 tty63 text (glyph) contents + 64 = /dev/vcsu Current vc text (unicode) contents + 65 = /dev/vcsu1 tty1 text (unicode) contents ... - 191 = /dev/vcsa63 tty63 text/attribute contents + 127 = /dev/vcsu63 tty63 text (unicode) contents + 128 = /dev/vcsa Current vc text/attribute (glyph) contents + 129 = /dev/vcsa1 tty1 text/attribute (glyph) contents + ... + 191 = /dev/vcsa63 tty63 text/attribute (glyph) contents NOTE: These devices permit both read and write access.