Age | Commit message (Collapse) | Author |
|
To protect the timehands we first need to protect the basis for all UTC
time in the kernel: the boottime.
Because the boottime can be changed at any time it needs to be versioned
along with the other members of the timehands to enable safe lockless reads
when using it for anything. So the global boottime timespec goes away and
the static boottimebin becomes a member of the timehands. Instead of reading
the global boottime you use one of two interfaces: binboottime(9) or
microboottime(9). nanoboottime(9) can trivially be added later, though there
are no consumers for it at the moment.
This introduces one small change in behavior. We used to advance the
reported boottime just before launching kernel threads from main().
This makes it look to userland like we "booted" moments before those
threads were launched. Because there is no longer a boottime global we
can no longer trivially do this from main(), so the boottime we report
to userspace via e.g. kern.boottime will now reflect whatever the time
was when we bootstrapped the timehands via inittodr(9). This is usually
no more than a minute before the kernel threads are launched from main().
The prior behavior can be restored by adding a new interface to the
timecounter layer in a future commit.
Based on FreeBSD r303387.
Discussed with mpi@ and visa@.
ok visa@
|
|
client could crash the server.
OK tedu@
|
|
m_leadingspace() and m_trailingspace(). Convert all callers to call
directly the functions and remove the defines.
OK krw@, mpi@
|
|
of mounted on directories.
OK guenther@, mpi@
|
|
unlocking the directory vnode.
OK mpi@, helg@
|
|
unnecessary because curproc always does the locking.
OK mpi@
|
|
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.
OK mpi@, deraadt@
|
|
ok millert@ krw@
|
|
"good work" deraadt@, ok visa@
|
|
ok mpi@ deraadt@
|
|
stale reference and lock, while it shouldn't hold either.
"makes sense to me" beck@
|
|
1) turn NDINITAT into a function and make the macros point to it
with the later goal of getting rid of them.
2) Sweep the kernel for places where people make a struct nameidata manually
on the stack and fill in what they hope are the required fields and count
on prayer and clean living to always get them right. Instead use NDINIT
everywhere. NFS was especially bad for this and there have likely
been things lurking there for a while.
3) Add a couple of strategic KASSERT's to catch future offenders.
ok krw@ sthen@ deraadt@
|
|
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
because the nfsm_strsiz() macro sneakily modifies a parameter!
ok beck
|
|
ok stsp mpi
|
|
logic from the rest of the kernel that deals with filename
lookups.
In snaps for some time.
Initially found by jsg@
Prodded by deraadt@
|
|
ok guenther@ miod@
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt
|
|
free. Change rbuf malloc argument to fullsiz, which then makes clear it's
the correct size to pass to free. ok millert
|
|
|
|
|
|
after discussions with beck deraadt kettenis.
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
reads.
ok deraadt@ guenther@
|
|
members to 64bit types. Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments. Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir. Build perl with -DBIG_TIME.
Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.
DANGER: ABI incompatibility. Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.
Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@
|
|
ok matthew@ deraadt@
|
|
error in several places.
Should fix the "vrele: null vp" panic that henning@ has been seeing lately.
ok tedu@, krw@, deraadt@
|
|
OK oga@, beck@, matthew@
|
|
Feedback from miod@ and kettenis@.
ok beck@
|
|
no binary change apart from nfsm_reqhead() which is clearly correct.
ok thib@
|
|
already been freed, thus make the callers of nfs_namei() bail out early,
instead of jumping to nfsmout as there they will try to vrele() vnodes
that don't exists (NULL pointers) and free the pathname buffer.
this is way nicer then adding checks after the nfsmout label.
OK blambert@
|
|
ok thib@
|
|
ok thib@
|
|
use mbufs directly, but the shiny new nfsm_info struct
ok thib@
|
|
- Prevent a double vrele() by setting the vnode pointer to NULL.
- Check if vnode pointers have been set to NULL before trying to
vrele().
- don't double free the component path name buffer.
- Add a workaround for multiple vnode pointers all pointing to the
same vnode and the code doing vrele() on all of them, leading to
botched refcounts. This is a horrible hack, but a real fix is being
worked on.
OK blambert@
|
|
error = operation();
memory = malloc();
if (error) free(memory);
gets relegated to the dustbin of history
ok thib@
|
|
but extensive performance benchmarking done by myself and jasper@
has shown that it doesn't help, at all - even on vaxens and in some
cases it makes things significantly slower.
"this excites me sexually" jetpack@
Tested by jasper@.
OK blambert@
|
|
loop over allocating a chain of mbufs to store <= NFS_MAXPATHLEN
bytes.
Clean up some variables, which thib@ likes.
ok thib@
|
|
memory = malloc();
if (error) free(memory);
makes no sense; move error checking to above memory allocation
ok thib@
|
|
from it.
This can cause us to follow garbage in the nfsd loop, causing two kinds of hell.
problem noticed by nicm@. OK blambert@.
|
|
to keep the data munging "state" into an nfsm_info structure. Each
function now has this structure on its stack, and it and its members
are now passed around so that the macros/functions can work there magic.
this will make removing the nfsm_* macros way easier.
Idea/code picked up from DragonflyBSD.
Tested by krw@, jacekm@ and myself.
OK blambert@.
|
|
OK blambert@
|
|
some error cases
ok thib@
|
|
actually get us anything.
ok thib@
|
|
ok thib@
|
|
"get it in" thib@
|
|
|
|
|
|
Diff from FreeBSD.
OK blambert@
|