found, rather maintain a global counter for all sensors that are unique,
and use this global to get the correct index in the array.
- Use prop_array_set() rather than prop_array_add() for adding dictionaries
into our global array. Thanks to yamt@.
- Overwrite the sensor index in the first sensor of a device, to avoid
a problem with LKMs where the first sensor gets the index of all edata
structures allocated in kernel.
- Add missing proto for sme_register_sensorname().
All them fix another part of yamt@'s PR.
there are no more events.
- Add sme_event_unregister_all() to remove all events associated with
a device and use it in sysmon_envsys_unregister() to fix a "use-after-free".
- Check return error of sme_sensor_upfoo() in sme_make_dictionary() and
return it rather than 0 all the time.
- Add more KASSERTS.
with new kern/kern_cctr.c in TODO comments
- also replace struct cc_microtime_state member in struct cpu_info
with struct cctr_state defined in <sys/cctr.h>, which is unused yet
in this port
- sme_register_sensorname: there's no need to handle empty list case.
- 'obj' argument in sme_sensor_upstring and similar functions is useless:
removed the obj argument from the functions, it's handled in the function
itself now.
- check for more errors in sme_make_dictionary() and
sysmon_envsys_createplist().
- use todr(9) API with MI mc146818(4) driver and remove homegrown
todr stuff from MD alpha/clock.c and alpha/mcclock.c
- also remove obsolete cc_microtime stuff from MD code
- add ci_pcc_freq member in struct cpu_info for cpu_frequency(), and
calibrate it with mc146818 interval clock in mcclock attachment
- call cc_init() in cpu_initclocks(9) because all alpha cpus have
a pcc counter
Tested on DEC 3000/300 and AlphaPC 164, but not on any SMP machines yet.
timecounter(9) support functions split out from sys/arch/x86/x86/tsc.c.
Written by and ok'ed to commit by kardel@.
Also add <sys/cctr.h>, which is copied from #ifdef __HAVE_TIMECOUNTER
part of <sys/cc_microtime.h> to migrate MI kern_cctr.c per each port.
> Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc). Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise. Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.
This should be pulled up to netbsd-4 too.
after cpu_configure(9) for now because softintr(9) is initialized
in cpu_configure(9) on some ports.
Ok'ed by ad@ on current-users, and fixes hangs on m68k ports
during scsi probe.
insufficient check of snprintf()'s return value, see gentoo bug #184815.
The exploit provided appearently doesn't trigger the overflow in
NetBSD; this might be due to different error return behavior of snprintf
implementations, or due to the fact that out tcpdump is still 3.8.3
while the bug was reported against 3.9.x. The fix looks correct in any
case.
The exploit caused an endless loop at another place instead, due
to an obvious bug, so fix this too.
Also apply another patch which was applied to the 3.8 branch upstream
but never released: rev. 1.72.2.5, infinite loop protection for ldp and bgp
We should update tcpdump to 3.9.x.