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: [RFC PATCH] AARCH64/ILP32: introduce kernel time types


On Tue, Jun 28, 2016 at 12:07:57PM +0200, Andreas Schwab wrote:
> Yury Norov <ynorov@caviumnetworks.com> writes:
> 
> > diff --git a/sysdeps/gnu/bits/utmp.h b/sysdeps/gnu/bits/utmp.h
> > index 2a1ffcb..fae9126 100644
> > --- a/sysdeps/gnu/bits/utmp.h
> > +++ b/sysdeps/gnu/bits/utmp.h
> > @@ -38,7 +38,7 @@ struct lastlog
> >  #ifdef __WORDSIZE_TIME64_COMPAT32
> >      int32_t ll_time;
> >  #else
> > -    __time_t ll_time;
> > +    __ktime_t ll_time;
> >  #endif
> >      char ll_line[UT_LINESIZE];
> >      char ll_host[UT_HOSTSIZE];
> > @@ -76,8 +76,8 @@ struct utmp
> >      int32_t tv_usec;		/* Microseconds.  */
> >    } ut_tv;			/* Time entry was made.  */
> >  #else
> > -  long int ut_session;		/* Session ID, used for windowing.  */
> > -  struct timeval ut_tv;		/* Time entry was made.  */
> > +  __ktime_t ut_session;		/* Session ID, used for windowing.  */
> > +  struct __kernel_timeval ut_tv;/* Time entry was made.  */
> >  #endif
> 
> I don't think we should be using kernel-related types here.  This is a
> user-space-only, on-disk struct, so it'd better use fixed size types.
> 
> Andreas.

Hi Andreas,

Utmp does not deal with kernel, that's true. But this is time types by
nature, and native ABI keeps it synced with kernel. And ILP ABI has to
be compatible with navive ABI, and so has to have it synced with
kernel as well.

New types are useful to turn ilp32 to handle stat-related syscalls in
generic code. See my answer to Arnd for details.

Yury.


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