#
62849eef |
| 11-Feb-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: split fget_unlocked_seq depending on CAPABILITIES
This will simplify an upcoming change.
|
#
b937908e |
| 11-Feb-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: split fget_cap depending on CAPABILITIES
This will simplify an upcoming change.
|
#
300cfb96 |
| 08-Feb-2022 |
Mark Johnston <markj@FreeBSD.org> |
file: Make fget*() and getvnode*() consistent about initializing *fpp
Most fget*() functions initialize the output parameter to NULL. Make the externally visible interface behave consistently, and
file: Make fget*() and getvnode*() consistent about initializing *fpp
Most fget*() functions initialize the output parameter to NULL. Make the externally visible interface behave consistently, and make fget_unlocked_seq() private to kern_descrip.c.
This fixes at least one bug in a consumer, _filemon_wrapper_openat(), which assumes that getvnode() sets the output file pointer to NULL upon an error.
Reported by: syzbot+01c0459408f896a5933a@syzkaller.appspotmail.com Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34190
show more ...
|
#
36bd49ac |
| 16-Dec-2021 |
Mark Johnston <markj@FreeBSD.org> |
fd: Avoid truncating output buffers for KERN_PROC_{CWD,FILEDESC}
These sysctls failed to return an error if the caller had provided too short an output buffer. Change them to return ENOMEM instead,
fd: Avoid truncating output buffers for KERN_PROC_{CWD,FILEDESC}
These sysctls failed to return an error if the caller had provided too short an output buffer. Change them to return ENOMEM instead, to ensure that callers can detect truncation in the face of a concurrently changing fd table.
PR: 228432 Discussed with: cem, jhb MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D15607
show more ...
|
#
327060bd |
| 16-Dec-2021 |
Mark Johnston <markj@FreeBSD.org> |
fd: Initialize more export_fd_buf fields in kern_proc_cwd_out()
In particular, we need to initialize efbuf->flags, since export_vnode_to_sb() loads that field. This was mostly harmless since the fl
fd: Initialize more export_fd_buf fields in kern_proc_cwd_out()
In particular, we need to initialize efbuf->flags, since export_vnode_to_sb() loads that field. This was mostly harmless since the flag only determines whether the output kinfo_file is packed, and KERN_PROC_CWD only ever emits a single kinfo_file anyway.
MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
show more ...
|
#
794d3e8e |
| 05-Dec-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
fcntl(2): add F_KINFO operation
that returns struct kinfo_file for the given file descriptor. Among other data, it also returns kf_path, if file op was able to restore file path.
Reviewed by: jhb,
fcntl(2): add F_KINFO operation
that returns struct kinfo_file for the given file descriptor. Among other data, it also returns kf_path, if file op was able to restore file path.
Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33277
show more ...
|
#
6e51d61a |
| 06-Dec-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add declaration for static export_file_to_kinfo()
Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33277
|
Revision tags: release/12.3.0 |
|
#
6eefabd4 |
| 22-Nov-2021 |
Brooks Davis <brooks@FreeBSD.org> |
syscalls: improve nstat, nfstat, nlstat
Optionally return errors when truncating dev_t, ino_t, and nlink_t. In the interest of code reuse, use freebsd11_cvtstat() to perform the truncation and error
syscalls: improve nstat, nfstat, nlstat
Optionally return errors when truncating dev_t, ino_t, and nlink_t. In the interest of code reuse, use freebsd11_cvtstat() to perform the truncation and error handling and then convert the resulting struct freebsd11_stat to struct nstat.
Add missing freebsd32 compat syscalls. These syscalls require translation because struct nstat contains four instances of struct timespec which in turn contains a time_t and a long.
Reviewed by: kib
show more ...
|
#
be10c0a9 |
| 03-Nov-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
fexecve(2): allow O_PATH file descriptors opened without O_EXEC
This improves compatibility with Linux.
Noted by: Drew DeVault <sir@cmpwn.com> Reviewed by: markj Sponsored by: The FreeBSD Foundatio
fexecve(2): allow O_PATH file descriptors opened without O_EXEC
This improves compatibility with Linux.
Noted by: Drew DeVault <sir@cmpwn.com> Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32821
show more ...
|
#
7dd419ca |
| 26-Sep-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
cache: add empty path support
This avoids spurious drop offs as EMPTY is passed regardless of the actual path name.
Pushign the work inside the lookup instead of just ignorign the flag allows avoid
cache: add empty path support
This avoids spurious drop offs as EMPTY is passed regardless of the actual path name.
Pushign the work inside the lookup instead of just ignorign the flag allows avoid checking for empty pathname for all other lookups.
show more ...
|
#
2b68eb8e |
| 02-Oct-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: remove thread argument from VOP_STAT
and fo_stat.
|
#
a0558fe9 |
| 28-Apr-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
Retire code added to support CloudABI
CloudABI was removed in cf0ee8738e31aa9e6fbf4dca4dac56d89226a71a
|
#
85c855d3 |
| 30-Sep-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: add pwd_hold_proc
|
#
d71e1a88 |
| 25-Sep-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
fifo: support flock
This evens it up with Linux.
Original patch by: Greg V <greg@unrelenting.technology> Differential Revision: https://reviews.freebsd.org/D24255#565302
|
#
7326e858 |
| 28-Aug-2021 |
Mark Johnston <markj@FreeBSD.org> |
fsetown: Avoid process group lock recursion
Restore the pre-1d874ba4f8ba behaviour of disassociating the current SIGIO recipient before looking up the specified process or process group. This avoid
fsetown: Avoid process group lock recursion
Restore the pre-1d874ba4f8ba behaviour of disassociating the current SIGIO recipient before looking up the specified process or process group. This avoids a lock recursion in the scenario where a process group is configured to receive SIGIO for an fd when it has already been so configured.
Reported by: pho Tested by: pho Reviewed by: kib MFC after: 3 days
show more ...
|
#
a507a40f |
| 25-Aug-2021 |
Mark Johnston <markj@FreeBSD.org> |
fsetown: Simplify error handling
No functional change intended.
Suggested by: kib Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.free
fsetown: Simplify error handling
No functional change intended.
Suggested by: kib Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31671
show more ...
|
#
1d874ba4 |
| 25-Aug-2021 |
Mark Johnston <markj@FreeBSD.org> |
fsetown: Fix process lookup bugs
- pget()/pfind() will acquire the PID hash bucket locks, which are sleepable sx locks, but this means that the sigio mutex cannot be held while calling these fun
fsetown: Fix process lookup bugs
- pget()/pfind() will acquire the PID hash bucket locks, which are sleepable sx locks, but this means that the sigio mutex cannot be held while calling these functions. Instead, use pget() to hold the process, after which we lock the sigio and proc locks, respectively. - funsetownlst() assumes that processes cannot be registered for SIGIO once they have P_WEXIT set. However, pfind() will happily return exiting processes, breaking the invariant. Add an explicit check for P_WEXIT in fsetown() to fix this. [1]
Fixes: f52979098d3c ("Fix a pair of races in SIGIO registration") Reported by: syzkaller [1] Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31661
show more ...
|
#
0dcef81d |
| 23-Jul-2021 |
Mark Johnston <markj@FreeBSD.org> |
Add required sysctl name length checks to various handlers
Reported by: KMSAN MFC after: 1 week Sponsored by: The FreeBSD Foundation
|
#
9bfddb3a |
| 27-May-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: use PROC_WAIT_UNLOCKED when clearing p_fd/p_pd
|
#
1762f674 |
| 15-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
ktrace: pack all ktrace parameters into allocated structure ktr_io_params
Ref-count the ktr_io_params structure instead of vnode/cred.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Fo
ktrace: pack all ktrace parameters into allocated structure ktr_io_params
Ref-count the ktr_io_params structure instead of vnode/cred.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30257
show more ...
|
#
70c05850 |
| 15-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
kern_descrip.c: Style
Wrap too long lines.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30257
|
Revision tags: release/13.0.0 |
|
#
bbf7a4e8 |
| 07-Apr-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
O_PATH: allow vnode kevent filter on such files
if VREAD access is checked as allowed during open
Requested by: wulf Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after
O_PATH: allow vnode kevent filter on such files
if VREAD access is checked as allowed during open
Requested by: wulf Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29323
show more ...
|
#
a5970a52 |
| 03-Apr-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Make files opened with O_PATH to not block non-forced unmount
by only keeping hold count on the vnode, instead of the use count.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundati
Make files opened with O_PATH to not block non-forced unmount
by only keeping hold count on the vnode, instead of the use count.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29323
show more ...
|
#
8d9ed174 |
| 18-Mar-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
open(2): Implement O_PATH
Reviewed by: markj Tested by: pho Discussed with: walker.aj325_gmail.com, wulf Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews
open(2): Implement O_PATH
Reviewed by: markj Tested by: pho Discussed with: walker.aj325_gmail.com, wulf Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29323
show more ...
|
#
42be0a7b |
| 18-Mar-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Style.
Add missed spaces, wrap long lines.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29323
|