| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This makes this API match other kern_xxxat() functions.
Reviewed By: kib
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D29776
|
|
|
|
|
|
|
|
| |
This fixes rsyslog package installation scripts in Bionic.
Reviewed By: kib
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D29108
|
|
|
|
|
|
| |
Reviewed By: kib
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D29773
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
They are similar to our getfhat(2) and fhopen(2) syscalls.
Differential Revision: https://reviews.freebsd.org/D27111
Notes:
svn path=/head/; revision=367773
|
|
|
|
|
|
|
|
|
|
|
|
| |
from a Linux binary. Should come handy for AppImages.
Reviewed by: asomers
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26959
Notes:
svn path=/head/; revision=367517
|
|
|
|
|
|
|
| |
Hogs the console while building the Linux kernel in a Ubuntu Focal jail.
Notes:
svn path=/head/; revision=367066
|
|
|
|
| |
Notes:
svn path=/head/; revision=367065
|
|
|
|
| |
Notes:
svn path=/head/; revision=365080
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a step towards facilitating jails with only Linux binaries.
Supporting emul_path adds path lookups which are completely spurious
if the binary at hand runs in a Linux-based root directory.
It defaults to on (== current behavior).
make -C /root/linux-5.3-rc8 -s -j 1 bzImage:
use_emul_path=1: 101.65s user 68.68s system 100% cpu 2:49.62 total
use_emul_path=0: 101.41s user 64.32s system 100% cpu 2:45.02 total
Notes:
svn path=/head/; revision=364366
|
|
|
|
|
|
|
|
|
|
| |
as documented in the man page.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=363307
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=363304
|
|
|
|
|
|
|
|
|
|
|
| |
memfd_create fds will no longer require an ftruncate(2) to set the size;
they'll grow (to the extent that it's possible) upon write(2)-like syscalls.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D25502
Notes:
svn path=/head/; revision=363066
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This effectively mirrors our libc implementation, but with minor fudging --
name needs to be copied in from userspace, so we just copy it straight into
stack-allocated memfd_name into the correct position rather than allocating
memory that needs to be cleaned up.
The sealing-related fcntl(2) commands, F_GET_SEALS and F_ADD_SEALS, have
also been implemented now that we support them.
Note that this implementation is still not quite at feature parity w.r.t.
the actual Linux version; some caveats, from my foggy memory:
- Need to implement SHM_GROW_ON_WRITE, default for memfd (in progress)
- LTP wants the memfd name exposed to fdescfs
- Linux allows open() of an fdescfs fd with O_TRUNC to truncate after dup.
(?)
Interested parties can install and run LTP from ports (devel/linux-ltp) to
confirm any fixes.
PR: 240874
Reviewed by: kib, trasz
Differential Revision: https://reviews.freebsd.org/D21845
Notes:
svn path=/head/; revision=362769
|
|
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25231
Notes:
svn path=/head/; revision=362102
|
|
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25218
Notes:
svn path=/head/; revision=362055
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22646
Notes:
svn path=/head/; revision=357075
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=356945
|
|
|
|
|
|
|
|
|
|
| |
it worked by accident.
MFC after: 2 weeks
Sponsored by: DARPA
Notes:
svn path=/head/; revision=356912
|
|
|
|
|
|
|
|
|
|
|
|
| |
copy_file_range(2) is implemented natively since r350315, make it available
for Linux binaries too.
Reviewed by: kib (mentor), trasz (previous version)
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D22959
Notes:
svn path=/head/; revision=356206
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handling.
This should unbreak access04, acct01, chmod06, creat06,
and fchmod06 LTP tests.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=356147
|
|
|
|
|
|
|
|
|
| |
Reported by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=355807
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
over the usual fsync(2).
This silences some warnings when running "apt-get upgrade".
Reviewed by: brooks, emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22371
Notes:
svn path=/head/; revision=355754
|
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=354891
|
|
|
|
|
|
|
|
|
|
|
|
| |
when being passed O_NOFOLLOW. This fixes LTP testcase openat02:5.
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22384
Notes:
svn path=/head/; revision=354805
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21966
Notes:
svn path=/head/; revision=354732
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the cases where Linux returns an error (e.g. passing in an undefined
flag) there's no need for us to emit a message. (The target of this
message is a developer working on the linuxulatorm, not the author of
presumably broken Linux software).
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21606
Notes:
svn path=/head/; revision=354447
|
|
|
|
|
|
|
|
|
|
|
| |
linux_msg() already adds \n at the end of all messages.
Reported by: emaste, kib (mentor), mjg (mentor)
Reviewed by: kib (mentor), mjg (mentor)
Differential Revision: https://reviews.freebsd.org/D21852
Notes:
svn path=/head/; revision=352914
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just return EINVAL if flags != 0. The Linux man page documents one
case of EINVAL as "The filesystem does not support one of the flags in
flags."
After r351723 userland binaries will try using new system calls.
Reported by: mjg
Reviewed by: mjg, trasz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21590
Notes:
svn path=/head/; revision=352210
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of them listed in opt_global.h which is not generated while building
modules outside of a kernel and such modules never match real cofigured
kernel.
So, we should prevent our users from building obviously defective modules.
Therefore, remove the root cause of the building of modules outside of a
kernel - the possibility of building modules with DEBUG or KTR flags.
And remove all of DEBUG printfs as it is incomplete and in threaded
programms not informative, also a half of system call does not have DEBUG
printf. For debuging Linux programms we have dtrace, ktr and ktrace ability.
PR: 222861
Reviewed by: trasz
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20178
Notes:
svn path=/head/; revision=347538
|
|
|
|
|
|
|
|
|
|
|
|
| |
the file associated with the given file descriptor.
Reviewed by: kib, asomers
Reviewed by: cem, jilles, brooks (they reviewed previous version)
Discussed with: pjd, and many others
Differential Revision: https://reviews.freebsd.org/D14567
Notes:
svn path=/head/; revision=345982
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flags prevent open(2) and *at(2) vfs syscalls name lookup from
escaping the starting directory. Supposedly the interface is similar
to the same proposed Linux flags.
Reviewed by: jilles (code, previous version of manpages), 0mp (manpages)
Discussed with: allanjude, emaste, jonathan
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D17547
Notes:
svn path=/head/; revision=339748
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Existing linuxulator platforms (i386, amd64) support legacy syscalls,
such as non-*at ones like open, but arm64 and other new platforms do
not.
Wrap these in #ifdef LINUX_LEGACY_SYSCALLS, #defined in the MD linux.h
files. We may need finer grained control in the future but this is
sufficient for now.
Reviewed by: andrew
Sponsored by: Turing Robotic Industries
Differential Revision: https://reviews.freebsd.org/D15237
Notes:
svn path=/head/; revision=335201
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Linuxulator provides per-syscall debug control via the
compat.linux.debug sysctl. There's generally a 1:1 mapping between
sysctl setting and syscall, but faccessat was controlled by the access
setting, perhaps due to copy-paste.
Sponsored by: Turing Robotic Industries
Notes:
svn path=/head/; revision=335200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add macros to allow preinitialization of cap_rights_t.
- Convert most commonly used code paths to use preinitialized cap_rights_t.
A 3.6% speedup in fstat was measured with this change.
Reported by: mjg
Reviewed by: oshogbo
Approved by: sbruno
MFC after: 1 month
Notes:
svn path=/head/; revision=333425
|
|
|
|
|
|
|
|
|
|
|
| |
- Capitalize Linux
- Spell FreeBSD out in full
- Address some style(9) on changed lines
Sponsored by: Turing Robotic Industries Inc.
Notes:
svn path=/head/; revision=329794
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many licenses on Linuxolator files contained small variations from the
standard FreeBSD license text. To avoid license proliferation switch to
the standard 2-clause FreeBSD license for those files where I have
permission from each of the listed copyright holders. Additional files
waiting on permission from others are listed in review D14210.
Approved by: kan, marcel, sos, rdivacky
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=329370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326266
|
|
|
|
| |
Notes:
svn path=/head/; revision=325043
|
|
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=320353
|
|
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=319851
|
|
|
|
|
|
|
|
| |
equal or greater than the size of Linux struct dirent or struct dirent64.
So, remove LINUX_RECLEN_RATIO magic as useless.
Notes:
svn path=/head/; revision=319849
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify
struct dirent layout to add d_off, increase the size of d_fileno
to 64-bits, increase the size of d_namlen to 16-bits, and change
the required alignment. Increase struct statfs f_mntfromname[] and
f_mntonname[] array length MNAMELEN to 1024.
ABI breakage is mitigated by providing compatibility using versioned
symbols, ingenious use of the existing padding in structures, and
by employing other tricks. Unfortunately, not everything can be
fixed, especially outside the base system. For instance, third-party
APIs which pass struct stat around are broken in backward and
forward incompatible ways.
Kinfo sysctl MIBs ABI is changed in backward-compatible way, but
there is no general mechanism to handle other sysctl MIBS which
return structures where the layout has changed. It was considered
that the breakage is either in the management interfaces, where we
usually allow ABI slip, or is not important.
Struct xvnode changed layout, no compat shims are provided.
For struct xtty, dev_t tty device member was reduced to uint32_t.
It was decided that keeping ABI compat in this case is more useful
than reporting 64-bit dev_t, for the sake of pstat.
Update note: strictly follow the instructions in UPDATING. Build
and install the new kernel with COMPAT_FREEBSD11 option enabled,
then reboot, and only then install new world.
Credits: The 64-bit inode project, also known as ino64, started life
many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick
(mckusick) then picked up and updated the patch, and acted as a
flag-waver. Feedback, suggestions, and discussions were carried
by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles),
and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial
ports investigation followed by an exp-run by Antoine Brodin (antoine).
Essential and all-embracing testing was done by Peter Holm (pho).
The heavy lifting of coordinating all these efforts and bringing the
project to completion were done by Konstantin Belousov (kib).
Sponsored by: The FreeBSD Foundation (emaste, kib)
Differential revision: https://reviews.freebsd.org/D10439
Notes:
svn path=/head/; revision=318736
|
|
|
|
|
|
|
|
|
|
| |
while it should use it for the new path instead.
Reported by: trasz@
MFC after: 1 month
Notes:
svn path=/head/; revision=317601
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: dchagin
Approved by: dchagin, trasz (src committers)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9722
Notes:
svn path=/head/; revision=314219
|
|
|
|
| |
Notes:
svn path=/head/; revision=314218
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: dchagin
Approved by: dchagin, trasz (src committers)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9722
Notes:
svn path=/head/; revision=314217
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getdents64() with wrapper over kern_getdirentries().
The patch was originally written by emaste@ and then adapted by trasz@
and me.
Note:
1. I divided linux_getdents() and linux_readdir() as in case when the
getdents() called with count = 1 (readdir() case) it can overwrite
user stack (by writing to user buffer pointer more than 1 byte).
2. Linux returns EINVAL in case when user supplied buffer is not enough
to contain fetched dirent.
3. Linux returns ENOTDIR in case when fd points to not a directory.
Reviewed by: trasz@
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D2210
Notes:
svn path=/head/; revision=313740
|
|
|
|
|
|
|
|
|
|
|
|
| |
error.
Reviewed by: dchagin
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9425
Notes:
svn path=/head/; revision=313283
|
|
|
|
|
|
|
|
|
|
|
|
| |
of their sys_*() counterparts. The svr4 is left unchanged.
Reviewed by: kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9379
Notes:
svn path=/head/; revision=313018
|