Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 2014 21:52:11 +0200
From:      Guy Yur <guyyur@gmail.com>
To:        freebsd-net@freebsd.org, freebsd-arm@freebsd.org
Subject:   Re: 10.0-RC1, armv6: "pfctl -s state" crashes on BeagleBone Black due to unaligned access
Message-ID:  <CAC67Hz_9ts60gUE9xzB9nacO4F7kNznJ26LW6mPLm-8pT-f20w@mail.gmail.com>
In-Reply-To: <E4255780-6E58-435D-BDE6-491915B642CF@bsdimp.com>
References:  <CAC67Hz_QXcHHSFOLLgUGqLWRQpzhRRv_b%2BWGMMQsfk-VQp74RA@mail.gmail.com> <E4255780-6E58-435D-BDE6-491915B642CF@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 4, 2014 at 6:50 PM, Warner Losh <imp@bsdimp.com> wrote:
> I think this was changed in later RC versions.
>
> Warner
>

Do you mean r259308 in 10-STABLE?

I compiled a new kernel with the change applied and still get SIGBUS
on unaligned access.

>From my reading of the ARM manual for Cortex-A it looks like setting
CPU_CONTROL_AFLT_ENABLE to 1 means you want to get a trap on
unaligned access.
"1 = Strict alignment fault checking enabled."

I see that dab_align delivers a SIGBUS on user-mode alignment fault.



> On Jan 4, 2014, at 6:06 AM, Guy Yur wrote:
>
>> Hi,
>>
>> I am running 10.0-RC1 arm.armv6 on the BeagleBone Black.
>> The "pfctl -s state" command is crashing when trying to print the
>> second entry.
>>
>> struct pfsync_state has a size that is not divisiable by 4 or 8 leading to the
>> second entry in the returned state array not being aligned and pfctl
>> core dumps on Bus error when trying to access a uint32_t field.
>>


Regards,
Guy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC67Hz_9ts60gUE9xzB9nacO4F7kNznJ26LW6mPLm-8pT-f20w>