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 v7] y2038: Introduce __ASSUME_TIME64_SYSCALLS define


Hi Joseph,

> On Tue, 11 Jun 2019, Lukasz Majewski wrote:
> 
> > Syscall's ABI compatibility checking:
> > 
> > 1. Code to check if syscalls are defined since v3.2 kernel on the
> >    intersection of archs supported by v3.2 kernel and contemporary
> > glibc (SHA1: e6e24243905957c36596f50a22af0acfd83793e2):
> > 
> > (Assumption: syscall ABI change require changing the name - like
> > __NR_epoll_create and __NR_epoll_create1)
> > 
> > export syscalls_table="\
> > 	clock_gettime clock_settime clock_adjtime \
> > 	clock_getres clock_nanosleep timer_gettime \
> > 	timer_settime timerfd_gettime timerfd_settime \
> > 	utimensat pselect6 ppoll io_pgetevents recvmmsg \
> > 	mq_timedsend mq_timedreceive rt_sigtimedwait futex \
> > 	sched_rr_get_interval"
> > 
> > for syscall in ${syscalls_table} ; do echo -n "syscall: ${syscall}
> > -> "; \ grep -rnIw "__NR_${syscall}" | grep ^arch/ | \
> > 	grep -vE
> > "mn10300|avr32|cris|m32r|frv|blackfin|xtensa|h8300|vdso" | \ wc -l;
> > done  
> 
> This is not quite sufficient.  It's possible for a syscall to be
> mentioned in an architecture's asm/unistd.h but not in the actual
> syscall table, for example (or mentioned inside #if 0).
> 
> You do need to check the relevant files for each architecture.  *But*
> only architectures with 64-bit syscall interfaces are relevant,
> because those with 32-bit syscall interfaces won't get
> __ASSUME_TIME64_SYSCALLS defined for kernels before 5.1 anyway.  So
> it doesn't matter whether a syscall was present for arm or m68k, for
> example.

Thanks for clarification.

> 
> (For example: before 3.15, microblaze didn't have pselect6 in its
> syscall table, though it had it in asm/unistd.h.  But there's no
> reason to exclude pselect6 from this patch, because microblaze is a
> 32-bit architecture, and all 64-bit architectures / syscall ABIs had
> that syscall already in 3.2.)

Ok.

> 
> So you care about (glibc architecture names): aarch64 alpha ia64 mips
> (n64 and n32 syscall ABIs) powerpc (64-bit syscall ABI) riscv (64-bit
> syscall ABI) s390 (64-bit syscall ABI) sparc (64-bit syscall ABI)
> x86_64 (classic and x32 syscall ABIs).  The 64-bit versions of hppa
> and sh are not relevant because they aren't supported by glibc.

Thanks for listing them.

> 
> > 	- 32 bit: nios2, csky, hppa (is the same as parisc?) - no
> > need to  
> 
> Yes, hppa is called parisc in the Linux kernel.  There are a few such 
> cases where the names are different (e.g. the Linux kernel uses
> "arm64" as the name for aarch64).
> 

If I may ask - do I need to further fix/re-word in-patch comment and
patch description?

Is it precise and semantically correct?


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

Attachment: pgpAKzEWXM6uT.pgp
Description: OpenPGP digital signature


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