|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0 |
|
| #
b630d64c |
| 08-Jun-2021 |
Philippe Michaud-Boudreault <[email protected]> |
linux: implement statx(2)
PR: 252106 Reviewed By: dchagin Differential Revision: https://reviews.freebsd.org/D30466
(cherry picked from commit 2362ad457a01d56d87e74823599578ab37bdbfb9)
|
| #
8e4ef1c3 |
| 16-Apr-2021 |
Edward Tomasz Napierala <[email protected]> |
linux: make fstatat(2) handle AT_EMPTY_PATH
Without it, Qt5 apps from Focal fail to start, being unable to load their plugins. It's also necessary for glibc 2.33, as found in recent Arch snapshots.
linux: make fstatat(2) handle AT_EMPTY_PATH
Without it, Qt5 apps from Focal fail to start, being unable to load their plugins. It's also necessary for glibc 2.33, as found in recent Arch snapshots.
PR: 254112 Reviewed By: kib Sponsored by: The FreeBSD Foundation, EPSRC Differential Revision: https://reviews.freebsd.org/D28192
(cherry picked from commit 4b45c2bb83a1d7aded0c424d65595cc576760dc7)
show more ...
|
|
Revision tags: release/13.0.0, release/12.2.0 |
|
| #
1a34e9fa |
| 20-Oct-2020 |
Edward Tomasz Napierala <[email protected]> |
Fix potential race condition in linux stat(2).
Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25618
|
| #
1a180032 |
| 01-Sep-2020 |
Mateusz Guzik <[email protected]> |
compat: clean up empty lines in .c and .h files
|
| #
7ad2a82d |
| 19-Aug-2020 |
Mateusz Guzik <[email protected]> |
vfs: drop the error parameter from vn_isdisk, introduce vn_isdisk_error
Most consumers pass NULL.
|
| #
a125ed50 |
| 18-Aug-2020 |
Mateusz Guzik <[email protected]> |
linux: add sysctl compat.linux.use_emul_path
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
linux: add sysctl compat.linux.use_emul_path
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
show more ...
|
| #
17f701a3 |
| 11-Jul-2020 |
Edward Tomasz Napierala <[email protected]> |
Make linux stat(2) return the same st_dev for every devfs instance. The reason for this is to work around an idiosyncrasy of glibc getttynam(3) implementation: it checks whether st_dev returned for f
Make linux stat(2) return the same st_dev for every devfs instance. The reason for this is to work around an idiosyncrasy of glibc getttynam(3) implementation: it checks whether st_dev returned for fd 0 is the same as st_dev returned for the target of /proc/self/fd/0 symlink, and with linux chroots having their own devfs instance, the check will fail if you chrooted into it.
PR: kern/240767 Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25559
show more ...
|
|
Revision tags: release/11.4.0 |
|
| #
c8b3463d |
| 07-Jan-2020 |
Mateusz Guzik <[email protected]> |
vfs: reimplement deferred inactive to use a dedicated flag (VI_DEFINACT)
The previous behavior of leaving VI_OWEINACT vnodes on the active list without a hold count is eliminated. Hold count is kept
vfs: reimplement deferred inactive to use a dedicated flag (VI_DEFINACT)
The previous behavior of leaving VI_OWEINACT vnodes on the active list without a hold count is eliminated. Hold count is kept and inactive processing gets explicitly deferred by setting the VI_DEFINACT flag. The syncer is then responsible for vdrop.
Reviewed by: kib (previous version) Tested by: pho (in a larger patch, previous version) Differential Revision: https://reviews.freebsd.org/D23036
show more ...
|
| #
273ce4ae |
| 29-Dec-2019 |
Edward Tomasz Napierala <[email protected]> |
Make Linux stat(2) et al distinguish between block and character devices. It's required for LTP, among other things. It's not complete, but good enough for now.
Reviewed by: kib MFC after: 2 weeks
Make Linux stat(2) et al distinguish between block and character devices. It's required for LTP, among other things. It's not complete, but good enough for now.
Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D22950
show more ...
|
|
Revision tags: release/12.1.0, release/11.3.0 |
|
| #
c5156c77 |
| 13-May-2019 |
Dmitry Chagin <[email protected]> |
Linuxulator depends on a fundamental kernel settings such as SMP. Many of them listed in opt_global.h which is not generated while building modules outside of a kernel and such modules never match re
Linuxulator depends on a fundamental kernel settings such as SMP. Many 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
show more ...
|
|
Revision tags: release/12.0.0, release/11.2.0 |
|
| #
931e2a1a |
| 15-Jun-2018 |
Ed Maste <[email protected]> |
linuxulator: do not include legacy syscalls on arm64
Existing linuxulator platforms (i386, amd64) support legacy syscalls, such as non-*at ones like open, but arm64 and other new platforms do not.
linuxulator: do not include legacy syscalls on arm64
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
show more ...
|
| #
407a8126 |
| 13-Jun-2018 |
Bruce Evans <[email protected]> |
Oops, r335053 had an old version of the comment about 16-bit linux dev_t translation.
|
| #
ab35e1c7 |
| 13-Jun-2018 |
Bruce Evans <[email protected]> |
Fix the encoding of major and minor numbers in 64-bit dev_t by restoring the old encodings for the lower 16 and 32 bits and only using the higher 32 bits for unusually large major and minor numbers.
Fix the encoding of major and minor numbers in 64-bit dev_t by restoring the old encodings for the lower 16 and 32 bits and only using the higher 32 bits for unusually large major and minor numbers. This change breaks compatibility with the previous encoding (which was only used in -current).
Fix truncation to (essentially) 16-bit dev_t in newnfs v3.
Any encoding of device numbers gives an ABI, so it can't be changed without translations for compatibility. Extra bits give the much larger complication that the translations need to compress into fewer bits. Fortunately, more than 32 bits are rarely needed, so compression is rarely needed except for 16-bit linux dev_t where it was always needed but never done.
The previous encoding moved the major number into the top 32 bits. Almost no translation code handled this, so the major number was blindly truncated away in most 32-bit encodings. E.g., for ffs, mknod(8) with major = 1 and minor = 2 gave dev_t = 0x10000002; ffs cannot represent this and blindly truncated it to 2. But if this mknod was run on any released version of FreeBSD, it gives dev_t = 0x102. ffs can represent this, but in the previous encoding it was not decoded, giving major = 0, minor = 0x102.
The presence of bugs was most obvious for exporting dev_t's from an old system to -current, since bugs in newnfs augment them. I fixed oldnfs to support 32-bit dev_t in 1996 (r16634), but this regressed to 16-bit dev_t in newnfs, first to the old 16-bit encoding and then further in -current. E.g., old ad0 with major = 234, minor = 0x10002 had the correct (major, minor) number on the wire, but newnfs truncated this to (234, 2) and then the previous encoding shifted the major number into oblivion as seen by ffs or old applications.
I first tried to fix this by translating on every ABI/API boundary, but there are too many boundaries and too many sloppy translations by blind truncation. So use the old encoding for the low 32 bits so that sloppy translations work no worse than before provided the high 32 bits are not set. Add some error checking for when bits are lost. Keep not doing any error checking for translations for almost everything in compat/linux.
compat/freebsd32/freebsd32_misc.c: Optionally check for losing bits after possibly-truncating assignments as before.
compat/linux/linux_stats.c: Depend on the representation being compatible with Linux's (or just with itself for local use) and spell some of the translations as assignments in a macro that hides the details.
fs/nfsclient/nfs_clcomsubs.c: Essentially the same fix as in 1996, except there is now no possible truncation in makedev() itself. Also fix nearby style bugs.
kern/vfs_syscalls.c: As for freebsd32. Also update the sysctl description to include file numbers, and change it to describe device ids as device numbers.
sys/types.h: Use inline functions (wrapped by macros) since the expressions are now a bit too complicated for plain macros. Describe the encoding and some of the reasons for it. 16-bit compatibility didn't leave many reasonable choices for the 32-bit encoding, and 32-bit compatibility doesn't leave many reasonable choices for the 64-bit encoding. My choice is to put the 8 new minor bits in the low 8 bits of the top 32 bits. This minimizes discontiguities.
Reviewed by: kib (except for rewrite of the comment in linux_stats.c)
show more ...
|
| #
372639f9 |
| 13-Jun-2018 |
Bruce Evans <[email protected]> |
Fix some bugs found while fixing the representation and translation of 64-bit dev_t's (but not ones involving dev_t's).
st_size was supposed to be clamped in cvtstat() and linux's copy_stat(), but t
Fix some bugs found while fixing the representation and translation of 64-bit dev_t's (but not ones involving dev_t's).
st_size was supposed to be clamped in cvtstat() and linux's copy_stat(), but the clamping code wasn't aware that st_size is signed, and also had an obfuscated off-by-1 value for the unsigned limit, so its effect was to produce a bizarre negative size instead of clamping.
Change freebsd32's copy_ostat() to be no worse than cvtstat(). It was missing clamping and bzero()ing of padding.
Reviewed by: kib (except a final fix of the clamp to the signed maximum)
show more ...
|
| #
cbd92ce6 |
| 09-May-2018 |
Matt Macy <[email protected]> |
Eliminate the overhead of gratuitous repeated reinitialization of cap_rights
- Add macros to allow preinitialization of cap_rights_t.
- Convert most commonly used code paths to use preinitialized c
Eliminate the overhead of gratuitous repeated reinitialization of cap_rights
- 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
show more ...
|
| #
340f4a8d |
| 12-Mar-2018 |
Ed Maste <[email protected]> |
Linuxulator: apply style(9) to return
Sponsored by: Turing Robotic Industries Inc.
|
| #
0ba1b365 |
| 16-Feb-2018 |
Ed Maste <[email protected]> |
Rationalize license text on Linuxolator files
Many licenses on Linuxolator files contained small variations from the standard FreeBSD license text. To avoid license proliferation switch to the stan
Rationalize license text on Linuxolator files
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
show more ...
|
| #
7f2d13d6 |
| 27-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
sys/compat: further adoption of SPDX licensing ID tags.
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 - er
sys/compat: further adoption of SPDX licensing ID tags.
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.
show more ...
|
|
Revision tags: release/10.4.0 |
|
| #
2c75d7b0 |
| 24-Sep-2017 |
Pedro F. Giffuni <[email protected]> |
Small style(9) issue: spaces vs TAB.
|
|
Revision tags: release/11.1.0 |
|
| #
dbaa9ebf |
| 18-Jun-2017 |
Ed Maste <[email protected]> |
Add ZFS to Linux statfs ftype
PR: 220086 Reviewed by: cem MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11252
|
| #
e801ac78 |
| 25-Feb-2017 |
Edward Tomasz Napierala <[email protected]> |
Fix linux_fstatfs() to return proper value for f_frsize. Without it, linux df(1) binary from Xenial shows garbage.
Reviewed by: dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revi
Fix linux_fstatfs() to return proper value for f_frsize. Without it, linux df(1) binary from Xenial shows garbage.
Reviewed by: dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9692
show more ...
|
| #
3b51ec08 |
| 21-Feb-2017 |
Edward Tomasz Napierala <[email protected]> |
Get rid of foo_sys() in linuxulator code. It was commented out, and it would be useless anyway - there is no point in pretending to have block devices; our "block" devices are in fact character ones
Get rid of foo_sys() in linuxulator code. It was commented out, and it would be useless anyway - there is no point in pretending to have block devices; our "block" devices are in fact character ones, and can only be accessed as such.
Discussed with: dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL
show more ...
|
| #
2f304845 |
| 05-Jan-2017 |
Konstantin Belousov <[email protected]> |
Do not allocate struct statfs on kernel stack.
Right now size of the structure is 472 bytes on amd64, which is already large and stack allocations are indesirable. With the ino64 work, MNAMELEN is
Do not allocate struct statfs on kernel stack.
Right now size of the structure is 472 bytes on amd64, which is already large and stack allocations are indesirable. With the ino64 work, MNAMELEN is increased to 1024, which will make it impossible to have struct statfs on the stack.
Extracted from: ino64 work by gleb Discussed with: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0 |
|
| #
2ad02313 |
| 20-Mar-2016 |
Dmitry Chagin <[email protected]> |
Check bsd_to_linux_statfs() return value. Forgotten in r297070.
MFC after: 1 week
|
| #
525c9796 |
| 20-Mar-2016 |
Dmitry Chagin <[email protected]> |
Return EOVERFLOW in case when actual statfs values are large enough and not fit into 32 bit fileds of a Linux struct statfs.
PR: 181012 MFC after: 1 week
|