This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Use execveat syscall in fexecve


On Mon, 11 Sep 2017, Adhemerval Zanella wrote:

> > +# ifndef __ASSUME_EXECVEAT
> > +  if (errno != ENOSYS)
> > +    return -1;
> > +# endif
> > +#endif
> 
> Do we really need to add another __ASSUME_* that eventually we will need to
> cleanup? Can't we just check fo __NR_execvat, call it and if it fails with
> ENOSYS use the current code as fallback?  The drawback would be that the
> fallback code would be mainly dead code for newer kernels.

We have the ENOSYS code there and the subsequent fallback that will 
eventually need cleaning up *anyway*.  Having the __ASSUME_* macro makes 
it obvious in future exactly what changes should be made for the cleanup 
and exactly when it is possible to do that cleanup.  I think having such 
macros for any case with fallback code that can be cleaned up in future is 
a good idea for that reason.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]