[PATCH 2/6] Optimize i386 syscall inlining
Zack Weinberg
zackw@panix.com
Fri Aug 21 15:58:00 GMT 2015
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
More information about the Libc-alpha
mailing list