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:	Fri, 21 Mar 2014 16:41:11 +0100
From:	"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
To:	Peter Hurley <peter@...leysoftware.com>
Cc:	linux kernel <linux-kernel@...r.kernel.org>,
	linux-serial <linux-serial@...r.kernel.org>,
	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	Ivan <athlon_@...l.ru>
Subject: Re: man termios

>> Peter, do you agree that Linux appears to differ from POSIX here? (Not
>> sure if you tried my test program to verify...)
>
>
> I did run the test program to validate that it's observed behavior is that
> implemented by Linux, with which I'm very familiar.
> I don't have a test setup for other *nixes.
>
> I would be interested to know the results of
>
>   ./noncanonical 0 5 3 0
>   hello

Solaris 10:
read() completes when 5 bytes received.
OpenBSD 5.4
read() completes when 5 bytes received.

> and
>
>   ./noncanonical 0 5 3 2
>    hel

Solaris
read blocks()
OpenBSD
read blocks


Plus my test case where Linux differs:

./noncanonical 100 5 3 0

Linux: read() returns after 3 bytes input

Solaris: read() returns only after 5 bytes input
OpenBSD: read() returns only after 5 bytes input


> on other platforms.
>
> With respect to POSIX compliance, it's hard to say. I'm not sure the
> spec contemplates the degenerate case where max bytes < MIN. And

Well, given the way the other implementations behave, I think it does
contemplate it, because it carefull avoids talking about the number of
bytes requested by read() in that case.

> specifically
> with regard to terminal i/o behavior, POSIX is essentially ex post facto,
> and is really documenting existing behavior.
>
> Other than the degenerate case of max bytes < MIN, is there any other
> variation between Solaris and Linux in non-canonical mode?

The only one I've seen is the one I noted. I haven't tested too
exhaustively though.

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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