NetBSD-Bugs archive

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

kern/40651: kmem_alloc() returns misaligned pointers



>Number:         40651
>Category:       kern
>Synopsis:       kmem_alloc() returns misaligned pointers
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 15 18:35:00 +0000 2009
>Originator:     Martin Husemann
>Release:        NetBSD 5.99.7
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD sunset-glow.duskware.de 5.99.7 NetBSD 5.99.7 (GENERIC) #2: Sat 
Feb 14 21:58:39 CET 2009 
martin%night-porter.duskware.de@localhost:/usr/src/sys/arch/sparc/compile/GENERIC
 sparc
Architecture: sparc
Machine: sparc
>Description:
Booting a -current sparc (32bit) kernel crashes when writing a dev_t to
a struct tty:

0xf032f66c is in zstty_attach (../../../../dev/ic/z8530tty.c:394).
389             }
390     #endif
391             aprint_normal("\n");
392     
393             tp = ttymalloc();
394             tp->t_dev = dev;
395             tp->t_oproc = zsstart;
396             tp->t_param = zsparam;
397             tp->t_hwiflow = zshwiflow;
398             tty_attach(tp);

and tp is 0xf41b4c0c - which is only 32bit aligned, but struct tty contains
a 64 bit t_dev, which needs 64 bit alignement.

>How-To-Repeat:

Just boot a -current sparc kernel (should probably happen on other 32bit
alignement picky archs too)

>Fix:
n/a



Home | Main Index | Thread Index | Old Index