The needdofsync global variable was initialized as true, when it should be false. Fix this.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Aug 8 2023
Jul 28 2023
Fix formatting issue in license text
Jul 21 2023
Jun 28 2023
Move SIG_FOREACH() into an #ifdef _KERNEL.
Fix formatting in HISTORY section thanks to @gbe.
I would like to get this patch committed before the 14.0 freeze in August. I am personally in favor of making these syscalls, but I'd like some notice if we're not going this route.
Add brief comments explaining each of the tfd_jumped macros.
Jun 22 2023
Jun 20 2023
Use cap_svflags instead of cap_flags when determining kernel ABI with syscallabi().
Change NI_LCF_STRICTRELATIVE to NI_LCF_STRICTREL where applicable.
Jun 8 2023
Jun 5 2023
1030 ktrace CAP disallowed system call: execve 1030 ktrace CAP restricted VFS operation: execve 1030 ktrace NAMI "/root/.local/share/cargo/bin/unzip" 1030 ktrace CAP disallowed system call: execve 1030 ktrace CAP restricted VFS operation: execve 1030 ktrace NAMI "/root/.local/share/go/bin/unzip" 1030 ktrace CAP disallowed system call: execve 1030 ktrace CAP restricted VFS operation: execve 1030 ktrace NAMI "/sbin/unzip" 1030 ktrace CAP disallowed system call: execve 1030 ktrace CAP restricted VFS operation: execve 1030 ktrace NAMI "/bin/unzip" 1030 ktrace CAP disallowed system call: execve 1030 ktrace CAP restricted VFS operation: execve 1030 ktrace NAMI "/usr/sbin/unzip" 1030 ktrace CAP disallowed system call: execve 1030 ktrace CAP restricted VFS operation: execve 1030 ktrace NAMI "/usr/bin/unzip" 1030 ktrace CAP restricted VFS operation: execve 1030 ktrace NAMI "/libexec/ld-elf.so.1"
925 ktrace CAP disallowed system call: execve 925 ktrace CAP restricted VFS operation: execve 925 ktrace CAP disallowed system call: execve 925 ktrace CAP restricted VFS operation: execve 925 ktrace CAP disallowed system call: execve 925 ktrace CAP restricted VFS operation: execve 925 ktrace CAP disallowed system call: execve 925 ktrace CAP restricted VFS operation: execve 925 ktrace CAP disallowed system call: execve 925 ktrace CAP restricted VFS operation: execve 925 ktrace CAP disallowed system call: execve 925 ktrace CAP restricted VFS operation: execve 925 ktrace CAP restricted VFS operation: execve 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: readlink 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: open 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir 925 unzip CAP disallowed system call: mkdir
Jun 2 2023
May 22 2023
- tfd_jumped must be set to TFD_CANCELED, not TFD_JUMPED, for timerfd_settime to return ECANCELED.
- style(9) line-break fixes courtesy of @mckusick.
Er? Can you explain? What is confusing for ioctl, and what is intuitive for the syscall interface?
May 21 2023
Why? I do not like it very much. It is not as if all (or most) other individual kernel ops where performed by dedicated syscall entries, so I do not see a good reason to do it there. Ioctl perfectly fits the intent of providing file-specific requests.
- Support TFD_TIMER_CANCEL_ON_SET settime flag using timerfd_jumped().
- Convert ioctl() interface to native syscalls.
May 20 2023
In D40177#914781, @imp wrote:There's a general preference to include sys/_types.h instead of sys/types.h
This differential is superseded by this review:
https://reviews.freebsd.org/D40177
which covers some more include self-containment issues in aarch64.
May 9 2023
In D38459#903657, @val_packett.cool wrote:Hey, couple random notes:
- re: "Developers that wish to support FreeBSD should avoid using timerfd" in the quarterly… :/
- file descriptor handle based APIs are actually kinda better because composability / fd-passing / capability mode friendliness
- FreeBSD invented procdesc(4) soo it's strange that we're not yet striving to turn everything into a file descriptor and Linux has us beat on this…
- also there's no explicit clock selection in EVFILT_TIMER so when we finally add a suspend-aware monotonic clock it would only be possible to explicitly choose suspend-awareness-or-not with timerfd :)
Quick update: I'm nearly finished with my school work for the year, so I've had more time to work on this. I've nearly re-engineered the entire patch and I'm passing ~95% of the epoll-shim timerfd testing suite. I should have a new patch out in the next week (hopefully).
Apr 4 2023
In D38459#896885, @kib wrote:What is the destiny of these patches? Why did you not committed them still?
Mar 30 2023
Use AT_STDIN instead of STDIN_FILENO to force read from stdin in readpassphraseat().
Mar 19 2023
- cdfd is no longer a global variable. Instead, it is passed locally per function call.
- Open _PATH_TTY, limit its rights, and use readpassphraseat() instead of readpassphrase().
- Limit stdio instead of just stdin.
Mar 13 2023
In D39009#888934, @markj wrote:This looks good! Three comments:
- I don't like that cdfd is a global variable. I'd rather see it plumbed everywhere that we pass a path, even though that's kind of onerous.
Mar 11 2023
In D38459#881824, @brooks wrote:BTW, something that will need testing is to verify that the timerfd_gettime and timerfd_settime pseudo syscalls work in capability mode.
Open current directory, enter capability mode, then use *at() syscalls to extract archive files.
Mar 9 2023
Alter function names and comments for clarity
Mar 7 2023
- Remove __FBSDID tag
- Move SYSINIT to avoid forward declaring timerfd_init()
- Correctly check for read blocking in FIONREADioctl case
Mar 6 2023
Fix minor logic error in FIONREAD ioctl case
- Use SYSINIT() to initialize timerfd ino unit number
- Use atomic bitwise operations for file flags in FIONBIO ioctl
- Return 0 when FNONBLOCK is not set in FIONREAD ioctl
Mar 2 2023
- Add generic ioctl() support for FIONBIO and FIONREAD
Mar 1 2023
- M_TIMERFD malloc type is now static
- style(9) fixes
- TFD_GETTIME32 will only be defined on amd64 machines
Feb 23 2023
In D38420#881831, @bz wrote:EAFNOTSUP; sorry, I'll try to give it a try within 48 hours. @jfree can you do drm testing?
- Use SV_CURPROC_FLAG() to determine if TFD_GETTIME32 compatibility instructions should be executed.
Feb 22 2023
- Use _IOC_NEWTYPE() for COMPAT32 ioctls().
- Correct COMPAT32 pointer mistakes in struct timerfd_settime_args32
- tfdino_unr is now global static for unique ino generation
- struct itimerspec32 is now uint32_t in timerfd_settime_args32
- memset() itimerspec32s with zeros to avoid data leakage
- Remove DTYPE_TIMERFD checks for tfd fops.
- Various style(9) fixes
Feb 20 2023
- Add tfd_ino field to struct timerfd for inode identification.
Pass timerfd_settime_args into TFD_SETTIME ioctl() to minimize kernel entries.
Use timerfd_settime_user() to copyin timerfd_settime_args members.
Feb 19 2023
Feb 18 2023
The TFD_SETTIME ioctl() now returns old_time in an effort to avoid race conditions between threads using the same timerfd fd. This reduces the number of kernel traps from 3 to 2 in timerfd_settime().
Sorry, a cut-and-paste error made that make no sense. My initial worry was about TFD_GETTIME and TFD_SETTIME, but actually it's both. Consider the following scenario:
thread0 thread1 TFD_GETTIME TFD_SETFLAGS TFD_GETTIME TFD_SETFLAGS TFD_SETTIME TFD_SETTIMEI'm not sure how important it is to prevent this problem in practice, but multiple system calls seem to make problems more likely.
Feb 17 2023
Change file license from BSD-2-Clause-FreeBSD to BSD-2-Clause
- Add fo_stat implementation for timerfd
- ifdef _kernel TFD compat32 ioctl() macros
In D38460#879425, @brooks wrote:Is the race between TFD_GETTIME and TFD_SETTIME in timerfd_settime acceptable? I wonder if TFD_SETFLAGS should be _IOWR and always return the previous value.
Feb 16 2023
- Remove unnecessary headers
- Fix style(9) formatting