Summary: | pfctl(8): armv6: "pfctl -s state" crashes on BeagleBone Black due to unaligned access | ||
---|---|---|---|
Product: | Base System | Reporter: | guyyur |
Component: | bin | Assignee: | freebsd-pf (Nobody) <pf> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | ian, kp |
Priority: | Normal | ||
Version: | CURRENT | ||
Hardware: | arm | ||
OS: | Any |
Description
guyyur
2014-01-09 21:40:02 UTC
Responsible Changed From-To: freebsd-arm->freebsd-pf Over to maintainer(s). Patch that breaks backward compatibility by separating the pfsync and pfioc state structures and uses host order for pfioc fields except for id and creatorid. pfsync_state_import is duplicated to pfioc_state_import. pfioc_state_export is duplicated to pfsync_state_export. pfsync_alloc_scrub_memory is duplicated to pfioc_alloc_scrub_memory. https://github.com/guyyur/freebsd-src_patches/blob/master/pfctl_arm_segbus__ver2_part1.patch A commit references this bug: Author: ian Date: Sat Jan 30 22:03:15 UTC 2016 New revision: 295086 URL: https://svnweb.freebsd.org/changeset/base/295086 Log: Make pfctl(8) work on strict-alignment platforms, by copying a pair of embedded structures out of a packed, unaligned struct into local copies on the stack which are aligned. The original patch to do this was submitted by Guy Yur <guyyur@gmail.com>, and this is conceptually the same change, but restructured with the #ifndef __NO_STRICT_ALIGNMENT wrapper, similar to how the same issue is handled in the kernel pf code. PR: 185617 PR: 206658 Changes: head/sbin/pfctl/pf_print_state.c While r295086 fixes the crash on strict-alignment platforms, I am not going to close this bug. Instead, I leave it to the networking gurus to evaluate the patch referenced in comment #2. I don't know enough about pf and networking in general to evaluate the tradeoffs in restructuring the, umm, structures. batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed. |