about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h
Commit message (Collapse)AuthorAgeFilesLines
* sysvipc: Set ipc_perm mode as mode_t (BZ#18231)Adhemerval Zanella2019-10-101-54/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch sets the mode field in ipc_perm as mode_t for all architectures, as POSIX specification [1]. The changes required are as follow: 1. It moves the ipc_perm definition out of ipc.h to its own header ipc_perm.h. It also allows consolidate the IPC_* definition on only one header. 2. The generic implementation follow the kernel ipc64_perm size so the syscall can be made directly without temporary buffer copy. However, since glibc defines the MODE field as mode_t, it omits the __PAD1 field (since glibc does not export mode_t as 16-bit for any architecture). It is a two-fold improvement: 2.1. New implementation which follow Linux UAPI will not need to provide an arch-specific ipc-perm.h header neither wrongly use the wrong 16-bit definition from previous default ipc.h (as csky did). 2.1. It allows consolidate ipc_perm definition for architectures that already provide mode_t as 32-bit. 3. All kernel ABIs for the supported architectures already provides the expected padding for mode type extension to 32-bit. However, some architectures the padding has the wrong placement, so it requires the ipc control routines (msgctl, semctl, and shmctl) to adjust the mode field accordingly. Currently they are armeb, microblaze, m68k, s390, and sheb. A new assume is added, __ASSUME_SYSVIPC_BROKEN_MODE_T, which the required ABIs define. 4. For the ABIs that define __ASSUME_SYSVIPC_BROKEN_MODE_T, it also require compat symbols that do not adjust the mode field. Checked on arm-linux-gnueabihf, aarch64-linux-gnu, powerpc64le-linux-gnu, and x86_64-linux-gnu. I also checked the sysvipc tests on hppa-linux-gnu, sh4-linux-gnu, s390x-linux-gnu, and s390-linux-gnu. I also did a sanity test against armeb qemu usermode for the sysvipc tests. [BZ #18231] * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add bits/ipc-perm.h. * sysdeps/unix/sysv/linux/aarch64/bits/ipc.h: Remove file. * sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/hppa/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/ia64/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/arm/kernel-features.h [__BYTE_ORDER == __BIG_ENDIAN] (__ASSUME_SYSVIPC_BROKEN_MODE_T): Define. * sysdeps/sysv/linux/microblaze/kernel-features.h: Likewise. * sysdeps/unix/sysv/linux/s390/kernel-features.h [!__s390x__] (__ASSUME_SYSVIPC_BROKEN_MODE_T): Define. * sysdeps/unix/sysv/linux/sh/kernel-features.h (__ASSUME_SYSVIPC_BROKEN_MODE_T): Define. * sysdeps/unix/sysv/linux/m68k/kernel-features.h: Likewise. * sysdeps/unix/sysv/linux/bits/ipc-perm.h: New file. * sysdeps/unix/sysv/linux/powerpc/bits/ipc-perm.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/ipc-perm.h: Likewise. * sysdeps/unix/sysv/linux/bits/ipc.h (ipc_perm): Move to bits/ipc-perm.h. * sysdeps/unix/sysv/linux/hppa/bits/ipc-perm.h: New file. * sysdeps/unix/sysv/linux/kernel-features.h: Add comment about __ASSUME_SYSVIPC_BROKEN_MODE_T semantic. * sysdeps/unix/sysv/linux/msgctl.c (DEFAULT_VERSION): Define as 2.31 if __ASSUME_SYSVIPC_BROKEN_MODE_T is defined. (msgctl_syscall, __msgctl_mode16): New symbol. (__new_msgctl): Add bits for __ASSUME_SYSVIPC_BROKEN_MODE_T. * sysdeps/unix/sysv/linux/semctl.c: Likewise. * sysdeps/unix/sysv/linux/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/arm/be/libc.abilist (GLIBC_2.31): Add msgctl, semctl, and shmctl. * sysdeps/sysv/linux/microblaze/be/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/be/libc.abilist: Likewise. * conform/data/sys/ipc.h-data: Only xfail {struct ipc_perm} mode_t mode for Hurd. * sysdeps/unix/sysv/linux/m68k/Versions (libc) [GLIBC_2.31]: Add msgctl, semctl, and shmctl. * sysdeps/unix/sysv/linux/arm/be/Versions: New file. * sysdeps/unix/sysv/linux/microblaze/be/Versions: Likewise. * sysdeps/unix/sysv/linux/sh/be/Versions: Likewise. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_ipc.h.html
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Cleanup ppc bits/ipc.hPaul E. Murphy2016-01-251-24/+0
| | | | | Ages ago (commit e9dcb08) the ipc syscalls were inlined and eventually abstracted away any need for direct __ipc calls.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Use __glibc_reserved instead __unused.Ondřej Bílka2013-11-261-2/+2
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* * README.template: Minimum Linux kernel for powerpc64 is 2.4.19.Roland McGrath2002-10-021-5/+5
| | | | | | * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h (struct ipc_perm): Use __uint32_t and __uint64_t for __seq, __pad1, __unused[12] fields so they are consistent between PPC32 and PPC64.
* Update to LGPL v2.1.Andreas Jaeger2001-07-061-8/+8
| | | | | | | | | | | | | | 2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
* Update.Ulrich Drepper2000-09-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * sysdeps/unix/sysv/linux/kernel-features.h: Add __ASSUME_IPC64, only define it for powerpc for kernel >= 2.4.0. * sysdeps/unix/sysv/linux/msgctl.c: Test for __ASSUME_IPC64, not __ASSUME_32BITUIDS. * sysdeps/unix/sysv/linux/semctl.c: Likewise. * sysdeps/unix/sysv/linux/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Sync with kernel. * sysdeps/unix/sysv/linux/powerpc/bits/msq.h: New file. * sysdeps/unix/sysv/linux/powerpc/bits/sem.h: New file. * sysdeps/unix/sysv/linux/powerpc/bits/shm.h: New file. 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com> * sysdeps/s390/atomicity.h: Fix compare_and_swap. * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (F_GETLK64,F_SETLK64,F_SETLKW64): Use values from 2.4.0-test8. 2000-09-28 Denis Joseph Barrow <djbarrow@de.ibm.com> * sysdeps/unix/sysv/linux/s390/sys/procfs.h: Use definitions from ucontext.h. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Fix ucontext structure. 2000-09-27 Andreas Schwab <schwab@suse.de> * math/Makefile (distribute): Explicitly add the long double test sources, to get them included even if long double is not supported. 2000-09-27 Jes Sorensen <jes@linuxcare.com> * elf/soinit.c (struct object): Move definition to gccframe.h and include it. Problem identified by HJ Lu. * sysdeps/ia64/gccframe.h: New file. ia64 specific version of struct object to be searched for frame unwind info. * sysdeps/generic/gccframe.h: New file. Generic version of struct object to be searched for frame unwind info. 2000-09-28 Ulrich Drepper <drepper@redhat.com> * manual/errno.texi: Correct error text for ENXIO. Reported by Jörg Schilling <schilling@fokus.gmd.de>. 2000-09-27 Jes Sorensen <jes@linuxcare.com> * sysdeps/ia64/fpu/fsetexcptflg.c (fesetexceptflag): Set the exception status bits rather than the exception disable bits. Don't include math.h. * sysdeps/ia64/fpu/fgetexcptflg.c (fegetexceptflag): Report the status of exceptions currently raised rather than which exceptions are enabled. * sysdeps/ia64/fpu/fclrexcpt.c (feclearexcept): Typecase to fenv_t rather than unsigned long int. * sysdeps/ia64/fpu/fedisblxcpt.c (fedisableexcept): Only disable the exceptions actually requested by the caller and not just disable all exceptions. * sysdeps/ia64/fpu/feenablxcpt.c (feenableexcept): Exceptions on the ia64 are enabled by clearing the respective bits in the fpsr, not setting them. * sysdeps/ia64/bits/fenv.h: typedef fexcept_t and fenv_t to unsigned long int rather than unsigned long to be consistent with the coding conventions. 2000-09-20 H.J. Lu <hjl@gnu.org> * sysdeps/ia64/fpu/fesetenv.c (fesetenv): Use fenv_t instead of unsigned long int. * sysdeps/ia64/fpu/fesetround.c (fesetround): Likewise. 2000-09-28 Ulrich Drepper <drepper@redhat.com> * string/bits/string2.h: Unify #if usage. 2000-09-27 Jakub Jelinek <jakub@redhat.com> * math/test-fenv.c (feexcp_mask_test): If enabling all exceptions and disabling underflow or overflow, disable inexact as well. * sysdeps/gnu/netinet/tcp.h: Add tcp_info defines and types.
* Update.Andreas Jaeger2000-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * csu/munch-tmpl.c (__libc_init): Remove K&R support. * dirent/scandir64.c: Likewise. * pwd/getpw.c: Likewise. * stdlib/bsearch.c (bsearch): Likewise. * stdlib/tst-strtoll.c: Likewise. * localedata/collate-test.c: Likewise. * localedata/xfrm-test.c: Likewise. * posix/bsd-getpgrp.c: Likewise. * sysdeps/alpha/fpu/bits/fenv.h: Likewise. * sysdeps/generic/bits/siginfo.h: Likewise. * sysdeps/generic/bits/sockaddr.h: Likewise. * sysdeps/generic/sys/swap.h: Likewise. * sysdeps/generic/sys/sysinfo.h: Likewise. * sysdeps/generic/vfork.c: Likewise. * sysdeps/m68k/fpu/switch/68881-sw.h: Likewise. * sysdeps/mach/hurd/fdopen.c: Likewise. * sysdeps/unix/sysv/linux/alpha/sys/acct.h: Likewise. * sysdeps/unix/sysv/linux/poll.c: Likewise. * sysdeps/unix/sysv/linux/readv.c: Likewise. * sysdeps/unix/sysv/linux/writev.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise. * misc/tst-dirname.c: Remove K&R support, use ANSI C prototypes. * shadow/lckpwdf.c: Likewise. * stdlib/tst-strtol.c: Likewise. * sysdeps/generic/tcsetattr.c: Likewise. * sysdeps/unix/sysv/linux/ttyname.c: Likewise. * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.
* Update.Ulrich Drepper2000-02-251-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-25 Ulrich Drepper <drepper@redhat.com> * conform/conformtest.pl (@headers): Add "sys/msg.h", "sys/mman.h", "sys/ipc.h", "syslog.h", and "stropts.h". Handle / in header names correctly. * conform/data/stropts.h-data: New file. * conform/data/syslog.h-data: New file. * conform/data/sys/ipc.h-data: New file. * conform/data/sys/mman.h-data: New file. * conform/data/sys/msg.h-data: New file. * misc/sys/mman.h: Define off_t and mode_t if not already done. * streams/stropts.h: Define gid_t and uid_t if not already done. * sysdeps/gnu/bits/ipc.h (IPC_INFO): Only define if __USE_GNU. * sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/ipc.h: Likewise. * sysvipc/sys/msg.h: Don't include sys/types.h. Define time_t, pid_t, and ssize_t if not already done. (struct msgbuf): Define only if __USE_GNU. * sysdeps/generic/bits/msq.h: Include bits/types.h, not sys/types.h. (MSG_EXCEPT): Only define if __USE_GNU. Define msgqnum_t and msglen_t and use them in struct msqid_ds definition. * sysdeps/gnu/bits/msq.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/msq.h: Likewise. * sysdeps/unix/sysv/linux/bits/msq.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/msq.h: Likewise. * sysdeps/generic/bits/stropts.h (I_GWROPT): Renamed from I_GWRSET. (FLUSHBAND): Only define is __USE_GNU. (RPROTMASK): Likewise. (SNDPIPE): Likewise. (MUXID_ALL): Likewise. (struct strrecvfd): Rename fill to __fill.
* Update.Ulrich Drepper1999-08-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-08-18 Ulrich Drepper <drepper@cygnus.com> * Rules: When generating stdio_lim.h also rewrite IOV_MAX definition. * stdio-common/stdio_lim.h.in: Add IOV_MAX template. * include/bits/xopen_lim.h: Don't define IOV_MAX here, get it from stdio_lim.h. Define LONG_BIT and WORD_BIT. * include/features.h: Define __USE_XOPEN2K if _XOPEN_SOURCE == 600. * libio/stdio.h: Don't declare cuserid and getopt for X/Open issue 6. * misc/search.h: Don't define NULL. * posix/sys/types.h: Define blksize_t if it hasn't happened. Only define key_t and blkcnt_t if it hasn't happened before. Define blksize_t if not happened before. * io/sys/stat.h: Don't define pid_t. Define blkcnt_t and blksize_t. * sysdeps/generic/bits/types.h: Define __blksize_t. * sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/types.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/bits/types.h: Likewise. * sysdeps/mach/hurd/bits/stat.h (struct stat): Use __blksize_t for st_blksize member. (struct stat64): Likewise. * sysdeps/unix/bsd/bits/stat.h: Likewise. * sysdeps/unix/bsd/osf/alpha/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/i386/bist/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h: Likewise. * stdlib/getsubopt.c: Correct type of second argument. * stdlib/stdlib.h: Likewise. * stdlib/monetary.h: Don't include sys/types.h. Define only size_t and ssize_t. * sysdeps/generic/putenv.c: Correct type of parameter. * stdlib/stdlib.h: Likewise. * sysdeps/generic/msgsnd.c: Correct type of second parameter. * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. * sysvips/sys/msg.h: Likewise. * sysdeps/generic/semop.c: Correct type of third parameter. * sysdeps/unix/sysv/linux/semop.c: Likewise. * sysvipc/sys/sem.h: Likewise. Don't include sys/types.h, define size_t. * sysdeps/generic/shmget.c: Correct type of second parameter. * sysdeps/unix/sysv/linux/shmget.c: Likewise. * sysvips/sys/shm.h: Likewise. Don't include unistd.h and sys/types.h. Declare __getpagesize here. * sysdeps/generic/bits/ipc.h: Include bits/types.h instead of sys/types.h. * sysdeps/gnu/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Likewise. * sysvipc/sys/ipc.h: Define uid_t, gid_t, mode_t, and key_t if not already done. * sysdeps/unix/bsd/usleep.c: Correct type of parameter. * debug/versions: Export __cyg_profile_func_enter and __cyg_profile_func_exit. * math/bits/mathcalls.h: Pretty print.
* Update.Ulrich Drepper1998-09-291-0/+72
1998-09-27 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: New file, use correct struct ipc_perm definition.