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  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, 20 Jan 2021 23:02:54 +0000
From:   Al Viro <>
To:     David Laight <>
Cc:     'Linus Torvalds' <>,
        Christoph Hellwig <>,
        Johannes Berg <>,
        Oliver Giles <>,
        Linux Kernel Mailing List <>,
        Greg Kroah-Hartman <>
Subject: Re: Splicing to/from a tty

On Wed, Jan 20, 2021 at 10:25:56PM +0000, David Laight wrote:

> I also wonder if pread/pwrite with offset == 0 should be valid
> on things where the offset makes no sense.
> I'm rather surprised the offset isn't just silently ignored
> for devices where seeking is non-sensical.
> You might want to error it for mag tapes, but not pipes,
> ttys, sockets etc.
> I really can't remember what SYSV, Solaris or NetBSD do.

... nor can you be arsed to RTFPOSIX.   Why am I not surprised?

(located by arcane action known as googling for pwrite POSIX):
The pwrite() function shall fail if:

	The file is a regular file or block special file, and the offset argument is negative.
The file offset shall remain unchanged.
	The file is incapable of seeking.

Powered by blists - more mailing lists