[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kernel vs. pppd

> > 
> > It's on my TODO list. Atlest I _now_ understand how to write the syscall
> > wrapper that emulates the proper return value :)
> Uhh.. how can it be fixed?  It's a binary-incompatible change.  Before,
> we have two programs, one which checks errno against EAGAIN, the other
> against EWOULDBLOCK.  One of them works, the other does not.  Now you
> change one of those returns from a syscall to the other value.  Still,
> one works & one does not.

Sorry, I wasn't clear about the issue.

It can't be fixed for any already existing binary. However, it can be
fixed for all future binaries by making glibc change the headers to
make EWOULDBLOCK==EAGAIN on Linux. The kernel can stay as it is, and
glibc will provide a syscall return wrapper to check if it's returning
an _old_ EWOULDBLOCK value that needs to be translated to EAGAIN (not
sure if this ever happens in our kernel now, perhaps in the future?). 

I haven't thought about it much, and the above might not be an optimal
case. I don't like munging headers, and it might be a good idea to do as
other arches do e.g. check the personality of the thread, and return a 

To fix pppd, you have to rebuild it with a new glibc that changes
EWOULDBLOCK to EAGAIN in the headers, and if neccessary change syscalls
returning the old EWOULDBLOCK to the new EAGAIN.


Reply to: