[Bug 253990] NTB driver causes panic: page fault

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 16 Jun 2021 15:39:00 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253990

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj@FreeBSD.org,
                   |                            |mav@FreeBSD.org,
                   |                            |rajeshasp@FreeBSD.org
             Status|New                         |Open

--- Comment #1 from Mark Johnston <markj@FreeBSD.org> ---
Looks like the problem is that amd_ntb_init_isr() modifies
ntb->hw_info->db_count, but ntb->hw_info is a pointer to read-only memory.

The bug seems to have come in with:
https://cgit.freebsd.org/src/commit/?id=e67b122307344b9583d75cca2e9a292df76c0a19
It probably went unnoticed since we did not enforce mapping protections for
amd64 kernel modules until:
https://cgit.freebsd.org/src/commit/?id=1d9eae9fb2e2253ca3d3764a5cc7f124b10e358b

But since the hw_info table is global it seems incorrect for a driver attach
routine to modify it.

-- 
You are receiving this mail because:
You are the assignee for the bug.