[Letux-kernel] Fwd: MIPS: bug: gettimeofday syscall broken on CI20 board?

Paul Boddie paul at boddie.org.uk
Tue Nov 12 12:37:12 CET 2019

On Monday 11. November 2019 16.52.25 H. Nikolaus Schaller wrote:
> Hi Paul,
> looks as if there is nobody active on linux-mips or the mipscreator list...

I did chat with Ralf Baechle a while back on IRC, but I think he is a very 
busy person.

> Do you see a similar effect on your CI20?
> Or do you have an idea how to track it down?

I haven't tried a recent kernel on the CI20 in the last few weeks because I've 
been using it as my main working machine. There may be some complicating 
issues with the CI20 that might affect things like DHCP, though: there is some 
odd behaviour with MAC identifiers where it assigns a new one every time it 
boots. This is documented on the eLinux wiki:



> > I have done some strace and the first significant difference
> > is that with v5.4-rc6 there is no gettimeofday syscall.
> > 
> > Another symptom pointing in the same direction is that
> > after manually assigning an IP address I can run ping
> > but get strange time values.
> > 
> > So it may be that
> > 
> > 24640f233b46 mips: Add support for generic vDSO
> > 
> > did break gettimeofday when used with latest Debian Stretch
> > libraries. I tried to git revert but there are conflicts.
> > 
> > Just a side-note: both kernels work with Debian Jessie,
> > which likely has an older gettimeofday wrapper that
> > is not influenced by some subtle change.

I can imagine that some system call and C library incompatibility might have 
arisen. For various other reasons, I have been looking at things like these, 
and I did stray into vDSO territory having seen the term mentioned a few 
times. Unless I am mistaken, it is a way of accessing kernel functionality 
from user space and can be used to implement some system calls as normal 
functions accessing kernel resources:



Interestingly, the second article above talks about gettimeofday as being a 
candidate for this technology. So it is possible that the later kernel no 
longer has gettimeofday as a system call, but the C library still expects one.


More information about the Letux-kernel mailing list