[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-bugs
Subject:    [haiku-bugs] Re: [Haiku] #11920: PANIC: Unexpected exception "General Protection Exception" occurred
From:       "simonsouth" <trac () haiku-os ! org>
Date:       2015-10-31 8:38:57
Message-ID: 056.836fcf5f4cafe83a0ba682397dbb3cb7 () haiku-os ! org
[Download RAW message or body]

#11920: PANIC: Unexpected exception "General Protection Exception" occurred in
kernel mode!
----------------------------------+----------------------------
   Reporter:  darfo               |      Owner:  nobody
       Type:  bug                 |     Status:  new
   Priority:  normal              |  Milestone:  Unscheduled
  Component:  Network & Internet  |    Version:  R1/Development
 Resolution:                      |   Keywords:  atheroswifi
 Blocked By:                      |   Blocking:
Has a Patch:  0                   |   Platform:  x86-64
----------------------------------+----------------------------

Comment (by simonsouth):

 From looking at the disassembly it seems the problem happens in
 `getchannels` at [http://cgit.haiku-os.org/haiku/tree/src/add-
 ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/ath_hal/ah_regdomain.c?id=hrev48926#n549
 ath_regdomain.c:549] when the driver tries to zero-out a 16-byte
 `ieee80211_channel` structure in the array passed to it:

 {{{
 OS_MEMZERO(ic, sizeof(*ic));
 }}}

 The actual exception occurs in  `memset_small` at [http://cgit.haiku-
 os.org/haiku/tree/src/system/libroot/posix/string/arch/x86_64/arch_string.cpp?id=hrev48926#n188
 x86_64/arch_string.cpp:188] when writing to memory, so presumably `ic`  is
 invalid at this point.

 All the code that sets up the channel array seems to be contained in the
 driver itself though, and I can't find in
 [https://bugs.freebsd.org/bugzilla/query.cgi the FreeBSD bug tracker]
 anyone reporting a similar problem on that platform, so the root cause
 probably lies in some Haiku-specific code elsewhere.

 I'm tempted to finger `memset_small` (especially since the driver works on
 other architectures) except [http://cgit.haiku-
 os.org/haiku/tree/src/system/libroot/posix/string/arch/x86_64/arch_string.cpp?id=hrev48926#n180
 the code is so simple] it's hard to see how there could be a problem with
 it.

 I'm convinced now this is not a stack-alignment issue (#10509), anyway.

--
Ticket URL: <https://dev.haiku-os.org/ticket/11920#comment:15>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic