tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Length of wmesg for condvar?



On Sun, 8 Aug 2010 17:23:23 -0700 (PDT)
Paul Goyette <paul%whooppee.com@localhost> wrote:

> Should these be changed?  Are there any adverse effects from having a 
> wmesg longer than 8 characters?

It seems to me that the exporter of those use strncpy() (i.e.
kern/init_sysctl.c) and that the structures use WMESGLEN and
KI_WMESGLEN both defined as 8.  So other than inadvertently truncated
names it at least should not cause corruption, but I think that
truncated names could also be problematic when trying to distinguish
two strings starting with the same 8 characters (is that likely now)?
Especially when the only thing that differs between two states is some
suffix like "rd" and "rw"...  After all, those are intended for
humans :)
-- 
Matt


Home | Main Index | Thread Index | Old Index