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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160315203459.GR3553@var.home>
Date:	Tue, 15 Mar 2016 21:34:59 +0100
From:	Samuel Thibault <samuel.thibault@...-lyon.org>
To:	William Hubbs <w.d.hubbs@...il.com>,
	Chris Brannon <chris@...-brannons.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	speakup@...ux-speakup.org, linux-kernel@...r.kernel.org
Subject: [PATCH] Staging: speakup: Clear hi font bit from attributes

Previously, speakup would see the hi-font bit in attributes.
Since this bit has nothing to do with attributes, we need to clear it.

Signed-off-by: Samuel Thibault <samuel.thibault@...-lyon.org>

--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -267,7 +267,7 @@ static struct notifier_block vt_notifier
 static unsigned char get_attributes(struct vc_data *vc, u16 *pos)
 {
 	pos = screen_pos(vc, pos - (u16 *)vc->vc_origin, 1);
-	return (u_char) (scr_readw(pos) >> 8);
+	return (scr_readw(pos) & ~vc->vc_hi_font_mask) >> 8;
 }
 
 static void speakup_date(struct vc_data *vc)
@@ -477,8 +477,10 @@ static u16 get_char(struct vc_data *vc,
 		w = scr_readw(pos);
 		c = w & 0xff;
 
-		if (w & vc->vc_hi_font_mask)
+		if (w & vc->vc_hi_font_mask) {
+			w &= ~vc->vc_hi_font_mask;
 			c |= 0x100;
+		}
 
 		ch = inverse_translate(vc, c, 0);
 		*attribs = (w & 0xff00) >> 8;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