Dmitry Chagin
ea54d65b34
linux(4): Deorbit linux_nosys from syscalls.master
...
Differential Revision: https://reviews.freebsd.org/D41902
MFC after: 1 week
(cherry picked from commit 8e523be5a5a2cb9660021d2de5732ee7257b2788)
2023-10-10 08:12:12 +03:00
Dmitry Chagin
4d46ca6550
linux(4): Update syscalls.master to 6.5
...
MFC after: 1 week
(cherry picked from commit 0a16d3d14db67c89ee08f954c670ec4f447a7ab5)
2023-10-02 08:44:53 +03:00
Dmitry Chagin
5585afe642
linux(4): Prepare to retire linux32_copyinuio
...
MFC after: 1 month
2023-08-20 10:36:31 +03:00
Dmitry Chagin
aad4b799f7
linux(4): Add a writev syscall wrapper
...
Adding a writev syscall wrapper is needed due to Linux family of write
syscalls doesn't distinguish between in kernel blocking operations
and always returns EAGAIN while FreeBSD can return ENOBUFS.
MFC after: 1 month
2023-08-20 10:36:30 +03:00
Dmitry Chagin
510f5c88f0
linux(4): Modify write syscall to match Linux
...
Adding a write syscall wrapper is needed due to Linux family of write
syscalls doesn't distinguish between in kernel blocking operations
and always returns EAGAIN while FreeBSD can return ENOBUFS.
MFC after: 1 month
2023-08-20 10:36:28 +03:00
Dmitry Chagin
5068387f42
linux(4): Use l_off_t type for offset argument in sendfile syscall
...
The off_t on Linux is a long, so it's non-functional change, just to
avoid confusing future readers.
MFC after: 1 month
2023-08-17 22:57:16 +03:00
Warner Losh
78d146160d
sys: Remove $FreeBSD$: one-line bare tag
...
Remove /^\s*\$FreeBSD\$$\n/
2023-08-16 11:55:17 -06:00
Dmitry Chagin
1c83154e49
linux(4): Modify ioprio syscalls to match Linux
...
MFC after: 1 month
2023-08-04 16:03:55 +03:00
Dmitry Chagin
41f2c69ee3
linux(4): Modify xattr syscalls to match Linux
...
MFC after: 1 month
2023-07-22 14:03:31 +03:00
Dmitry Chagin
8340b03425
linux(4): Add a dedicated linux_exec_copyin_args()
...
Because Linux allows to exec binaries with 0 argc.
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D40148
MFC after: 2 month
2023-05-29 12:18:16 +03:00
Dmitry Chagin
ca3333dd4a
linux(4): Use Linux dev_t type for mknod syscalls dev argument
...
As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit unsigned integer
on all platforms. Prior the 2.6 kernel dev_t type was an unsigned short.
However, since the firs commit of the Linuxulator, mknod syscall get int dev
argument.
Also, there is some confusion here, while the kernel declares a dev_t type
as a 32-bit sized, the user-space dev_t type can be size of 64 bits, e.g.,
in the Glibc library.
To avoid confusion and to help porting of the Linuxulator to other platforms
use explicit l_dev_t for dev argument of mknod syscalls.
2023-04-28 11:55:02 +03:00
Dmitry Chagin
2370c7321f
linux(4): Update syscalls.master to reflect struct l_old_stat
2023-04-28 11:54:59 +03:00
Warner Losh
559b94a122
syscall.master: Fix comments
...
Have more accruate comments. While #if, #else, etc are copied to the
header files, lines that don't start with # are not. And #include files
are only output to sysinc (which winds up at the front of init_sysent.c
which seems a bit odd). This is all radically undocumented, and likely
has drifted somewhat from 4.4BSD and what other systems do (they've
drifted too, fwiw).
Sponsored by: Netflix
2023-04-20 16:18:02 -06:00
Dmitry Chagin
1c27dce1f8
linux(4): Modify close_range syscall to match Linux
...
MFC after: 2 weeks
2023-04-04 23:23:24 +03:00
Dmitry Chagin
bfae7fbaa2
linux(4): Fix 039e98e6.
...
The patch was about an year in my local queue and I still screwed up...
MFC after: 2 weeks
2022-05-09 21:45:51 +03:00
Dmitry Chagin
039e98e60c
linux(4): Change prctl syscall definition to match Linux actual one.
...
Otherwise argX conversion leads to an unexpected behaviour.
MFC after: 2 weeks
2022-05-09 21:09:39 +03:00
Dmitry Chagin
94f5f150ef
linux(4): Fix ppoll_time64 syscall definition.
...
Fixed my typo in ed61e0ce1d . Here tsp is a pointer to the 64-bit timespec.
MFC after: 2 weeks
2022-05-08 13:37:48 +03:00
Dmitry Chagin
f19c4e2341
linux(4): Change semtimedop syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2022-05-06 20:01:43 +03:00
Dmitry Chagin
17ccda0039
linux(4): Change recvmmsg_time64 syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2022-05-04 13:06:52 +03:00
Dmitry Chagin
16aefe5ba3
linux(4): Change timerfd_gettime64 syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2022-05-04 13:06:51 +03:00
Dmitry Chagin
8545bcff31
linux(4): Change timerfd_settime64 syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2022-05-04 13:06:50 +03:00
Dmitry Chagin
1508b1b6a0
linux(4): Change timer_settime64 syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2022-05-04 13:06:48 +03:00
Dmitry Chagin
ccec96033c
linux(4): Change timer_gettime64 syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2022-05-04 13:06:47 +03:00
Dmitry Chagin
7b520c0b3c
linux(4): Change sched_rr_get_interval_time64 syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2022-05-04 13:06:45 +03:00
Dmitry Chagin
81b0b7dc0c
linux(4): Change epoll_pwait2 syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2022-04-26 19:35:57 +03:00
Dmitry Chagin
f202f35db0
linux(4): Change rseq syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2022-04-26 19:35:54 +03:00
Dmitry Chagin
17913b0b6b
linux(4): Implement clone3 system call.
...
clone3 system call is used by glibc-2.34.
Differential revision: https://reviews.freebsd.org/D31475
MFC after: 2 weeks
2021-08-12 11:49:36 +03:00
Dmitry Chagin
f1c450492f
linux(4): Change clone syscall definition to match Linux actual one.
...
Differential revision: https://reviews.freebsd.org/D31473
MFC after: 2 weeks
2021-08-12 11:46:36 +03:00
Dmitry Chagin
13d79be995
linux(4): Implement faccessat2 system call.
...
It's used by bash on arm64 with glibc-2.32.
Reviewed by: trasz
Differential Revision: https://reviews.freebsd.org/D31345
MFC after: 2 weeks
2021-08-12 11:40:42 +03:00
Dmitry Chagin
2eff670fde
linux(4): Implement poll system call via linux_common_ppol()
...
for the sake of converting events to/from native.
MFC after: 2 weeks
2021-06-22 08:07:46 +03:00
Dmitry Chagin
ed61e0ce1d
linux(4): Implement ppoll_time64 system call.
...
MFC after: 2 weeks
2021-06-10 15:18:46 +03:00
Dmitry Chagin
f6d075ecd7
linux(4): Implement pselect6_time64 system call.
...
MFC after: 2 weeks
2021-06-10 15:03:30 +03:00
Dmitry Chagin
db4a1f331b
linux(4): Implement rt_sigtimedwait_time64 system call.
...
It still does not work as intended, awaits D30675.
MFC after: 2 weeks
2021-06-10 14:51:30 +03:00
Dmitry Chagin
2e46d0c3d9
linux(4): Implement futex_time64 system call.
...
MFC after: 2 weeks
2021-06-10 14:27:06 +03:00
Dmitry Chagin
3c1de151e3
linux(4): Change Linux futex syscall definition to match Linux actual one.
...
MFC after: 2 weeks
2021-06-10 14:00:00 +03:00
Dmitry Chagin
0f8dab4540
linux(4): Fix timeout parameter of rt_sigtimedwait syscall, which is
...
timespec not a timeval.
MFC after: 2 weeks
2021-06-07 05:35:35 +03:00
Dmitry Chagin
6501370a7d
linux(4): Implement clock_nanosleep_time64 system call.
...
MFC after: 2 weeks
2021-06-07 05:26:48 +03:00
Dmitry Chagin
187715a420
linux(4): Implement clock_getres_time64 system call.
...
MFC after: 2 weeks
2021-06-07 05:21:32 +03:00
Dmitry Chagin
19f9a0e4df
linux(4): Implement clock_settime64 system call.
...
MFC after: 2 weeks
2021-06-07 05:11:25 +03:00
Dmitry Chagin
99b6f43069
linux(4): Implement clock_gettime64 system call.
...
MFC after: 2 weeks
2021-06-07 05:04:42 +03:00
Dmitry Chagin
e4bffb80bb
linux(4): Implement utimensat_time64 system call.
...
MFC after: 2 weeks
2021-06-07 04:54:30 +03:00
Edward Tomasz Napierala
6d926e850d
linux: add new syscall numbers
...
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D30193
2021-05-28 09:02:16 +01:00
Conrad Meyer
de774e422e
linux(4): Implement name_to_handle_at(), open_by_handle_at()
...
They are similar to our getfhat(2) and fhopen(2) syscalls.
Differential Revision: https://reviews.freebsd.org/D27111
2020-11-17 19:51:47 +00:00
Edward Tomasz Napierala
8d1d017175
Add a trivial linux(4) splice(2) implementation, which simply
...
returns EINVAL. Fixes grep (grep-3.1-2build1).
PR: kern/218699
Reported by: avos
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25636
2020-07-18 11:28:40 +00:00
Edward Tomasz Napierala
308e194cbf
Add proper types for linux message queue syscalls; mostly taken
...
from 32-bit Linuxulator.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25386
2020-06-27 14:42:08 +00:00
Edward Tomasz Napierala
36507f85dc
Add syscall definitions for linux xattr syscalls.
...
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25387
2020-06-27 14:39:44 +00:00
Edward Tomasz Napierala
5ac2674278
Adapt linuxulator syscalls.master files to the new layout.
...
No functional changes.
Reviewed by: brooks
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25381
2020-06-21 10:09:34 +00:00
Edward Tomasz Napierala
52c81be11a
Add linux_madvise(2) instead of having Linux apps call the native
...
FreeBSD madvise(2) directly. While some of the flag values match,
most don't.
PR: kern/230160
Reported by: markj
Reviewed by: markj
Discussed with: brooks, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25272
2020-06-20 18:29:22 +00:00
Ed Maste
fc7510aef7
linuxulator: implement sendfile
...
Submitted by: Bora Özarslan <borako.ozarslan@gmail.com>
Submitted by: Yang Wang <2333@outlook.jp>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19917
2020-02-05 16:53:02 +00:00
Mark Johnston
149afbf3ba
Fix 64-bit syscall argument fetching in 32-bit Linux syscall handlers.
...
The Linux32 system call argument fetcher places each argument (passed in
registers in the Linux x86 system call convention) into an entry in the
generic system call args array. Each member of this array is 8 bytes
wide, so this approach is broken for system calls that take off_t
arguments.
Fix the problem by splitting l_loff_t arguments in the 32-bit system
call descriptions, the same as we do for FreeBSD32. Change entry points
to handle this using the PAIR32TO64 macro.
Move linux_ftruncate64() into compat/linux.
PR: 243155
Reported by: Alex S <iwtcex@gmail.com>
Reviewed by: kib (previous version)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23210
2020-01-21 17:28:22 +00:00