Summary: | instapanic with i915 and Linux client under Wayland | ||
---|---|---|---|
Product: | Base System | Reporter: | Edward Tomasz Napierala <trasz> |
Component: | kern | Assignee: | Mark Johnston <markj> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | emaste, grahamperrin, markj |
Priority: | --- | Keywords: | crash |
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any | ||
See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271333 https://reviews.freebsd.org/D40028 |
||
Bug Depends on: | |||
Bug Blocks: | 271607 |
Description
Edward Tomasz Napierala
2023-10-16 14:40:25 UTC
Could you please see if this patch helps? https://reviews.freebsd.org/D40028 It won't fix the underlying problem which is triggering a GPU reset, but at least the panic should be gone. It does fix the panic, thank you :) Any chance to get this in before 14.0? A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6223d0b67af923f53d962a9bf594dc37004dffe8 commit 6223d0b67af923f53d962a9bf594dc37004dffe8 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-10-17 14:26:18 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-10-17 15:19:06 +0000 linuxkpi: Handle direct-mapped addresses in linux_free_kmem() See the analysis in PR 271333. It is possible for driver code to allocate a page, store its address as returned by page_address(), then call free_page() on that address. On most systems that'll result in the LinuxKPI calling kmem_free() with a direct-mapped address, which is not legal. Fix the problem by making linux_free_kmem() check the address to see whether it's direct-mapped or not, and handling it appropriately. PR: 271333, 274515 Reviewed by: hselasky, bz Tested by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40028 sys/compat/linuxkpi/common/src/linux_page.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4862eb8604d503b52e7c3aa7ff32155b75a1ff93 commit 4862eb8604d503b52e7c3aa7ff32155b75a1ff93 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-10-17 14:26:18 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-10-24 13:20:01 +0000 linuxkpi: Handle direct-mapped addresses in linux_free_kmem() See the analysis in PR 271333. It is possible for driver code to allocate a page, store its address as returned by page_address(), then call free_page() on that address. On most systems that'll result in the LinuxKPI calling kmem_free() with a direct-mapped address, which is not legal. Fix the problem by making linux_free_kmem() check the address to see whether it's direct-mapped or not, and handling it appropriately. PR: 271333, 274515 Reviewed by: hselasky, bz Tested by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40028 (cherry picked from commit 6223d0b67af923f53d962a9bf594dc37004dffe8) sys/compat/linuxkpi/common/src/linux_page.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) A commit in branch releng/14.0 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=87dbb943df73022dd98487c123aeb125da11c4af commit 87dbb943df73022dd98487c123aeb125da11c4af Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-10-17 14:26:18 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-10-25 16:53:01 +0000 linuxkpi: Handle direct-mapped addresses in linux_free_kmem() See the analysis in PR 271333. It is possible for driver code to allocate a page, store its address as returned by page_address(), then call free_page() on that address. On most systems that'll result in the LinuxKPI calling kmem_free() with a direct-mapped address, which is not legal. Fix the problem by making linux_free_kmem() check the address to see whether it's direct-mapped or not, and handling it appropriately. Approved by: re (gjb) PR: 271333, 274515 Reviewed by: hselasky, bz Tested by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40028 (cherry picked from commit 6223d0b67af923f53d962a9bf594dc37004dffe8) (cherry picked from commit 4862eb8604d503b52e7c3aa7ff32155b75a1ff93) sys/compat/linuxkpi/common/src/linux_page.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6cba7aec21bcd957478a987f9391fd33a4babdac commit 6cba7aec21bcd957478a987f9391fd33a4babdac Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-10-17 14:26:18 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-01-09 17:59:49 +0000 linuxkpi: Handle direct-mapped addresses in linux_free_kmem() See the analysis in PR 271333. It is possible for driver code to allocate a page, store its address as returned by page_address(), then call free_page() on that address. On most systems that'll result in the LinuxKPI calling kmem_free() with a direct-mapped address, which is not legal. Fix the problem by making linux_free_kmem() check the address to see whether it's direct-mapped or not, and handling it appropriately. PR: 271333, 274515 Reviewed by: hselasky, bz Tested by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40028 (cherry picked from commit 6223d0b67af923f53d962a9bf594dc37004dffe8) sys/compat/linuxkpi/common/src/linux_page.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) |