Age | Commit message (Collapse) | Author |
|
ensure that any other thread currently trying to acquire the underlying
vnode lock has observed that the same vnode is about to be exclusively
locked. Such threads must then sleep until the exclusive lock has been
released and then try to acquire the lock again. Otherwise, exclusive
access to the vnode cannot be guaranteed.
Thanks to naddy@ and visa@ for testing; ok visa@
Reported-by: syzbot+374d0e7e2400004957f7@syzkaller.appspotmail.com
|
|
Needed for future slaacd(8) improvements
OK florian@ deraadt@
|
|
The DST and TIMEZONE options(4) are incompatible with KARL, so we need
some other way to compensate for an RTC running with a known offset.
Enter kern.utc_offset, an offset in minutes East of UTC. TIMEZONE has
always been minutes West, but this is inconsistent with how everyone
else talks about timezones, hence the flip.
TIMEZONE has the advantage of being compiled into the binary. Our new
sysctl(2) has no such luck, so it needs to be set as early as possible
in boot, from sysctl.conf(5), so we can correct the kernel clock from
the RTC's local time to UTC before daemons like ntpd(8) and cron(8)
start. To encourage this, kern.utc_offset is made immutable after the
securelevel(7) is raised to 1.
Prompted by yasuoka@. Discussed with deraadt@, kettenis@, yasuoka@.
Additional testing by yasuoka@.
ok deraadt@, yasuoka@
|
|
|
|
accounting. Prevents a race where the acct thread and the acct(2)
syscall both tries to close a vnode.
ok visa@
Reported-by: syzbot+bf2ac4d4fa9ee92903b8@syzkaller.appspotmail.com
|
|
|
|
which is not allowed without holding the kernel lock. Otherwise, wakeups
could be lost.
Reported-by: syzbot+57588681ca9e3e9ba926@syzkaller.appspotmail.com
|
|
|
|
VOP_GETATTR() must still be serialized using the kernel lock since the
underlying file system implementation is not MP-safe.
no objection from deraadt@ and ok mpi@ visa@
|
|
the system call. Better use namei pool like sys___realpath() does.
OK semarie@ deraadt@
|
|
it from the pool.
ok bluhm visa
|
|
|
|
directory was written as "//". If there is no non-slash character
in the path name, use the spacial case for root.
found by gmake regression tests; OK naddy@ benno@
|
|
If parent and lookup vnode are equal, namei(9) locks them once but
reference counts twice.
from Moritz Buhl
|
|
|
|
serializing both read/write operations using the existing file mutex.
The vnode lock still grants exclusive write access to the offset; the
mutex is only used to make the actual write atomic and prevent any
concurrent reader from observing intermediate values.
ok mpi@ visa@
|
|
if the parent and the lookup vnode are equal, namei(9) reference
counts both. So release the parent vnode uncoditionally.
OK visa@
|
|
|
|
files into the common namei.h header.
OK deraadt@
|
|
Loongson runs at 128hz. 128 doesn't divide evenly into a million,
but it does divide evenly into a billion. So if we do the per-process
itimer bookkeeping with itimerspec structs we can have error-free
virtual itimers on loongson just as we do on most other platforms.
This change doesn't fix the virtual itimer error alpha, as 1024 does not
divide evenly into a billion. But this doesn't make the situation any
worse, either.
ok deraadt@
|
|
case even if *vpp == vdp. So in unveil_find_cover() it is wrong
to skip dereferencing if parent == vp. This fixes an umount(8)
device busy error when unveil(2) and chroot(2) are used together
on a file system.
reported by Matthias Pitzl; OK deraadt@
|
|
|
|
unveil(2) on a nonexisting file failed. Ignore files that cannot
be created due to permissions.
OK deraadt@
|
|
implemented in kern_unveil.c.
OK deraadt@
|
|
|
|
that are hidden by unveil(2).
OK deraadt@
|
|
|
|
allowing the file offset to change. This is part of the ongoing effort
to protect the file offset using the vnode lock.
ok mpi@ visa@
|
|
It should return ENOENT in this case, but was returning EINVAL.
ok bluhm@ deraadt@
|
|
return expression.
|
|
sleeping, allowing the file offset to change. This is part of the
ongoing effort to protect the file offset using the vnode lock.
ok mpi@ visa@
|
|
can also be retrieved with getsockopt(3)
it looks like these will also be in the next issue of posix:
http://austingroupbugs.net/view.php?id=840#c2263
ok claudio@, sthen@
|
|
existing vnode lock to protect writes to the f_offset field of struct
file. As opposed of introducing a new lock which turned out to be harder
than anticipated.
ok mpi@ visa@
|
|
From Christian Ludwig <christian_ludwig at genua dot de>
ok visa@
|
|
operations get stuck while holding the net lock. Increasing the
limit did not help as there was no wakeup of the waiting pools. So
introduce pool_wakeup() and run through the mbuf pool request list
when the limit changes.
OK dlg@ visa@
|
|
|
|
|
|
All callers sleep indefinitely.
With help from visa@.
ok visa@, ratchov@, kn@
|
|
- display timeouts in the thread work queue, if any
- identify timeouts in the thread/softint work queue as such
- if not in work queue, print <bucket>/<level>; easier to right-align
- print arg pointer by hand to ensure consistent length for all pointers
on both 32 and 64-bit platforms
- generally make sure columns are correctly aligned and spaced
ok mpi@ visa@
|
|
Account for VOP_LOOKUP(9) returning EROFS, otherwise unveil(2) would
pass the error along and fail.
Initial report and diff from semarie
OK bluhm millert
|
|
|
|
message with mtype < 1.
from Moritz Buhl; OK kn@
|
|
limits. Convert kernel variables and calculations for mbuf memory
into long to allow larger values on 64 bit machines. Put a range
check into the kernel sysctl. For the interface itself int is still
sufficient. In netstat -m cast all multiplications to unsigned
long to hold the product of two unsigned int.
input and OK visa@
|
|
rename pipclose() to pipe_destroy(), and return early instead of having the whole code in if-body.
ok claudio@ anton@ visa@ mpi@
|
|
rw_init/rw_init_flags and rwlock(9).
ok visa@ anton@ mpi@
|
|
Changing the scheduling priority of a process happens rarely, so it isn't
strictly necessary to update the current priority of every threads
instantly.
Moreover resched_proc() isn't well suited to perform this action: it doesn't
consider the state of each thread nor move them to another runqueue.
ok visa@
|
|
|
|
to not succeed on final path components that do not exist.
The original implmentation succeeded in these cases.
ok bluhm@
|
|
OK mpi@ visa@
|
|
- in dopipe(), get an already zeroed struct (PR_ZERO) instead of manually initialize each member (in pipe_create)
- rename pipespace() and pipe_free_kmem() to pipe_buffer_realloc() and pipe_buffer_free(): it is more evident that the functions works on the same thing
- in pipe_buffer_free(), return early and move the if-body as function body
No functional change intented.
ok anton@ visa@ mpi@
|