Revert r327828, r327949, r327953, r328016-r328026, r328041:Uses of mallocarray(9).The use of mallocarray(9) has rocketed the required swap to build FreeBSD.This is likely caused by the allocation
Revert r327828, r327949, r327953, r328016-r328026, r328041:Uses of mallocarray(9).The use of mallocarray(9) has rocketed the required swap to build FreeBSD.This is likely caused by the allocation size attributes which put extra pressureon the compiler.Given that most of these checks are superfluous we have to choose betterwhere to use mallocarray(9). We still have more uses of mallocarray(9) buthopefully this is enough to bring swap usage to a reasonable level.Reported by: woschPR: 225197
show more ...
dev: make some use of mallocarray(9).Focus on code where we are doing multiplications within malloc(9). None ofthese is likely to overflow, however the change is still useful as somestatic checke
dev: make some use of mallocarray(9).Focus on code where we are doing multiplications within malloc(9). None ofthese is likely to overflow, however the change is still useful as somestatic checkers can benefit from the allocation attributes we use formallocarray.This initial sweep only covers malloc(9) calls with M_NOWAIT. No goodreason but I started doing the changes before r327796 and at that time itwas convenient to make sure the sorrounding code could handle NULL values.
Fix possible panic when creating VirtIO console dev aliasesSince we have no control over the name, the MAKEDEV_CHECKNAME flag must beused to return an error on an invalid (to devfs) name instead o
Fix possible panic when creating VirtIO console dev aliasesSince we have no control over the name, the MAKEDEV_CHECKNAME flag must beused to return an error on an invalid (to devfs) name instead of panicing.r305900 that originally added this feature also introduced a few other bugs: - Proper locking not performed - Theoretically broke the expectation that the control event buffer would not span more than one pages, but did not update the CTASSERT that was in place to prevent this. However, since the struct virtio_console_control and the bulk buffer together were quite small, this could not have happened.Also workaround an QEMU VirtIO spec violation in that it includes the NULterminator in the buffer length when the spec says it is not included.PR: 223531MFC after: 1 week
virtio_console: correctly determine presense of payload and its lengthMFC after: 2 weeks
Reserve space for control message payload (currently a port name).Approved by: trasz (mentor)Sponsored by: iXsystems, Inc.
Create aliases for named virtio-console ports.Make virtio_console(4) create `/dev/vtcon/<port_name>` alias pointingto /dev/ttyVx.y upon receiving PORT_NAME (id = 7) event over the controlqueue.
Create aliases for named virtio-console ports.Make virtio_console(4) create `/dev/vtcon/<port_name>` alias pointingto /dev/ttyVx.y upon receiving PORT_NAME (id = 7) event over the controlqueue.Approved by: traszMFC after: 1 monthSponsored by: iXsystems, Inc.Differential Revision: https://reviews.freebsd.org/D7182
sys/dev: minor spelling fixes.Most affect comments, very few have user-visible effects.
Several minor changes to hopefully complete the VirtIO console driver - Support the KDB alt break sequence to enter the debugger, panic, reboot, etc. [1] - Provide emergency write feature de
Several minor changes to hopefully complete the VirtIO console driver - Support the KDB alt break sequence to enter the debugger, panic, reboot, etc. [1] - Provide emergency write feature description. Note that QEMU does not implement this feature. - Make the VTCON_FLAG_* defines sequential once again. - When the multiple port feature is not negotiated, query the rows and columns of the one console during the device attach when the size feature is negotiated. - Report failure to the device if hot plugging a port fails. - Acknowledge the console port event with an open event. This is required by the spec, but QEMU doesn't seem to care.Submitted by: Juniper [1]MFC after: 1 month
Create the tty device after the port is completely initializedThis fixes a race with a tty open before the host is the ready.MFC after: 1 month
Add support for the multiport feature and fix hot plug racesMFC after: 1 month
Add VirtIO console driverSupport for the multiport feature is mostly implemented, but currentlydisabled due to some potential races in the hot plug code paths.Requested by: marcelMFC after: 1 m
Add VirtIO console driverSupport for the multiport feature is mostly implemented, but currentlydisabled due to some potential races in the hot plug code paths.Requested by: marcelMFC after: 1 monthRelnotes: yes