public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] posix: Execute file function fixes
@ 2016-02-01 16:21 Adhemerval Zanella
  2016-02-01 16:21 ` [PATCH v4 2/3] posix: execvpe cleanup Adhemerval Zanella
                   ` (2 more replies)
  0 siblings, 3 replies; 45+ messages in thread
From: Adhemerval Zanella @ 2016-02-01 16:21 UTC (permalink / raw)
  To: libc-alpha

Hi,

This patchset add some cleanup and fixes for the exec{l,le,lp,vpe}
general function implementation and fixes long standing bugs for
posix_spawn{p} on Linux.  It is basically my previous 2 patchset
for execvpe and posix_spawn{p} along with the execl{e,p} fixes.

For exe{l,le,lp,vpe} function main difference is using stack allocation
instead of dynamic one for argument handling.  The main difference from
previous patch iteration is it does not add any memory stack allocation
constraints due:

1. Current GLIBC logic to limit stack allocation through __MAX_ALLOCA_CUTOFF
   is arbitrary and does no impose any limit (it does not consider current
   stack size neither stack size limit).

2. Memory allocation constraints associated with the functions make
   stack allocation the only sane option.  All exec function family are
   defined to be async-safe, where they can be called either through a
   signal handler or in vfork child, and they can not really on dynamic
   memory allocation (either through malloc or directly by mmap).

The posix_spawn{p} is a new implementation for Linux which aims to
fix some long-standing bug regarding signal handling.  It also
tries to avoid dynamic memory allocation by either relying on the
exec{l,vpe} functions with a dynamic mmap memory region allocate
to use along with direct created child (using clone syscall).


Adhemerval Zanella (3):
  posix: Remove dynamic memory allocation from execl{e,p}
  posix: execvpe cleanup
  posix: New Linux posix_spawn{p} implementation

 include/sched.h                                   |   2 +
 include/unistd.h                                  |   1 +
 posix/Makefile                                    |   5 +-
 posix/execl.c                                     |  65 +---
 posix/execle.c                                    |  66 +---
 posix/execlp.c                                    |  64 +---
 posix/execvpe.c                                   | 238 +++++-------
 posix/tst-execvp1.c                               |   6 +-
 posix/tst-execvp2.c                               |   5 +-
 posix/tst-execvp3.c                               |   5 +-
 posix/tst-execvp4.c                               |   6 +-
 posix/tst-execvpe1.c                              |  20 +
 posix/tst-execvpe2.c                              |  20 +
 posix/tst-execvpe3.c                              |  20 +
 posix/tst-execvpe4.c                              |  20 +
 posix/tst-execvpe5.c                              | 130 +++++++
 posix/tst-execvpe6.c                              |  82 +++++
 posix/tst-spawn2.c                                |  73 ++++
 sysdeps/posix/dup.c                               |   2 +-
 sysdeps/unix/sysv/linux/aarch64/clone.S           |   1 +
 sysdeps/unix/sysv/linux/alpha/clone.S             |   1 +
 sysdeps/unix/sysv/linux/arm/clone.S               |   1 +
 sysdeps/unix/sysv/linux/hppa/clone.S              |   1 +
 sysdeps/unix/sysv/linux/i386/clone.S              |   1 +
 sysdeps/unix/sysv/linux/ia64/clone2.S             |   2 +
 sysdeps/unix/sysv/linux/m68k/clone.S              |   1 +
 sysdeps/unix/sysv/linux/microblaze/clone.S        |   1 +
 sysdeps/unix/sysv/linux/mips/clone.S              |   1 +
 sysdeps/unix/sysv/linux/nios2/clone.S             |   1 +
 sysdeps/unix/sysv/linux/nptl-signals.h            |  10 +
 sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S |   1 +
 sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S |   1 +
 sysdeps/unix/sysv/linux/s390/s390-32/clone.S      |   2 +
 sysdeps/unix/sysv/linux/s390/s390-64/clone.S      |   2 +
 sysdeps/unix/sysv/linux/sh/clone.S                |   1 +
 sysdeps/unix/sysv/linux/sparc/sparc32/clone.S     |   1 +
 sysdeps/unix/sysv/linux/sparc/sparc64/clone.S     |   1 +
 sysdeps/unix/sysv/linux/spawni.c                  | 424 ++++++++++++++++++++++
 sysdeps/unix/sysv/linux/tile/clone.S              |   1 +
 sysdeps/unix/sysv/linux/x86_64/clone.S            |   1 +
 41 files changed, 1055 insertions(+), 285 deletions(-)
 create mode 100644 posix/tst-execvpe1.c
 create mode 100644 posix/tst-execvpe2.c
 create mode 100644 posix/tst-execvpe3.c
 create mode 100644 posix/tst-execvpe4.c
 create mode 100644 posix/tst-execvpe5.c
 create mode 100644 posix/tst-execvpe6.c
 create mode 100644 posix/tst-spawn2.c
 create mode 100644 sysdeps/unix/sysv/linux/spawni.c

