From: Carsten Langgaard <carstenl@mips.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Ralf Baechle <ralf@oss.sgi.com>,
"linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
Subject: Re: LTP testing
Date: Tue, 25 Jun 2002 17:06:39 +0200 [thread overview]
Message-ID: <3D1886FF.8D63762C@mips.com> (raw)
In-Reply-To: Pine.GSO.3.96.1020625162041.29623I-100000@delta.ds2.pg.gda.pl
Ok, you have convinced me, as long as the man page and the LTP get fixed.
/Carsten
"Maciej W. Rozycki" wrote:
> On Tue, 25 Jun 2002, Carsten Langgaard wrote:
>
> > > Linux platforms do it this way, e.g. Alpha and IA-64. A SIGSEGV is a
> > > valid response for an invalid address. Remember you test pipe(3) and not
> > > pipe(2).
> >
> > I'm not sure that you mean by pipe(2) and pipe(3), but according to my man
> > page, pipe should return with EFAULT in this case.
>
> pipe(2) is a syscall, while pipe(3) is a library call (see `man 2 intro'
> and `man 3 intro', respectively). You rarely access syscalls directly --
> the system library usually does this for you. Depending on a system
> certain library functions may be trivial syscall wrappers, invoke a number
> of syscalls (see e.g. the stat() family) or be implemented entirely in the
> userland.
>
> > ERRORS
> > EMFILE Too many file descriptors are in use by the pro
> > cess.
> > ENFILE The system file table is full.
> > EFAULT filedes is not valid.
>
> Yep, this denotes such an error is possible and under what conditions. I
> don't think it actually mandates it, at least it's not expressed
> explicitly. Anyway, it's valid for i386 and possibly nothing else. Look
> at the system version it refers to -- my version is: "Linux 0.99.11 23
> July 1993".
>
> A brief search of the web for "EFAULT pipe" reveals confirms others agree
> with me -- the error is not mandatory (the EFAULT vs SIGSEGV issue was
> discussed a few times at least in various contexts -- go search the web).
>
> I believe a SIGSEGV is saner, too -- this way it's harder for an error
> resulting from passing an invalid pointer to remain unnoticed (consider
> some code that passes a pointer to read-only memory and fails to check a
> result of pipe()).
>
> If still in doubt, you may try to discuss the LTP result at
> <linux-kernel@vger.kernel.org>. I don't think anybody wants to rewrite
> pipe(2) for all the platforms that handle it our way.
>
> Maciej
>
> --
> + Maciej W. Rozycki, Technical University of Gdansk, Poland +
> +--------------------------------------------------------------+
> + e-mail: macro@ds2.pg.gda.pl, PGP key available +
--
_ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com
|\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527
| \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555
TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556
Denmark http://www.mips.com
next prev parent reply other threads:[~2002-06-25 15:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-25 13:21 LTP testing Carsten Langgaard
2002-06-25 13:53 ` Maciej W. Rozycki
2002-06-25 14:18 ` Carsten Langgaard
2002-06-25 14:56 ` Maciej W. Rozycki
2002-06-25 15:06 ` Carsten Langgaard [this message]
2002-06-25 15:28 ` Ralf Baechle
2002-06-25 14:28 ` Johannes Stezenbach
2002-06-25 14:39 ` Ralf Baechle
-- strict thread matches above, loose matches on Subject: below --
2002-06-25 10:47 Carsten Langgaard
2002-06-25 9:59 Carsten Langgaard
2002-06-25 12:07 ` Maciej W. Rozycki
2002-06-25 7:15 Carsten Langgaard
2002-06-25 13:59 ` Ralf Baechle
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=3D1886FF.8D63762C@mips.com \
--to=carstenl@mips.com \
--cc=linux-mips@oss.sgi.com \
--cc=macro@ds2.pg.gda.pl \
--cc=ralf@oss.sgi.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.