Subject: hpckbd vs. -Wcast-qual and kernel memory protection
To: None <port-hpcsh@NetBSD.org, port-hpcarm@NetBSD.org,>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-hpcsh
Date: 06/02/2005 18:59:15
Now that -Wcast-qual hit current, it uncovered an interesting issue.
hpckbd(4) uses pckbd_keydesctab as a based table, patching KB_MACHDEP
entries with information from hpckbdkeymap.h

pckbd_keydesctab is "const" and is placed in the .text - yet hpckbd(4)
patches it successfully. So we have kernel .text kernel-writable.  I
verified it with ddb on hpcsh.  I gather the same is true on other
hpc* ports, or hpckbd(4) would caused access fault.

This looks like something we should fix.

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen