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:	Sun, 4 Jan 2009 12:16:52 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Tollef Fog Heen <tfheen@....no>
Cc:	linux-kernel@...r.kernel.org, werner@...nelius-consult.de,
	frank@...gswood-consulting.co.uk
Subject: Re: [PATCH] Winchiphead 340/1: full baud rate and status/control
 line support

> +	if (factor > 0xfff0) { /* Clamp */
> +		factor = 0xfff0;
> +		divisor = 0;
> +	}
> +
> +	t1 = factor;
> +	for (t2 = divisor; t2 <= CH341_BAUDBASE_DIVMAX; t2++)
> +		t1 >>= 3;
> +	baud = CH341_BAUDBASE_FACTOR / t1;
> +

Same question as before: Can baud really become zero at this point ? Also
for that matter what guarantees that t1 cannot become zero in this
computation ?


> +	if (baud && tty)
> +		tty_encode_baud_rate(tty, baud, baud);

The check for B0 (hangup) was done earlier (see set_termios). So if you
can end up with a requested baud rate being turned into 0 you need to
bump it up to 1. If not you don't need the test.

--
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