ps(1) to print incorrect information. Annotate the flags in the header files
to make sure that flags are not being re-used and move flags so that there
are no conflicts.
- unify two copies of code to extend a chain.
- when extending a chain,
- use trailing space of the last mbuf if any.
- use mbuf cluster if appropriate.
release the lock and exit.
It could be argued that we only ever call the function with strp being
valid so the test isn't needed, but that requires the caller not to change,
or be altered/broken.
Fixes Coverity CID 2357, strp deferenced before NULL check.
systems will never, ever need this -- because they use 8k/1k or even,
these days, 16k/2k or 32k/4k filesystems. On the other hand, when you
do need this, you *really* need it: on anoncvs.netbsd.org, for instance,
where /tmp is 4k/512 and the filesystem contains tens or even hundreds
of thousands of single-frag directories, this essentially doubles the
efficiency of the allocator. Since the overhead of keeping one extra
pool around is minimal, just add it by default.
to vslock(9). This prevents a local DOS.
(The checks against system and user limits for wired
memory should be centralized in UVM; for now prefer a less
invasive fix which can be pulled pulled up into releases.)
COMPAT_NETBSD32. They haven't worked for 5 years.
Silently agreed by the tech-kern readers.
XXX sparc64 MD glue still lacking.
XXX The FPU registers on i386 are not dumped correctly, according to my
XXX tests. It shouldn't be much work for someone who has the slightest
XXX idea of how that stuff is supposed to be laid out on i386.
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.
addresses, use a uint32_t counter and the machinery to properly use it.
That makes the ksem_* system calls friendly for COMPAT_NETBSD32.
OK'd by thorpej@.
- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
1: I can understand it, and
2: It works.
Notable externally-visible changes are that POOL_SUBPAGE now has to be a
compile-time constant, and that trying to initialise a pool whose objects are
larger than POOL_SUBPAGE automatically generates a pool that doesn't use
subpages.
NetBSD/acorn26 now boots multi-user again.
- Always look for labels in the first two sectors
- Update all existing labels, but only write new labels to netbsd mbr
partitions, and the first/second sector of disks that don't have an mbr.
Moving disks between systems still sucks bigtime!
- raw patition is either c or d, if d then c is reserved
- max partitions might be 8 or 16, nothing in the label gives the maximum
- endianness
the time pool_get() calls pool_catchup(), pp has been free'd but it is still
in the "entered" state. The chain pool_catchup() -> pool_allocator_alloc()
-> pool_reclaim() on pp fails because pp is still in the "entered" state.
Call pr_leave() before calling calling pool_catchup() to avoid this.
Thanks for the excellent analysis!
Be more flexible in what we accept as a valid LINTSTUB directive.
Don't abort on first error.
Separate LINTSTUB comments look ugly if the function/variable already
has a descriptive comment. People don't like to write ugly code.
Now one can write:
/*
* LINTSTUB: Func: type function(args)
* Some descriptive comment about the function.
*/
buffer when the passed nested buffer has no B_ERROR flag set but not all
was transfered for the nested iobuf extent.
Discussed on tech-kern and ok'd by Takashi
otherwise generate an UVM trap or will access random memory. This is due to
the dereference of vp->v_specmountpoint that is really
vp->v_specinfo->si_mountpoint. The field v_specinfo is multiplexed with
other structs in the vun union in struct vnode like struct socket.
The patch adds a sanity check for accessing the specinfo fields by only
allowing VBLK nodes to be passed. In theory also VCHR could be valid since
its also a special node though mounting is only done on VBLK so be strict.
Ok'd by yamt.
- for structure fields that are conditionally present,
make those fields always present.
- for functions which are conditionally inline, make them never inline.
- remove some other functions which are conditionally defined but
don't actually do anything anymore.
- make a lock-debugging function conditional on only LOCKDEBUG.
as discussed on tech-kern some time back.
for each fork-wait cycles.
- updatepri: factor out the code to decay estcpu so that it can be used
by scheduler_wait_hook.
- scheduler_fork_hook: record how much estcpu is inherited from
the parent process.
- scheduler_wait_hook: don't add back inherited estcpu to the parent.
otherwise, once the corresponding bit in the inode bitmap is cleared,
an unrelated inode with the same inode number can be allocated and
ufs_ihashget() picks a stale in-core vnode for it.
PR/32301 by Matthias Scheler.
- pool_allocator_alloc: drain ourselves as well,
so that pool_cache on us is drained as well.
- pool_cache_put_paddr: destruct objects if underlying pool is starved.
- pool_get: on kva starvation, wake up once a second and try again.
Fixes:
PR/32287: Processes hang in "mclpl"
PR/32330: shark kernel hangs under memory load.
- don't compare a scaled value with a unscaled value.
- actually, 7 times the loadfactor is necessary to decay p_estcpu enough,
even before the recent p_estcpu changes.
after the recent p_estcpu change, 8 times loadavg decay is needed.
- fix a comment to match with the recent reality.
It breaks the code that generates a default label (with partition 'a'
covering the entire volume - which is what everything expects) for disks that
don't have a NetBSD label nor an MBR, but do have a single filesytem covering
the entire volume.
return NULL even though no disklabel was found making callers assume that a
valid disklabel WAS found but instead were presented by the dummy disklabel
that is created.
If the rval is SCAN_CONTINUE it now returns a standard error that no
disklabel was found instead of the NULL.
shortcut to the process of the passed lwp paniced the kernel since lwp
could/can be passwd as NULL in VOP_WRITE().
This was happening when ktracing to NFS. The function ktrwrite() set the
uio_lwp to NULL and then calls VOP_WRITE() with this argument. nfs_write()
then accessed lwp *l->l_proc wich paniced.
Thanks to David Laight for his help on tracking it down.