public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: more fun with procfs (netfilter)
Date: 19 Nov 2001 11:18:46 -0800	[thread overview]
Message-ID: <9tblum$8p6$1@cesium.transmeta.com> (raw)
In-Reply-To: <E165kY1-0000Se-00@gondolin.me.apana.org.au> <Pine.GSO.4.21.0111190419250.17210-100000@weyl.math.psu.edu>

Followup to:  <Pine.GSO.4.21.0111190419250.17210-100000@weyl.math.psu.edu>
By author:    Alexander Viro <viro@math.psu.edu>
In newsgroup: linux.dev.kernel
> 
> Some shells (pdksh 5.2.14-1, bash 2.04 as shipped by SuSE) are trying to be
> smart if stdin is from regular file - they hope that third argument of
> lseek() is in bytes and is consistent with read() return value.
> 

Not just hope... they have a legitimate reason to expect that
guarantee from anything that advertises itself as S_IFREG.  I really
think procfs files should advertise themselves as S_IFCHR if they
can't fully obey the semantics of S_IFREG files (including having a
working length in stat()!)

Such S_IFCHR devices can return 0 in st_rdev to signal userspace that
this is a device node keyed by special filesystem semantics rather
than by device number.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

  reply	other threads:[~2001-11-19 19:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-19  7:13 more fun with procfs (netfilter) Alexander Viro
2001-11-19  7:17 ` Alexander Viro
2001-11-19  9:17   ` Herbert Xu
2001-11-19  9:22     ` Alexander Viro
2001-11-19 19:18       ` H. Peter Anvin [this message]
2001-11-20  0:48 ` Rusty Russell
2001-11-20 10:19   ` Alexander Viro
2001-11-21  0:14     ` Jamie Lokier
2001-11-21  0:23       ` Alexander Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='9tblum$8p6$1@cesium.transmeta.com' \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox