Page MenuHomeFreeBSD
Feed Advanced Search

Aug 17 2021

dchagin abandoned D31566: Split sys_getpgid on two counterparts..
Aug 17 2021, 5:40 PM
dchagin updated the diff for D31567: linux(4): Fixup waitid handling P_PGID idtype..

abandon kern_getpgid, add check for osrelease

Aug 17 2021, 5:39 PM
dchagin updated the diff for D31561: linux(4): Fixup wait4 handling pid equal 0 case..

abandon kern_getpgid

Aug 17 2021, 5:37 PM

Aug 16 2021

dchagin updated the diff for D31552: linux(4): Consolidate wait* facility into linux_common_wait()..

style(9)

Aug 16 2021, 7:01 PM
dchagin updated the diff for D31555: linux(4): Add support for __WALL wait option bit..

comment added to the implementation

Aug 16 2021, 7:00 PM
dchagin updated the diff for D31524: linux(4): Add AT_NO_AUTOMOUNT to statx..

add comment to the statx impl

Aug 16 2021, 6:54 PM
dchagin updated the diff for D31567: linux(4): Fixup waitid handling P_PGID idtype..

call kern_getpgid if id is zero

Aug 16 2021, 6:46 PM
dchagin added a reviewer for D31567: linux(4): Fixup waitid handling P_PGID idtype.: Linux Emulation.
Aug 16 2021, 5:59 PM
dchagin added a reviewer for D31566: Split sys_getpgid on two counterparts.: Linux Emulation.
Aug 16 2021, 5:58 PM
dchagin requested review of D31567: linux(4): Fixup waitid handling P_PGID idtype..
Aug 16 2021, 5:57 PM
dchagin updated the diff for D31561: linux(4): Fixup wait4 handling pid equal 0 case..

fixed

Aug 16 2021, 5:56 PM
dchagin requested review of D31566: Split sys_getpgid on two counterparts..
Aug 16 2021, 5:55 PM
dchagin added a comment to D31561: linux(4): Fixup wait4 handling pid equal 0 case..

Special handling for -1 also needed

Aug 16 2021, 5:22 PM
dchagin added a comment to D31554: linux(4): Fixup options value validation in linux_waitid()..

This is fine with me, although I wonder if it makes sense to do the check in linux_to_bsd_waitopts so the supported options are all in one place? But no objection from me if you prefer this.

Aug 16 2021, 3:53 PM
dchagin added a reviewer for D31561: linux(4): Fixup wait4 handling pid equal 0 case.: Linux Emulation.
Aug 16 2021, 3:48 PM
dchagin requested review of D31561: linux(4): Fixup wait4 handling pid equal 0 case..
Aug 16 2021, 3:47 PM
dchagin added a reviewer for D31559: linux(4): Return ENOSYS for unsupported P_PIDFD waitid option bit.: Linux Emulation.
Aug 16 2021, 3:24 PM
dchagin requested review of D31559: linux(4): Return ENOSYS for unsupported P_PIDFD waitid option bit..
Aug 16 2021, 3:23 PM
dchagin updated the diff for D31554: linux(4): Fixup options value validation in linux_waitid()..

fix strange mismerge

Aug 16 2021, 2:06 PM
dchagin added a reviewer for D31555: linux(4): Add support for __WALL wait option bit.: Linux Emulation.
Aug 16 2021, 12:18 PM
dchagin added a reviewer for D31554: linux(4): Fixup options value validation in linux_waitid().: Linux Emulation.
Aug 16 2021, 12:18 PM
dchagin added a reviewer for D31553: linux(4): Eliminate bogus options value validation.: Linux Emulation.
Aug 16 2021, 12:17 PM
dchagin added a reviewer for D31552: linux(4): Consolidate wait* facility into linux_common_wait().: Linux Emulation.
Aug 16 2021, 12:17 PM
dchagin requested review of D31555: linux(4): Add support for __WALL wait option bit..
Aug 16 2021, 12:16 PM
dchagin requested review of D31554: linux(4): Fixup options value validation in linux_waitid()..
Aug 16 2021, 12:15 PM
dchagin requested review of D31553: linux(4): Eliminate bogus options value validation..
Aug 16 2021, 12:13 PM
dchagin requested review of D31552: linux(4): Consolidate wait* facility into linux_common_wait()..
Aug 16 2021, 12:07 PM
dchagin updated the diff for D31551: linux(4): Fixup miscalculation of d_off of struct dirent in getdents() syscalls..

blank line restore

Aug 16 2021, 11:52 AM
dchagin added a reviewer for D31551: linux(4): Fixup miscalculation of d_off of struct dirent in getdents() syscalls.: Linux Emulation.
Aug 16 2021, 8:06 AM
dchagin requested review of D31551: linux(4): Fixup miscalculation of d_off of struct dirent in getdents() syscalls..
Aug 16 2021, 8:06 AM

Aug 15 2021

dchagin added a reviewer for D31544: mips: Eliminate unused includes.: imp.
Aug 15 2021, 7:32 PM
dchagin requested review of D31544: mips: Eliminate unused includes..
Aug 15 2021, 7:31 PM

Aug 13 2021

dchagin committed R10:d4da692862f1: linux(4): Improve comment. (authored by dchagin).
linux(4): Improve comment.
Aug 13 2021, 8:37 AM
dchagin updated the diff for D31524: linux(4): Add AT_NO_AUTOMOUNT to statx..

added an explanation about using the flag

Aug 13 2021, 8:20 AM

Aug 12 2021

dchagin added a comment to D31525: linprocfs: Eliminate bogus comment (KSE)..

The XXXKSE is certainly meaningless now, but we maybe still want to comment on how Linux threads / processes map to FreeBSD?

Aug 12 2021, 10:52 PM
dchagin added a reviewer for D31525: linprocfs: Eliminate bogus comment (KSE).: Linux Emulation.
Aug 12 2021, 5:59 PM
dchagin requested review of D31525: linprocfs: Eliminate bogus comment (KSE)..
Aug 12 2021, 5:59 PM
dchagin updated the test plan for D31524: linux(4): Add AT_NO_AUTOMOUNT to statx..
Aug 12 2021, 4:40 PM
dchagin requested review of D31524: linux(4): Add AT_NO_AUTOMOUNT to statx..
Aug 12 2021, 4:36 PM
dchagin committed R10:aecd31a8a3b0: linux(4): Remove clone3 and faccessat2 from dummy. (authored by dchagin).
linux(4): Remove clone3 and faccessat2 from dummy.
Aug 12 2021, 1:08 PM
dchagin committed R10:bed2ac27a14d: linux(4): Remove the unnecessary spaces. (authored by dchagin).
linux(4): Remove the unnecessary spaces.
Aug 12 2021, 8:59 AM
dchagin committed R10:71854d9b2b09: fork: Remove the unnecessary spaces. (authored by dchagin).
fork: Remove the unnecessary spaces.
Aug 12 2021, 8:59 AM
dchagin committed R10:1af0780b5f20: linux(4): Move ff variable initialization from declaration. (authored by dchagin).
linux(4): Move ff variable initialization from declaration.
Aug 12 2021, 8:58 AM
dchagin committed R10:c2cc5345b88e: linux(4): Verify that higher 32bits of exit_signal in clone3 are unset. (authored by dchagin).
linux(4): Verify that higher 32bits of exit_signal in clone3 are unset.
Aug 12 2021, 8:58 AM
dchagin committed R10:4385147547d9: linux(4): Return ENOSYS for unsupported clone3 option bits. (authored by dchagin).
linux(4): Return ENOSYS for unsupported clone3 option bits.
Aug 12 2021, 8:58 AM
dchagin closed D31483: linux(4): Return ENOSYS for unsupported clone3 option bits..
Aug 12 2021, 8:57 AM
dchagin committed R10:0d77f6c0c350: linux(4): Add LINUX_RATELIMIT_MSG macro for future use. (authored by dchagin).
linux(4): Add LINUX_RATELIMIT_MSG macro for future use.
Aug 12 2021, 8:57 AM
dchagin closed D31488: linux(4): Add LINUX_RATELIMIT_MSG macro for future use..
Aug 12 2021, 8:57 AM
dchagin closed D31481: linux(4): Implement CLONE_CLEAR_SIGHAND option bit..
Aug 12 2021, 8:57 AM
dchagin committed R10:c5fc9fe7f36a: linux(4): Implement CLONE_CLEAR_SIGHAND option bit. (authored by dchagin).
linux(4): Implement CLONE_CLEAR_SIGHAND option bit.
Aug 12 2021, 8:57 AM
dchagin closed D31478: linux(4): Add CLONE_PIDFD option bit..
Aug 12 2021, 8:56 AM
dchagin committed R10:a796845d6de0: linux(4): Add CLONE_PIDFD option bit. (authored by dchagin).
linux(4): Add CLONE_PIDFD option bit.
Aug 12 2021, 8:56 AM
dchagin committed R10:b356030e6706: linux(4): Regen for clone3 system call. (authored by dchagin).
linux(4): Regen for clone3 system call.
Aug 12 2021, 8:51 AM
dchagin committed R10:17913b0b6b70: linux(4): Implement clone3 system call. (authored by dchagin).
linux(4): Implement clone3 system call.
Aug 12 2021, 8:51 AM
dchagin closed D31475: linux(4): Implement clone3 system call..
Aug 12 2021, 8:51 AM
dchagin committed R10:0a4b664ae858: linux(4): Add struct clone_args for future clone3 system call. (authored by dchagin).
linux(4): Add struct clone_args for future clone3 system call.
Aug 12 2021, 8:51 AM
dchagin closed D31474: linux(4): Add struct clone_args for future clone3 system call..
Aug 12 2021, 8:51 AM
dchagin committed R10:0c08f34f4ddf: linux(4): Regen for clone syscall. (authored by dchagin).
linux(4): Regen for clone syscall.
Aug 12 2021, 8:48 AM
dchagin committed R10:f1c450492f81: linux(4): Change clone syscall definition to match Linux actual one. (authored by dchagin).
linux(4): Change clone syscall definition to match Linux actual one.
Aug 12 2021, 8:48 AM
dchagin closed D31473: linux(4): Change clone syscall definition to match Linux actual one..
Aug 12 2021, 8:48 AM
dchagin committed R10:de8374df28cc: fork: Allow ABI to specify fork return values for child. (authored by dchagin).
fork: Allow ABI to specify fork return values for child.
Aug 12 2021, 8:46 AM
dchagin closed D31472: fork: Touch the registers specific to FreeBSD under the condition..
Aug 12 2021, 8:46 AM
dchagin committed R10:fc37be246021: linux(4): Plug in aarch64 fcntl flags. (authored by dchagin).
linux(4): Plug in aarch64 fcntl flags.
Aug 12 2021, 8:43 AM
dchagin closed D31357: linux(4): Plug in aarch64 fcntl flags..
Aug 12 2021, 8:43 AM
dchagin committed R10:13d79be9950d: linux(4): Implement faccessat2 system call. (authored by dchagin).
linux(4): Implement faccessat2 system call.
Aug 12 2021, 8:42 AM
dchagin committed R10:bee191e46fc2: linux(4): Regen for faccessat2 system call. (authored by dchagin).
linux(4): Regen for faccessat2 system call.
Aug 12 2021, 8:42 AM
dchagin closed D31345: linux(4): Implement faccessat2 system call..
Aug 12 2021, 8:42 AM
dchagin committed R10:6e31bed646c2: linux(4): Fix futex copyrights. (authored by dchagin).
linux(4): Fix futex copyrights.
Aug 12 2021, 8:37 AM
dchagin closed D31347: linux(4): Fix futex copyrights..
Aug 12 2021, 8:36 AM

