From: Ralf Baechle <ralf@uni-koblenz.de>
To: Andreas Schwab <schwab@suse.de>
Cc: Brian Gerst <bgerst@didntduck.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] global errno considered harmful
Date: Mon, 31 Dec 2001 19:42:11 -0200 [thread overview]
Message-ID: <20011231194211.A27020@dea.linux-mips.net> (raw)
In-Reply-To: <20011230110623.A17083@gnu.org> <200112301956.OAA02630@ccure.karaya.com> <20011230190020.A14157@dea.linux-mips.net> <3C2F90E1.DADE7F54@didntduck.org> <20011230235939.A16384@dea.linux-mips.net> <jen0zz8hfa.fsf@sykes.suse.de>
In-Reply-To: <jen0zz8hfa.fsf@sykes.suse.de>; from schwab@suse.de on Mon, Dec 31, 2001 at 05:48:09PM +0100
On Mon, Dec 31, 2001 at 05:48:09PM +0100, Andreas Schwab wrote:
> |> A sufficient number take the unavailability of new syscall in everybody's
> |> glibc as a sufficient excuse for broken code. util-linux as a major
> |> offender comes to mind or also e2fsprogs.
>
> Userspace should be using syscall(2/3) for new syscalls.
Which just replaces one problem with another, slightly smaller one.
So something like syscall(SYS_pwrite, fd, buf, count, pos) will not work
on all architectures because pos is a 64-bit argument which as to be
passed in an aligned register pair on some machines, so an additional
argument has to be inserted. So the glorious attempt to use syscall()
will now write data to fantasy positions in a file. Great. And just
an example demonstrating that the syscall interface is seriously dangerous
and non-portable. I don't think there is anyway except people limiting
themselfes APIs provided by libc or similar but not using syscalls directly.
Ralf
next prev parent reply other threads:[~2001-12-31 22:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-30 16:06 [PATCH][RFC] global errno considered harmful Lennert Buytenhek
2001-12-30 19:56 ` Jeff Dike
2001-12-30 21:00 ` Ralf Baechle
2001-12-30 22:10 ` Brian Gerst
2001-12-31 1:59 ` Ralf Baechle
2001-12-31 16:48 ` Andreas Schwab
2001-12-31 21:42 ` Ralf Baechle [this message]
2001-12-31 1:52 ` Lennert Buytenhek
2001-12-31 2:01 ` Ralf Baechle
2001-12-31 20:56 ` Erik Andersen
2001-12-31 0:01 ` ertzog
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=20011231194211.A27020@dea.linux-mips.net \
--to=ralf@uni-koblenz.de \
--cc=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@suse.de \
/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