| Summary: | [safe] safenet driver causes kernel panic | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Rajkumar S <raj> |
| Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Open --- | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 6.2-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Rajkumar S
2007-03-22 07:40:06 UTC
On Sat, Mar 24, 2007 at 05:24:28PM +0530, Rajkumar S. wrote:
> Done. Here is the trace output. I have left the address that occur
> inside brackets, because I had to manually type them in from another
> machine. I can resent them if they are important.
>
> raj
>
> device_attach () at device_attach+0x58
> device_probe_and_attach() at device_probe_and_attach+0xc4
> bus_generic_attach() at bus_generic_attach+0x16
> acpi_pci_attach() at acpi_pci_attach+0xd0
> device_attach()
> device_probe_and_attach()
> bus_generic_attach()
> acpi_pcib_attach()
> acpi_pcib_acpi_attach()
> device_attach()
> device_probe_and_attach()
> bus_generic_attach()
> acpi_pci_attach()
> device_attach()
> device_probe_and_attach()
> bus_generic_attach()
> nexus_attach()
> device_attach()
> device_probe_and_attach()
> bus_generic_attach()
> acpi_pcib_attach()
> acpi_pcib_acpi_attach()
> device_attach()
> device_probe_and_attach()
> bus_generic_attach()
> acpi_attach()
> device_attach()
> device_probe_and_attach()
> bus_generic_attach()
> nexus_attach()
> device_attach()
> device_probe_and_attach()
> root_bus_configure()
> configure()
> mi_startup()
> begin()
>
State Changed From-To: open->analyzed The problem is reproducible. There are several issues. The failure to create the bus dma tag is because there is a 4-byte alignment requirement set for the dst dma tag and BUS_DMA_ALLOCNOW is specified. This causes an attempt to pre-allocate a bunch of memory to the bounce page zone which fails. Removing BUS_DMA_ALLOCNOW does not work however because the safe driver is not prepared for bus dma setup requests to be deferred. If that happens then the driver will crash because it assumes the dma setup always succeeds and so blindly stuffs a bogus physical address into the dma engine. It appears the alignment requirement is actually not needed however; though I must re-check the chip specs and code to make sure. Applying the following change avoids the bounce page issue and allows cryptotest to run to completion but it likely provides only properly-aligned dst buffers so this may just mask a problem that will crop up for other consumers such as fast ipsec. As I said already I need to investigate more before committing a fix. cvs diff: Diffing . Index: safe.c =================================================================== RCS file: /usr/ncvs/src/sys/dev/safe/safe.c,v retrieving revision 1.17 diff -u -r1.17 safe.c --- safe.c 23 Feb 2007 12:18:52 -0000 1.17 +++ safe.c 25 Mar 2007 03:23:03 -0000 @@ -298,7 +298,7 @@ goto bad4; } if (bus_dma_tag_create(NULL, /* parent */ - sizeof(u_int32_t), /* alignment */ + 1, /* alignment */ SAFE_MAX_DSIZE, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ Responsible Changed From-To: freebsd-bugs->sam mean to assign to me sam 2007-11-03 19:10:14 UTC
FreeBSD src repository
Modified files:
sys/dev/safe safe.c
Log:
bandaid crash as I have no time to research the issue and the driver
is unusable in its present state; refer to the PR for details
PR: kern/110662
MFC after: 3 days
Revision Changes Path
1.19 +1 -1 src/sys/dev/safe/safe.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: analyzed->patched Still needs MFC to RELENG_6. Note to next person to touch this PR: once it's MFCed, it needs to be set back to 'analyzed', not 'closed', as the commit is just a workaround. State Changed From-To: patched->analyzed 6 is no longer supported so follow linimon's advice and set pr to analyzed Responsible Changed From-To: sam->freebsd-bugs Sam has not been active in some time. For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open" |