FreeBSD Bugzilla – Attachment 242085 Details for
Bug 271288
FreeBSD 13.2; Alignment Fault ; virtio-net
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
testcase: offseting the m_data by constant to avoid unaligned data access
if_vtnet.c.patch (text/plain), 541 bytes, created by
martin
on 2023-05-09 22:01:47 UTC
(
hide
)
Description:
testcase: offseting the m_data by constant to avoid unaligned data access
Filename:
MIME Type:
Creator:
martin
Created:
2023-05-09 22:01:47 UTC
Size:
541 bytes
patch
obsolete
>--- usr/src/sys/dev/virtio/network/if_vtnet.c 2023-05-09 23:46:18.844236000 +0000 >+++ usr/src/sys/dev/virtio/network/if_vtnet.c 2023-05-09 23:48:11.081189000 +0000 >@@ -1541,7 +1541,12 @@ > return (NULL); > } > >- m->m_len = size; >+ #define VTNET_ALIGNMENT_FUDGE 2 >+ m->m_data += VTNET_ALIGNMENT_FUDGE; >+ >+ KASSERT(size + VTNET_ALIGNMENT_FUDGE > 0, ("%s: mbuf size (%d) smaller than VTNET_ALIGNMENT_FUDGE", __func__, size)); >+ m->m_len = size - VTNET_ALIGNMENT_FUDGE; >+ > if (m_head != NULL) { > m_tail->m_next = m; > m_tail = m;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271288
:
242085
|
242118
|
242125
|
242127