Aug 11 2021

dchagin updated the diff for D31472: fork: Touch the registers specific to FreeBSD under the condition..

fixed

Aug 11 2021, 12:02 PM
dchagin added a comment to D31472: fork: Touch the registers specific to FreeBSD under the condition..
In D31472#709944, @kib wrote:

All this historical digging makes a nice blog post, I believe.

Aug 11 2021, 7:28 AM

Aug 10 2021

dchagin updated the diff for D31472: fork: Touch the registers specific to FreeBSD under the condition..

add a new sv_cpu_fork hook and call it from cpu_fork() if it initialized.

Aug 10 2021, 7:23 PM
dchagin accepted D31456: [skip ci] unix(4): LOCAL_PEERCRED works on SOCK_SEQPACKET, too..

thanks

Aug 10 2021, 10:53 AM
dchagin added a comment to D31472: fork: Touch the registers specific to FreeBSD under the condition..
In D31472#709712, @kib wrote:

btw, what is the reason to set rdx to 1 here? i couldn't find it

This is quite interesting question, at least it was for me. I had to look at V7 and BSD 4.2 sources to get an idea.

It seems that V7 fork(2) syscall did not returned 0 in the child. Instead, it returned parent pid. In other words, current day idiom pid = fork(); if (pid == 0) {...child...} did not worked in V7. BSD 4.2 decided to make the life of the consumers easier, but keep compatibility with V7. So they started returning the high val set to 1 for child, and 0 for parent. It was probably some variant of SysV that made fork(2) return 0 to child.

I believe this setting of %rdx/%edx is the remnant of that time. You can see that sys_fork() and other syscall wrappers do td->td_retval[1] = 0; for the parent.

Aug 10 2021, 10:30 AM
dchagin updated the diff for D31475: linux(4): Implement clone3 system call..

style, calc size of uca storage and add comment about it

Aug 10 2021, 9:45 AM
dchagin updated the diff for D31481: linux(4): Implement CLONE_CLEAR_SIGHAND option bit..

fixed

Aug 10 2021, 9:23 AM
dchagin added a comment to D31472: fork: Touch the registers specific to FreeBSD under the condition..
In D31472#709638, @kib wrote:

