This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/6] Optimize i386 syscall inlining
- From: Zack Weinberg <zackw at panix dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 21 Aug 2015 11:58:36 -0400
- Subject: Re: [PATCH 2/6] Optimize i386 syscall inlining
- Authentication-results: sourceware.org; auth=none
- References: <20150812192001 dot GA12730 at intel dot com> <20150812221203 dot GA4224 at intel dot com> <CAKCAbMi1e9CniEZVRbgb7W=m0=zFrBes8=h+ev1e_Ofg8GnzCw at mail dot gmail dot com> <20150814120309 dot GB28610 at gmail dot com> <CAMe9rOqD+RRytcgn-Vbe95ULpNL=Nv1DCg1Td4rCuDVWn-gNXw at mail dot gmail dot com> <CAMe9rOoAPEVAAuZUex0xqF3KNw+++We6wxpD=qiDA0Ey261XTA at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1508211225350 dot 2039 at digraph dot polyomino dot org dot uk> <CAMe9rOr_XZSCDcDrhpGkfWqy=p32APFyphg19qf=-3w1qEamXQ at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1508211233040 dot 2039 at digraph dot polyomino dot org dot uk> <CAMe9rOrMuhzZX23r9prjNjQeEHue7P1hbYwe606+jZqV53An9A at mail dot gmail dot com> <CAMe9rOriH2O_+Xo3sxpDrrLk22FuSZj7aFSfSxgSmDU76KpZyw at mail dot gmail dot com> <CAMe9rOrd79PNQwipTGWSGVWNzTi6KGBSEVjA2LtnmThuSpdi2A at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1508211457230 dot 2039 at digraph dot polyomino dot org dot uk>
On Fri, Aug 21, 2015 at 11:00 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> No, I think this patch is going further with a defective interface and the
> correct approach is to fix the interface before building further on top of
> it. That is, remove the third argument to INLINE_SYSCALL_ERROR_RETURN,
> changing the specification of the macro to be that it always evaluates to
> or returns ((type) -1).
I was just going to post the same thing. If there are circumstances
where a syscall needs to return something other than -1 on error (I
can't think of any off the top of my head, but I don't have the entire
system call list memorized), there is probably a damn good reason for
it. A generic macro that *might or might not* honor the return-value
argument, depending on the architecture, is a cross-architecture
compatibility bug waiting to happen. Possibly an *unfixable*
cross-arch compat bug, if binaries come to depend on the incorrect
behavior.
zw