struct proc: change ps_start from utc time to uptime
Allows us to determine how long a process has been running, even if the
UTC clock jumps.
With help from bluhm@ and millert@, who squashed several bugs.
ok bluhm@ millert@
put bpfdesc reference counting back, revert change introduced in 1.175 as:
BPF: remove redundant reference counting of filedescriptors
Anton@ made problem crystal clear:
I've been looking into a similar bpf panic reported by syzkaller,
which looks somewhat related. The one reported by syzkaller is caused
by issuing ioctl(SIOCIFDESTROY) on the interface which the packet filter
is attached to. This will in turn invoke the following functions
expressed as an inverted stacktrace:
Note that bpfclose() is called before changing the vnode type. In
bpfclose(), the `struct bpf_d` is immediately removed from the global
bpf_d_list list and might end up sleeping inside taskq_barrier(systq).
Since the bpf file descriptor (fd) is still present and valid, another
thread could perform an ioctl() on the fd only to fault since
bpfilter_lookup() will return NULL. The vnode is not locked in this path
either so it won't end up waiting on the ongoing vclean().
[13 lines not shown]
On newer ThinkPads reporting HKEY version > 1, don't claim wscons
backlight controls so that acpivout can. This allows using all of
the fine-grained backlight BCL steps defined in ACPI (usually 100)
instead of the dozen or so available through acpithinkpad's
proprietary ACPI or CMOS interfaces.
This is also needed for future amdgpu work.
When incrementing or decrementing screen brightness, don't just
adjust by 1 BCL level as there may be 100 levels. Find the next
brightness level that is at least 5% up or down and use that.
For more archs, ld.so itself only needs/uses the arch's "just add load offset"
'relative' relocation. Take advantage of that to simplify ld.so's self-reloc
* give the exceptional archs (hppa and mips64) copies of the current boot.c
* teach the Makefile to use boot_md.c when present
* reduce boot.c down to the minimum necessary to handle just relative reloc
* teach the Makefile to fail if the built ld.so has other types of relocs
ok visa@ kettenis@
Don't check that the ipv6 source address of a neighbor advertisment is
from a neighbor's address. Sthen@ dug out RFC 4861 4.4 that says that
the source address is "An address assigned to the interface from which
the advertisement is sent." -- which can be from a network that the
receiver does not know about. Indeed my provider sends such a neighbor
advertisment for my default gateway, which breaks my uplink.
Claudio@ added this check for symetry with NetBSD code when he added
the same check to nd6_ns_input(), where it is needed to fix
CVE-2008-2476. See also OpenBSD 4.2 errata 15.
ok claudio@, kn@