mrg
f8570f8a97
fix simple mis-matched function prototype and definitions.
...
most of these are like, eg
void foo(int[2]);
with either of these
void foo(int*) { ... }
void foo(int[]) { ... }
in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.
found by GCC 12.
2023-08-01 07:04:14 +00:00
rin
fb68413f18
librump*: Require 10.99.7 or higher for __kevent100
2023-07-31 04:37:04 +00:00
christos
d11110f473
Add epoll(2) from Theodore Preduta as part of GSoC 2023
2023-07-28 18:18:59 +00:00
andvar
f84252b461
fix various typos in comments and log messages.
2022-04-16 18:15:20 +00:00
nia
122b5006ee
Force at most partial RELRO for rump_server and related libraries
...
rump_server with -l uses lazy resolution by default and thus cannot be
used with full RELRO/BIND_NOW.
2021-11-01 21:37:32 +00:00
christos
42a6419698
remove fake closefrom()
2021-09-11 14:22:12 +00:00
rillig
d539a31d62
librumphijack: fix typo for NetBSD < 5.99.7
2021-09-11 08:32:11 +00:00
christos
0c63703b78
Ignore closefrom(3) for now; too complicated to descern between regular
...
and rump fds.
2021-09-10 21:22:05 +00:00
christos
86d9720796
- implement pselect so that the ssh test has a chance to work
...
- 1 -> EXIT_FAILURE
- more info about fds
2021-09-10 20:33:38 +00:00
christos
c1167da0aa
Add pathconf and lpathconf (fixes lib/librumphijack/nfs test which uses ls
...
which now uses lpathconf)
2020-05-27 18:55:36 +00:00
kamil
418e457ef1
Change types of DUP2ALIAS and DUP2FDMASK bit masks to unsigned
...
This is for consistency with the DUP2BIT change.
2020-02-10 23:21:42 +00:00
kamil
a6c4eb28f3
Avoid unportable bit shift semantics
...
hijack.c:451:52, left shift of 1 by 31 places cannot be represented in type 'int
2020-02-10 09:10:58 +00:00
christos
ed9ca5deea
teach hijack about the new vfs syscalls
2019-09-25 20:19:59 +00:00
kamil
d3dd6160fd
Stop passing -D_INCOMPLETE_XOPEN_C063 (obsolete define)
2019-09-16 00:00:56 +00:00
bad
c0bd86dc55
Linux doesn't have paccept().
2019-02-17 23:35:50 +00:00
bad
340a53cf8b
compile hijack.c with -D_INCOMPLETE_XOPEN_C063 so that AT_FDCWD is alwasy
...
defined for rumpkernels.
2019-02-17 23:33:20 +00:00
hannken
650b07c895
Add an option "modctl" to capture modctl().
2018-12-16 14:03:37 +00:00
ozaki-r
79209cd2af
rumphijack: don't modify a cmsg on just validating it
...
Pointed out by k-goda@IIJ
2018-06-28 06:20:36 +00:00
ozaki-r
a9b3bb4d56
Provide better debug messages for ioctl
2017-10-23 06:52:17 +00:00
christos
a3ddac400c
since ln(1) now uses linkat(2) provide a dumb wrapper.
2017-06-06 19:48:42 +00:00
sevan
6b31f116cc
With the removal of HAVE_REGISTER_T from rumpuser_port.h, _KERNTYPES does not
...
need to be defined. This allows register_t to be typedef'd to RUMP_REGISTER_T
without conflict, as highlighted in PR kern/52206.
2017-05-11 04:33:14 +00:00
sevan
979875ac74
Revert previous change so builds can resume.
...
_KERNTYPES needs to be defined for NetBSD builds to succeed.
_KERNTYPES must not be defined for buildrum.sh builds to succeed.
2017-05-10 08:48:46 +00:00
sevan
9204518573
Do not define _KERNTYPES as this breaks build with buildrump.sh due to
...
conflicting types for register_t.
Closes PR kern/52206
Steered in the right direction by christos.
2017-05-10 01:11:51 +00:00
ozaki-r
44d072be9e
Support paccept for nc
2017-02-16 08:08:01 +00:00
christos
d10d9a2322
fix test lib/librumphijack/t_sh/runscript
...
(handle F_DUPFD_CLOEXEC that the shell is now using)
2016-12-02 20:53:36 +00:00
kre
1ec349e914
Object to dup2() if target fd is in the range of fd's that
...
librumphijack reserves for rump to use.
This is not normally a problem, as most applications don't attempt
to use very high fds - but /bin/sh does.
This fix is something of a kludge - really the apparent fd resource limit
ought to be lowered as well, but this is sufficient to allow the shell
to work (when its dup2() gets rejected, it just tries again with a smaller
target fd until it eventually succeeds.) This fixes the librumphijack
shell ATF tests.
A better, more comprehensive, fix would be good...
2016-08-11 09:48:57 +00:00
christos
ffeb8dbf4e
Define _KERNTYPES for things that need it.
2016-01-23 21:22:45 +00:00
pooka
1dfc153377
Remember that dlsym() tends to fail on PowerPC during init (or at least
...
tended), so call rumphijack_dlsym() instead to be safe.
2015-08-25 13:50:19 +00:00
pooka
4e9c298177
allow mmap() to be called before init runs
2015-08-25 13:45:00 +00:00
riastradh
ee14e9e637
Define the expansion of the VFORK macro, not the symbol `VFORK'.
...
Fixes hijacking processes that vfork and exec. Symptom was the child
would spin with read/EAGAIN <-> kevent/EBADF because the inheritance
mechanism relied on setting the holyfd to -1 on fork...which didn't
happen if we didn't hijack vfork.
ok pooka@
2015-04-11 12:54:41 +00:00
pooka
367e4a103c
Wrap utimensat() only if present on host
...
fixes buildrump.sh on NetBSD 6.1.5
2015-03-05 00:26:17 +00:00
pooka
8ce52db1d0
Make ATCALL() behave for absolute paths too.
2015-03-04 23:42:26 +00:00
pooka
8651603956
Define a generic ATCALL() and use it to implement utimensat()
2015-03-04 23:31:49 +00:00
enami
02c2c060ff
Also hijack futimens(2) so that t_sh test passes.
2015-03-03 01:24:39 +00:00
enami
a4c990f5c2
Hijack utimensat(2) so that t_vfs test passes after cp(1)/mv(1) are
...
changed to use the system call. Linux also has this system call, but
not tested this on linux.
2015-03-03 00:19:07 +00:00
pooka
23dfcd7408
Use autoconf for rump kernel posix hypercall layer.
...
This gets rid of homegrown hacks and puts all probes in one place.
Tested for NetBSD (build.sh + anita) and Linux (buildrump.sh)
2014-11-04 19:05:17 +00:00
pooka
df2711f4e7
In case of no dup2'd fd's, make sure that F_CLOSEM for the
...
rump kernel starts from 0.
Fixes rumphijack fdoff test (notably, this bug had nothing to do with
fdoff, and was exposed >3 years after writing the test when rump kernels
started providing fd's 0/1/2)
2014-08-12 23:47:09 +00:00
gson
1c06c49918
Ignore the contents of revents when poll() returns failure.
...
This is one more part to the fix for PR kern/46464. Patch
from pooka.
2014-07-21 14:23:43 +00:00
gson
6aaac7c3e2
Do not assert that the two threads do not simultanously notify each
...
other, because sometimes they do. Should fix PR kern/46464. OK pooka.
2014-07-19 14:14:21 +00:00
justin
95e41b89b5
Add Android support for rump kernel.
...
Reviewed by pooka@
2014-04-02 17:09:23 +00:00
tron
4923acbfbe
Make sure that "_FORTIFY_SOURCE" really gets undefined even if "USE_SSP"
...
is set to "yes" to fix build problems caused by the recent change to
this makefile.
2014-01-18 18:37:30 +00:00
christos
fa1b665884
don't need to include anything before bsd.lib.mk since we don't use any
...
variables
2014-01-10 15:54:29 +00:00
martin
6f65a8d103
ACTIVE_CC can only be used after include of bsd.own.mk
2014-01-10 15:00:16 +00:00
pooka
0f188198a5
use <rump/rumpuser_port.h>
2013-09-10 16:53:06 +00:00
pooka
3fc5dcaa4f
remove unnecessary <sys/poll.h> -- musl whines when it's included
2013-07-31 12:23:25 +00:00
pooka
5cbd60062e
Override ssp also in case where it doesn't come intrinsically
...
from the compiler.
2013-07-29 10:13:21 +00:00
pooka
2eebe6e2de
Extend #undef _FORTIFY_SOURCE to both files to avoid compiler
...
warning for -O0 and fortify combination.
from Alessio Sergi via github
2013-07-27 17:37:29 +00:00
pooka
1b3ff08420
Support Linuxen where libc ioctl has cmd as int unstead of unsigned long.
2013-07-22 12:11:03 +00:00
pooka
40fd6d6fa3
Fixes when compiling against musl libc.
...
from Justin Cormack via private email
2013-07-20 18:46:15 +00:00
pooka
a940e06527
sys/cdefs.h should come from rumpuser_port.h
...
Noticed by Justin Cormack while building against musl libc.
2013-07-18 22:58:35 +00:00