This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v2 00/14] Remove sysdep-cancel assembly macro
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Thu, 3 Aug 2017 10:11:00 -0300
- Subject: [PATCH v2 00/14] Remove sysdep-cancel assembly macro
- Authentication-results: sourceware.org; auth=none
Change from previous version [1]
* Optimize the loader build for open, read, write, openat, and close
calls to alias the default variant to no cancel one since for rtld
object they are essentially the same (SYSCALL_CANCEL ends up
always calling INLINE_SYSCALL_CALL).
* Use the same convention for no status variant (for instance
__close_nocancel_nostatus) and change its return to void.
* Cleanup non cancellable pause sligt more: removed __pause_nocancel
declaration from unistd (since it is now declared on not-errno.h
header) and removed generic implementation (since the header routes
to default implementation).
* Removed the unrequired alias for no cancel sigsuspend on hurd.
---
This patchset finishes my previous work of Linux syscall consolidation
and refactor to finally remove the requeriment of sysdeps-cancel.h
assembly macros for cancellable syscalls. All ports now uses the
SYSCALL_CANCEL macros with C implementation which in turn calls
INLINE_SYSCALL macros.
Besides simplify the curent code requirement, it also simplify
possible future ports to require only the C bindings and the direct
assembly one for syscalls.list autogeneration (another possible
work for future would be to use C generate binding to simplify
even further the syscall requirements).
I checked with a build for mostly supported architecture:
aarch64-linux-gnu, alpha-linux-gnu, arm-linux-gnueabhi, i686-linux-gnu,
ia64-linux-gnu, m68k-linux-gnu, microblaze-linux-gnu,
mips{64,64n32}-linux-gnu, nios2-linux-gnu, powerpc{64,64le}-linux-gnu,
s390{x}-linux-gnu, sh4-linux-gnu{-soft}, tile{pro,gx}-linux-gnu{-32},
sparc{v9,64}-linux-gnu, and x86_64-linux-gnu.
I also run a full make check on real hardware on aarch64-linux-gnu,
arm-linux-gnueabihf, i686-linux-gnu, powerpc{64le}-linux-gnu,
sparc{v9,64}-linux-gnu, and x86_64-linux-gnu{-x32}.
[1] https://sourceware.org/ml/libc-alpha/2017-07/msg00105.html
Adhemerval Zanella (14):
Consolidate non cancellable open call
Consolidate non cancellable read call
Consolidate non cancellable write call
Consolidate non cancellable openat call
Consolidate non cancellable close call
Consolidate non cancellable writev call
Consolidate non cancellable fcntl call
Consolidate non cancellable waitpid call
Consolidate non cancellable pause call
Consolidate non cancellable nanosleep call
Remove non cancellable sigsuspend definition
Fix {INLINE,INTERNAL}_SYSCALL macros for x32
Remove p{read,write}{v} and fallocate from x86 auto-generation list
Remove cancellation support for syscall generation
ChangeLog | 462 +++++++++++++++++++++
catgets/open_catalog.c | 8 +-
csu/check_fds.c | 2 +-
gmon/gmon.c | 22 +-
iconv/gconv_cache.c | 6 +-
include/unistd.h | 2 -
intl/loadmsgcat.c | 6 +-
io/ftw.c | 8 +-
libio/fileops.c | 12 +-
libio/iopopen.c | 4 +-
locale/loadarchive.c | 12 +-
locale/loadlocale.c | 12 +-
login/utmp_file.c | 30 +-
misc/daemon.c | 6 +-
nptl/pthread_mutex_lock.c | 2 +-
nptl/pthread_mutex_timedlock.c | 2 +-
nscd/nscd_getai.c | 2 +-
nscd/nscd_getgr_r.c | 2 +-
nscd/nscd_gethst_r.c | 2 +-
nscd/nscd_getpw_r.c | 2 +-
nscd/nscd_getserv_r.c | 2 +-
nscd/nscd_helper.c | 4 +-
nscd/nscd_initgroups.c | 2 +-
nscd/nscd_netgroup.c | 4 +-
nss/nss_db/db-open.c | 4 +-
resolv/herror.c | 2 +-
resolv/res-close.c | 4 +-
stdio-common/psiginfo.c | 2 +-
sunrpc/pm_getmaps.c | 2 +-
sysdeps/generic/not-cancel.h | 40 +-
sysdeps/mach/hurd/opendir.c | 4 +-
sysdeps/mach/hurd/sigsuspend.c | 1 -
sysdeps/posix/closedir.c | 2 +-
sysdeps/posix/getaddrinfo.c | 4 +-
sysdeps/posix/getcwd.c | 8 +-
sysdeps/posix/libc_fatal.c | 2 +-
sysdeps/posix/opendir.c | 12 +-
sysdeps/posix/pause.c | 15 -
sysdeps/posix/spawni.c | 11 +-
sysdeps/unix/make-syscalls.sh | 4 -
sysdeps/unix/syscall-template.S | 7 +-
sysdeps/unix/sysv/linux/Versions | 2 +
sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h | 87 +---
sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h | 131 +-----
sysdeps/unix/sysv/linux/arm/sysdep-cancel.h | 197 +--------
sysdeps/unix/sysv/linux/check_native.c | 2 +-
sysdeps/unix/sysv/linux/check_pf.c | 2 +-
sysdeps/unix/sysv/linux/close.c | 12 +
sysdeps/unix/sysv/linux/fips-private.h | 6 +-
sysdeps/unix/sysv/linux/gethostid.c | 12 +-
sysdeps/unix/sysv/linux/getloadavg.c | 6 +-
sysdeps/unix/sysv/linux/getlogin_r.c | 6 +-
sysdeps/unix/sysv/linux/getsysstats.c | 16 +-
sysdeps/unix/sysv/linux/grantpt.c | 6 +-
sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h | 225 +---------
sysdeps/unix/sysv/linux/i386/smp.h | 6 +-
sysdeps/unix/sysv/linux/i386/sysdep-cancel.h | 119 +-----
sysdeps/unix/sysv/linux/ia64/has_cpuclock.c | 6 +-
sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h | 194 +--------
sysdeps/unix/sysv/linux/if_index.c | 6 +-
sysdeps/unix/sysv/linux/libc_fatal.c | 10 +-
sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h | 108 +----
sysdeps/unix/sysv/linux/malloc-sysdep.h | 8 +-
sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h | 116 +-----
.../unix/sysv/linux/mips/mips64/sysdep-cancel.h | 249 -----------
sysdeps/unix/sysv/linux/mips/sysdep-cancel.h | 159 +------
sysdeps/unix/sysv/linux/mq_notify.c | 2 +-
sysdeps/unix/sysv/linux/nanosleep.c | 9 +
sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h | 110 +----
sysdeps/unix/sysv/linux/not-cancel.h | 118 +++---
sysdeps/unix/sysv/linux/open.c | 21 +
sysdeps/unix/sysv/linux/open64.c | 38 +-
sysdeps/unix/sysv/linux/openat.c | 20 +
sysdeps/unix/sysv/linux/openat64.c | 36 +-
sysdeps/unix/sysv/linux/pause.c | 14 +-
sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c | 2 +-
.../sysv/linux/powerpc/powerpc32/sysdep-cancel.h | 118 ------
.../sysv/linux/powerpc/powerpc64/sysdep-cancel.h | 147 -------
sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h | 38 ++
sysdeps/unix/sysv/linux/pthread_getname.c | 6 +-
sysdeps/unix/sysv/linux/pthread_setname.c | 6 +-
sysdeps/unix/sysv/linux/read.c | 12 +
.../unix/sysv/linux/s390/s390-32/sysdep-cancel.h | 105 +----
.../unix/sysv/linux/s390/s390-64/sysdep-cancel.h | 109 +----
sysdeps/unix/sysv/linux/sh/sysdep-cancel.h | 136 +-----
.../unix/sysv/linux/sparc/sparc32/sysdep-cancel.h | 111 -----
.../unix/sysv/linux/sparc/sparc64/sysdep-cancel.h | 109 -----
sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h | 38 ++
sysdeps/unix/sysv/linux/spawni.c | 8 +-
sysdeps/unix/sysv/linux/sysconf.c | 6 +-
sysdeps/unix/sysv/linux/tile/sysdep-cancel.h | 123 +-----
sysdeps/unix/sysv/linux/waitpid.c | 15 +-
sysdeps/unix/sysv/linux/write.c | 12 +
sysdeps/unix/sysv/linux/x86_64/syscalls.list | 4 -
sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h | 62 +--
sysdeps/unix/sysv/linux/x86_64/sysdep.h | 251 ++++++-----
sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list | 1 -
sysdeps/unix/sysv/linux/x86_64/x32/times.c | 24 +-
98 files changed, 1156 insertions(+), 3086 deletions(-)
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
delete mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
delete mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
create mode 100644 sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h
delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
create mode 100644 sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h
--
2.7.4