setting vnode sizes, is handled elsewhere: file system vnode creation
or spec_open() for regular files or block special files, respectively.
Add a call to VOP_MMAP() to the pagedvn exec path, since the vnode
is being memory mapped.
reviewed by tech-kern & wrstuden
following test cases were fixed if a driver tries to register a driver
with sysmon_envsys_register() and the following items appear:
- Sensor with empty description.
- Sensor with state that doesn't match any of ENVSYS_SFOO.
- Sensor with units type that doesn't match any of ENVSYS_FOO.
it has supplied us). If we fault pages which are at offset >= server
size, but less than the in-kernel vnode size, inform the file server
of the latest developments in file size before issueing the fault.
The avoids confusion with files which are not written start to finish.
fixes kern/36429 by yamt
- There must be three mandatory objects in a sensor to be valid and be
enabled on its dictionary: units, state and desc. If any of these
objects fails for some reason, its dictionary won't created in the
array and sensor will be marked with ENVSYS_FNOTVALID in edata->flags.
That means there won't never be a partial dictionary.
- Mark all invalid sensors and sensors with duplicate description with
ENVSYS_FNOTVALID and remove ENVSYS_FDUPDESC. The former is the generic
way to say that a sensor does not obey the rules and must be not
created.
- sysmon_envsys_createplist: if the array does not contain any object,
release the array and return the error.
And with all that stuff I can go to holidays and be happy.
instead of the result from getcwd(). The works around locking
panics caused by namei calling VOP_READLINK while holding on to a
directory lock and getcwd() trying to acquire that lock. The real
fix would be to get rid of getcwd() calls within VOPs (not locking
safe), but that's not a viable option in the netbsd-4 timeframe.
Suggestion for workaround from David Holland.
in PR port-alpha/36628:
- make jensenio_eisa_maxslots() return 8 (instead of 16) since
EISA config for slot 8-15 on jensen could return invalid values
- pass eisa_chipset_tag_t to eisa_init() and check eisa_maxslots()
on probing EISA config space
- pass M_ZERO to malloc(9) and make sure malloc(9) doesn't fail
- fix typo in a debug printf, add more debug printfs, and
use #ifdef EISA_DEBUG to enable them
- cast uint8_t value to uint32_t before shift more than 8 bits
- check buffer region on reading compressed data from EISA config space
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().