Created attachment 155770 [details] ggatel: In g_gatel_create(), don't pass stack garbage to the kernel r238119 broke ggatel(8) on i386. "ggatel create ..." passes stack garbage to the kernel, the ioctl fails and no provider is created: Apr 20 13:09:52 electrobsd-r51 ggatel: ggatel: ioctl(/dev/ggctl): Invalid argument. Apr 20 13:09:52 electrobsd-r51 ggatel: Exiting. This is the same issue as reported in #197309 for ggatec(8). The attached patch fixes this. Obtained from: ElectroBSD
A commit references this bug: Author: brueffer Date: Tue Jul 14 10:49:37 UTC 2015 New revision: 285531 URL: https://svnweb.freebsd.org/changeset/base/285531 Log: Unbreak ggatec and ggatel on i386 after r238119, which added two more 'struct g_gate_ctl_create' fields. While the behaviour was technically undefined on other architectures as well, on the reporter's amd64 systems the uninitialized bytes the kernel cares about were always zero so everything worked as expected. PR: 197309, 199559 Submitted by: ota@j.email.ne.jp, Fabian Keil Reviewed by: pjd MFC after: 1 week Changes: head/sbin/ggate/ggatec/ggatec.c head/sbin/ggate/ggatel/ggatel.c
Fixed in HEAD, I'll MFC this in a week. Thanks!
A commit references this bug: Author: brueffer Date: Tue Jul 21 14:25:22 UTC 2015 New revision: 285748 URL: https://svnweb.freebsd.org/changeset/base/285748 Log: MFC: r285531 Unbreak ggatec and ggatel on i386 after r238119, which added two more 'struct g_gate_ctl_create' fields. While the behaviour was technically undefined on other architectures as well, on the reporter's amd64 systems the uninitialized bytes the kernel cares about were always zero so everything worked as expected. PR: 197309, 199559 Submitted by: ota@j.email.ne.jp, Fabian Keil Reviewed by: pjd Approved by: re (gjb) Changes: _U stable/10/ stable/10/sbin/ggate/ggatec/ggatec.c stable/10/sbin/ggate/ggatel/ggatel.c
Merge done; thanks again!