Age | Commit message (Collapse) | Author |
|
eventfd: evntfd assumes to take two arguments instead it
should be one evntfd expects two therefore implement both syscalls with
correct parameters
Thanks Eugene Rudoy for reporting it and also providing the patch
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
$a0 is saved across _dl_runtime_resolve(); $v0 is not. Unfortunately,
__syscall_error() uses $v0 for its argument, not $a0 as is the MIPS ABI
standard. This means that if lazy binding was used for __syscall_error(),
the errno value in $v0 could get corrupted.
The problem can be easily seen in testcases where syscalls in librt fail;
when librt tries to call __syscall_error() in libc, the argument gets
lost and errno gets set to a bogus value:
# ./tst-mqueue1 ; echo $?
mq_receive on O_WRONLY mqd_t did not fail with EBADF: Unknown error 2004684208
1
# ./tst-mqueue2 ; echo $?
mq_timedreceive with too small msg_len did not fail with EMSGSIZE: Unknown error 1997360560
1
# ./tst-mqueue4 ; echo $?
mq_timedsend did not fail with ETIMEDOUT: Unknown error 2008747440
1
When _dl_runtime_resolve() was taken out of the equation, the same test
cases passed:
# LD_BIND_NOW=y ./tst-mqueue1 ; echo $?
0
# LD_BIND_NOW=y ./tst-mqueue2 ; echo $?
0
# LD_BIND_NOW=y ./tst-mqueue4 ; echo $?
0
Changing __syscall_error() to look at $a0 instead of $v0 fixed the
problem.
(Note that there is also a "__syscall_error.c" file which presumably
uses the standard C calling conventions, but I do not think it is used
on MIPS.)
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Some callers passed the first argument in $v0, while others used $a0.
Change the callers to use $a0 consistently.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Linux has provided these functions since the 2.1.x era, so no need to
keep these around. We'd rather find out when things are missing (and
fix that) than fall back to the unsafe hacks.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Some arches got this fix, but many did not. So copy the ifdef logic to
the ones that missed it to fix behavior in linux-2.6+.
URL: https://bugs.busybox.net/show_bug.cgi?id=5258
Reported-by: David Laight <david.laight@aculab.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Fix the implementation of mmap based on the mmap2 system call, to
construct pgoffset from offset with an unsigned shift rather than a
signed (off_t) shift. The mmap2 test in the testsuite catches this case
by mmap'ing with a large offset (with the sign bit set). The signed
shift repeats the sign bit making the page shift way out of range. This
is already fixed similarly in mmap64().
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Since glibc has split out arch-specific stuff to bits/epoll.h, we can
pull that sanity back into our tree and drop the arch ifdefs.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Older kernels use __NR__llseek for a 64-bit lseek syscall. Newer
kernels use __NR_llseek. This patch fixes the implementation of
lseek64 to use the __NR_llseek syscall if it exists.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The test for generating a stub for getpgrp was wrong and would
result in duplicate symbols when building without __NR_getpgrp,
but with __NR_getpgid and __NR_getpid.
A closer look at the getpgrp implementation using getpgid showed
that getpid was being called to pass the current pid to getpgid.
This is unnecessary because passing 0 to getpgid returns the
pgid of the current process.
This patch cleans up the getpgrp implementation and the stub test.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Some arches check the size in INLINE_SYSCALL() and barf if it's
too big (i.e. a 64bit value getting truncated to 32bit).
Satisfy error-check on ppc32.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Some targets include this implicitly, but pull it in explicitly for those
which don't to fix building for them.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The current code will sometimes cast the offset to an unsigned long.
On 32bit systems, that doesn't make much sense since we always know
that the off64_t type is 64bits. So drop the ifdef logic, cast it
to an unsigned 64bit value, and then do the shift.
If the system is 32bits, and the address is still too large, then
there's really nothing we could do about it anyways, so the extra
ifdef logic wasn't helping.
URL: https://bugs.busybox.net/show_bug.cgi?id=3853
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Otherwise we get:
/tmp/cc14nHjG.s: Assembler messages:
/tmp/cc14nHjG.s: Error: .size expression for _init does not evaluate to a constant
/tmp/cc14nHjG.s: Error: .size expression for _fini does not evaluate to a constant
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
glibc has split off the arch-specific flag definitions (like
SFD_NONBLOCK) into <arch>/bits/signalfd.h, so that there are no longer
multiple redundant copies of the entire header file. We will adopt the
same scheme in uClibc.
Special cases are included for: alpha mips sparc
hppa was omitted because it has not been updated in glibc.
All others use the common definition.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
glibc has split off the arch-specific flag definitions (like
TFD_NONBLOCK) into <arch>/bits/timerfd.h, so that there are no longer
multiple redundant copies of the entire header file. We will adopt the
same scheme in uClibc.
Special cases are included for: alpha mips sparc
hppa was omitted because it has not been updated in glibc.
All others use the common definition.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
glibc has split off the arch-specific flag definitions (like
IN_NONBLOCK) into <arch>/bits/inotify.h, so that there are no longer
multiple redundant copies of the entire header file. We will adopt the
same scheme in uClibc.
Special cases are included for: alpha mips sparc
hppa was omitted because it has not been updated in glibc.
All others use the common definition.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
2009-01-30 Ulrich Drepper <drepper@redhat.com>
[BZ #7040]
* sysdeps/unix/sysv/linux/sys/inotify.h: Second parameter of
inotify_rm_watch should have type int.
This change allows us to copy inotify.h verbatim from glibc into uClibc.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Fixes handling of e.g. splice
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The Linux syscall takes 3 args, not 4. We have to process flags in
userspace ourselves.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
ARM always provides its own userspace funcs for ioperm/iopl.
They've never had syscalls. So disable the stubs on ARM to
avoid multiple definition errors.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
arm/{ioperm.c,iopl.c}"
This reverts commit 3bcd031f97d61a8f732d865a0f4248aed2d191ab.
The arm code is supposed to provide its own userspace ioperm/iopl
functions. They've never had system calls for these funcs.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Future branch extends stubs with ret_enosys_stub.
Resolve conflicts, and use superset of future and current master.
Adjust posix_fadvise* accordingly.
Upon future merge, pick this master version as the final state.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This fixes the following link failure:
LD libuClibc-0.9.33.so
libc/libc_so.a(stubs.os): In function `sync_file_range':
stubs.c:(.text+0x0): multiple definition of `ioperm'
libc/libc_so.a(ioperm.os):ioperm.c:(.text+0x260): first defined here
libc/libc_so.a(stubs.os): In function `sync_file_range':
stubs.c:(.text+0x0): multiple definition of `iopl'
libc/libc_so.a(iopl.os):iopl.c:(.text+0x0): first defined here
collect2: ld returned 1 exit status
make[1]: *** [lib/libc.so] Error 1
Signed-off-by: Jason Woodward <jason.woodward@timesys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
A microblaze-specific sys/user.h is needed for (e.g.) strace,
so use this version from glibc.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
-r is not available on BSD sed so to keep
compatibility avoid using it.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
This is needed for stat'ing loop devices > 255
since otherwise kernel returns EOVERFLOW becasue
it needs st_rdev/st_dev to be larger than 16bits but
in kernel it uses __old_kernel_stat for stat
syscall which has st_rdev/st_dev as unsigned short
Add a testcase
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
use it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Do not pollute libraries with its own implementation of __aeabi_unwind_cpp_pr1 code.
Just add it to uclibc_nonshared.a archive and share it.
This fixes build issue with static linking of application due to multiple symbol
definition in libgcc_eh-a and libpthread.a or librt.a
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
harmless copy'n paste error
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
No code changes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Avoids warning from -Wunused-function about the alias target that is
only used at link-time.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
RTLD_DEEPBIND is not supported in uclibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
The current x86_64 setjmp helpers incur a reloc, so fix that up.
$ readelf -r lib/libc.so.0
...
Relocation section '.rela.plt' at offset 0xb058 contains 10 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000236010 02a400000007 R_X86_64_JUMP_SLO 000000000000b3c4 __sigsetjmp + 0
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Use CROSS_COMPILE instead of CROSS as other projects are doing
(i.e. kernel, busybox, buildroot).
CROSS is still supported for backward compatibility only
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
On several architectures __NR_ulimit syscall number is currently
defined but it is remapped onto sys_ni_syscall, while on other
architectures they are not longer defined.
So use {get,set}rlimit only to implement ulimit interface.
It fixes LTP ulimit01 test case.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
Most stuff was taken from the eglibc.
Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
So application query if specified module is loaded or not with
dlopen.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Thanks to strauman at slac stanford edu for noticing
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Warn if the enventfd() function is not implemented.
Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
We already provide sincos() on some archs, so we should ship a generic version.
Signed-off-by: William Pitcock <nenolod@dereferenced.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|