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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Aug 2006 16:17:41 +0100
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	Haavard Skinnemoen <hskinnemoen@...el.com>
Cc:	Andrew Victor <andrew@...people.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] at91_serial: Fix break handling

On Wed, Aug 02, 2006 at 04:51:47PM +0200, Haavard Skinnemoen wrote:
> @@ -269,9 +271,14 @@ static void at91_rx_chars(struct uart_po
>  			UART_PUT_CR(port, AT91_US_RSTSTA);	/* clear error */
>  			if (status & AT91_US_RXBRK) {
>  				status &= ~(AT91_US_PARE | AT91_US_FRAME);	/* ignore side-effect */
> -				port->icount.brk++;
> -				if (uart_handle_break(port))
> +				if (at91_port->break_active) {
> +					at91_port->break_active = 0;
> +				} else {
> +					at91_port->break_active = 1;
> +					port->icount.brk++;
> +					uart_handle_break(port);
>  					goto ignore_char;
> +				}

Two points here.

1. Effectively, this just ignores every second break status.  We've no idea
   _which_ break interrupt is going to be ignored.
2. it breaks break handling.  uart_handle_break returns a value for a
   reason.  Use it - don't unconditionally ignore the received character.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