lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250821035533.8206-1-soci@c64.rulez.org>
Date: Thu, 21 Aug 2025 05:55:33 +0200
From: Zsolt Kajtar <soci@....rulez.org>
To: linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org,
	Zsolt Kajtar <soci@....rulez.org>
Subject: [PATCH] vt: monochrome mode with 512 glyphs

In monochrome mode the lowest 2 bits of the attribute are used for the
intensity. If a 512 glyph font is loaded the lowest attribute bit is
used for the MSB.

The result is that with normal intensity (1) the MSB of the glyph can
be set.

Due to this on my setup the erase character becomes 0x120 instead of
0x20. As 0x120 is allocated to U+0161 in the loaded font the erased area
will be filled with "s" instead of spaces.

To make the 512 glyph case work in monochrome mode the intensity was cut
down to one bit (bold only) in this patch.

Signed-off-by: Zsolt Kajtar <soci@....rulez.org>
---
 drivers/tty/vt/vt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 62049ceb3..8eebb5f17 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -667,7 +667,7 @@ static u8 build_attr(struct vc_data *vc, u8 _color,
 	{
 	u8 a = _color;
 	if (!vc->vc_can_do_color)
-		return _intensity |
+		return (_intensity & ~(vc->vc_hi_font_mask ? 1 : 0)) |
 		       (_italic    << 1) |
 		       (_underline << 2) |
 		       (_reverse   << 3) |
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