-- 
1.9.1

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2016-10-06 12:52 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 16:21 [PATCH 0/3] posix: Execute file function fixes Adhemerval Zanella
2016-02-01 16:21 ` [PATCH v4 2/3] posix: execvpe cleanup Adhemerval Zanella
2016-02-01 16:21 ` [PATCH v2 1/3] posix: Remove dynamic memory allocation from execl{e,p} Adhemerval Zanella
2016-02-01 16:52   ` Joseph Myers
2016-02-01 17:18     ` Adhemerval Zanella
2016-02-01 17:54       ` Joseph Myers
2016-02-01 18:09         ` Adhemerval Zanella
2016-02-02 11:24       ` Florian Weimer
2016-02-02 12:46         ` Szabolcs Nagy
2016-02-02 12:47         ` Adhemerval Zanella
2016-02-02 16:33     ` Rich Felker
2016-02-07 21:28       ` Rasmus Villemoes
2016-02-09 11:36         ` Richard Henderson
2016-02-09 13:30           ` Szabolcs Nagy
2016-02-10 16:36             ` Adhemerval Zanella
2016-02-01 16:21 ` [PATCH v2 3/3] posix: New Linux posix_spawn{p} implementation Adhemerval Zanella
2016-02-02 13:06   ` Florian Weimer
2016-02-02 13:31     ` Adhemerval Zanella
2016-02-03 11:07       ` Torvald Riegel
2016-02-03 12:05         ` Adhemerval Zanella
2016-02-03 12:06           ` Torvald Riegel
2016-02-03 12:14             ` Adhemerval Zanella
2016-08-31 21:13   ` Rasmus Villemoes
2016-08-31 22:08     ` Joseph Myers
2016-09-01  9:28       ` Rasmus Villemoes
2016-09-14 13:13         ` Adhemerval Zanella
2016-09-14 18:58           ` Rasmus Villemoes
2016-09-14 19:59             ` Adhemerval Zanella
2016-09-20 20:25         ` Florian Weimer
2016-09-20 20:54           ` Rasmus Villemoes
2016-09-20 21:01           ` [PATCH] linux: spawni.c: simplify error reporting to parent Rasmus Villemoes
2016-09-22 20:54             ` Adhemerval Zanella
2016-09-23  5:21             ` Florian Weimer
2016-09-23 19:09               ` Rasmus Villemoes
2016-09-23 19:28                 ` Adhemerval Zanella
2016-09-23 20:37                   ` Florian Weimer
2016-09-27 20:26                     ` Rasmus Villemoes
2016-09-27 21:14                       ` Adhemerval Zanella
2016-09-28 14:14             ` Rich Felker
2016-09-28 15:03               ` Andreas Schwab
2016-09-28 15:22                 ` Rich Felker
2016-09-28 18:13                   ` Adhemerval Zanella
2016-10-06 12:52                     ` Florian Weimer
2016-09-06 20:43     ` [PATCH v2 3/3] posix: New Linux posix_spawn{p} implementation Rasmus Villemoes
2016-09-14 19:37     ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).