Don't you want per-ABI sv_cpu_fork method then?

Aug 10 2021, 8:53 AM
dchagin added a reviewer for D31488: linux(4): Add LINUX_RATELIMIT_MSG macro for future use.: Linux Emulation.
Aug 10 2021, 8:44 AM
dchagin abandoned D31471: fork: Eliminate a now unused RFLINUXTHPN fork option bit..
In D31471#709637, @kib wrote:

There is a policy called 'ABI stability'. So far we tried to follow it.
Why break this stuff? Yes, there are people who use very old binaries on modern FreeBSD, and it is a value that we provide.

Linuxthreads is/was a native FreeBSD threading library implementing 1:1 threads over FreeBSD processes. It was quite popular to run mysql I believe.
If you want to get rid of support for it, much bigger and more stinky part of it is the 'filedesc leader' stuff (p_fdtol and look from there).

Aug 10 2021, 8:44 AM
dchagin updated the diff for D31481: linux(4): Implement CLONE_CLEAR_SIGHAND option bit..

fixed, CLONE_CLEAR_SIGHAND is designed to reset all signal handlers of the child
not set to SIG_IGN to SIG_DFL.

Aug 10 2021, 8:36 AM
dchagin requested review of D31488: linux(4): Add LINUX_RATELIMIT_MSG macro for future use..
Aug 10 2021, 7:26 AM

Aug 9 2021

dchagin added a reviewer for D31483: linux(4): Return ENOSYS for unsupported clone3 option bits.: Linux Emulation.
Aug 9 2021, 9:54 PM
dchagin added reviewers for D31481: linux(4): Implement CLONE_CLEAR_SIGHAND option bit.: kib, Linux Emulation.
Aug 9 2021, 9:53 PM
dchagin added a reviewer for D31478: linux(4): Add CLONE_PIDFD option bit.: Linux Emulation.
Aug 9 2021, 9:52 PM
dchagin requested review of D31483: linux(4): Return ENOSYS for unsupported clone3 option bits..
Aug 9 2021, 8:18 PM
dchagin requested review of D31481: linux(4): Implement CLONE_CLEAR_SIGHAND option bit..
Aug 9 2021, 7:53 PM
dchagin added a comment to D31471: fork: Eliminate a now unused RFLINUXTHPN fork option bit..

glibc was aware of this flag, but only uses it on osreldate < 802510

https://sources.debian.org/src/glibc/2.31-13/sysdeps/unix/bsd/bsd4.4/kfreebsd/clone.c/?hl=87

Aug 9 2021, 6:17 PM
dchagin requested review of D31478: linux(4): Add CLONE_PIDFD option bit..
Aug 9 2021, 5:05 PM
dchagin added a comment to D31357: linux(4): Plug in aarch64 fcntl flags..

I wonder if we should move the old defines from linux_file.h somewhere under sys/x86/linux/, to prevent future confusion?

Aug 9 2021, 4:27 PM
dchagin added a reviewer for D31475: linux(4): Implement clone3 system call.: Linux Emulation.
Aug 9 2021, 4:14 PM
dchagin added a reviewer for D31474: linux(4): Add struct clone_args for future clone3 system call.: Linux Emulation.
Aug 9 2021, 4:14 PM
dchagin added a reviewer for D31473: linux(4): Change clone syscall definition to match Linux actual one.: Linux Emulation.
Aug 9 2021, 4:14 PM
dchagin requested review of D31475: linux(4): Implement clone3 system call..
Aug 9 2021, 4:13 PM
dchagin requested review of D31474: linux(4): Add struct clone_args for future clone3 system call..
Aug 9 2021, 4:11 PM
dchagin requested review of D31473: linux(4): Change clone syscall definition to match Linux actual one..
Aug 9 2021, 4:09 PM
dchagin added reviewers for D31472: fork: Touch the registers specific to FreeBSD under the condition.: kib, markj, Linux Emulation.
Aug 9 2021, 4:05 PM
dchagin retitled D31471: fork: Eliminate a now unused RFLINUXTHPN fork option bit. from fork: Eleminate a now unused RFLINUXTHPN fork option bit. to fork: Eliminate a now unused RFLINUXTHPN fork option bit..
Aug 9 2021, 4:05 PM
dchagin added reviewers for D31471: fork: Eliminate a now unused RFLINUXTHPN fork option bit.: kib, markj, Linux Emulation.
Aug 9 2021, 4:04 PM
dchagin requested review of D31472: fork: Touch the registers specific to FreeBSD under the condition..
Aug 9 2021, 3:53 PM
dchagin requested review of D31471: fork: Eliminate a now unused RFLINUXTHPN fork option bit..
Aug 9 2021, 3:52 PM