diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc')
5 files changed, 40 insertions, 29 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c b/sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c index 1218f9dae0..673aecf885 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c @@ -19,19 +19,20 @@ #include <errno.h> #include <unistd.h> +#include <sys/mman.h> #include <sysdep.h> #include <sys/syscall.h> - -#include <sys/mman.h> +#include <bp-checks.h> #include "kernel-features.h" #ifdef __NR_mmap2 -extern __ptr_t __syscall_mmap2(__ptr_t, size_t, int, int, int, off_t); -#ifndef __ASSUME_MMAP2_SYSCALL +extern void *__unbounded __syscall_mmap2 (void *__unbounded, size_t, + int, int, int, off_t); +# ifndef __ASSUME_MMAP2_SYSCALL static int have_no_mmap2; -#endif +# endif #endif __ptr_t @@ -39,28 +40,32 @@ __mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd, off64_t offset) { #ifdef __NR_mmap2 if ( -#ifndef __ASSUME_MMAP2_SYSCALL +# ifndef __ASSUME_MMAP2_SYSCALL ! have_no_mmap2 && -#endif +# endif ! (offset & 4095)) { -#ifndef __ASSUME_MMAP2_SYSCALL +# ifndef __ASSUME_MMAP2_SYSCALL int saved_errno = errno; -#endif +# endif /* This will be always 12, no matter what page size is. */ - __ptr_t result = - (__ptr_t) INLINE_SYSCALL (mmap2, 6, addr, len, prot, flags, - fd, (off_t) (offset >> 12)); - -#ifndef __ASSUME_MMAP2_SYSCALL + __ptr_t result; + __ptrvalue (result) = + (void *__unbounded) INLINE_SYSCALL (mmap2, 6, addr, len, prot, flags, + fd, (off_t) (offset >> 12)); +# if __BOUNDED_POINTERS__ + __ptrlow (result) = __ptrvalue (result); + __ptrhigh (result) = __ptrvalue (result) + len; +# endif +# ifndef __ASSUME_MMAP2_SYSCALL if (result != (__ptr_t) -1 || errno != ENOSYS) -#endif +# endif return result; -#ifndef __ASSUME_MMAP2_SYSCALL +# ifndef __ASSUME_MMAP2_SYSCALL __set_errno (saved_errno); have_no_mmap2 = 1; -#endif +# endif } #endif if (offset != (off_t) offset || (offset + len) != (off_t) (offset + len)) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c index 3fba97fd51..86b6e55f77 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c @@ -24,6 +24,7 @@ #include <sysdep.h> #include <sys/signal.h> #include <errno.h> + #include <kernel_sigaction.h> /* SPARC 64bit userland requires a kernel that has rt signals anyway. */ @@ -48,8 +49,9 @@ __libc_sigaction (int sig, __const struct sigaction *act, /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ - ret = INLINE_SYSCALL (rt_sigaction, 5, sig, act ? &kact : 0, - oact ? &koact : 0, stub, _NSIG / 8); + ret = INLINE_SYSCALL (rt_sigaction, 5, sig, + act ? __ptrvalue (&kact) : 0, + oact ? __ptrvalue (&koact) : 0, stub, _NSIG / 8); if (oact && ret >= 0) { diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c index 45ed655b8c..38fab1ccc0 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,8 +22,9 @@ #include <sysdep.h> #include <sys/syscall.h> +#include <bp-checks.h> -extern int __syscall_rt_sigpending (sigset_t *, size_t); +extern int __syscall_rt_sigpending (sigset_t *__unbounded, size_t); /* Change the set of blocked signals to SET, @@ -34,5 +35,5 @@ sigpending (set) { /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ - return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8); + return INLINE_SYSCALL (rt_sigpending, 2, CHECK_SIGSET (set), _NSIG / 8); } diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c index dc3634bfa0..cb0b275f1c 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,9 +22,10 @@ #include <sysdep.h> #include <sys/syscall.h> +#include <bp-checks.h> -extern int __syscall_rt_sigprocmask (int, const sigset_t *, sigset_t *, - size_t); +extern int __syscall_rt_sigprocmask (int, const sigset_t *__unbounded, + sigset_t *__unbounded, size_t); /* Get and/or change the set of blocked signals. */ int @@ -35,6 +36,7 @@ __sigprocmask (how, set, oset) { /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ - return INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8); + return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set), + CHECK_SIGSETopt (oset), _NSIG / 8); } weak_alias (__sigprocmask, sigprocmask) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c index 9294662dc9..184a6ed72f 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,8 +22,9 @@ #include <sysdep.h> #include <sys/syscall.h> +#include <bp-checks.h> -extern int __syscall_rt_sigsuspend (const sigset_t *, size_t); +extern int __syscall_rt_sigsuspend (const sigset_t *__unbounded, size_t); /* Change the set of blocked signals to SET, wait until a signal arrives, and restore the set of blocked signals. */ @@ -33,6 +34,6 @@ __sigsuspend (set) { /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ - return INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8); + return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8); } weak_alias (__sigsuspend, sigsuspend) |