From owner-freebsd-arm@FreeBSD.ORG Sat Jan 4 19:52:12 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75BBFE40; Sat, 4 Jan 2014 19:52:12 +0000 (UTC) Received: from mail-oa0-x22d.google.com (mail-oa0-x22d.google.com [IPv6:2607:f8b0:4003:c02::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 322491CC6; Sat, 4 Jan 2014 19:52:12 +0000 (UTC) Received: by mail-oa0-f45.google.com with SMTP id g12so1926379oah.18 for ; Sat, 04 Jan 2014 11:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=P+YoAydWULmrHNSiBA5rfifJoy9rFKlDcB2tFv/MQQE=; b=uOj/DMpiCJik7Ck/5QzeMABC4D5xlRAfU68tx/YCUhfZp6w55z7lXZb6jDnxz8+IXn 5Tw6o78isdK3CpSC43BzzkPdiEy7bb2gzCnDF1fux2YqowlO4C/DCHycYP8m5KdpoiLm VgQggoShzjYV8nEOHILMrb8v9pIZrqMrheXFR6egrG1Rt9OY/BX40wDkPbYVl/GnjVyI b67alroGoYN0huiJ8Vt+GQ6yMrSZ1YBj942b1hU74iioIziZqIpxCHJKQfUzmLgBe65p 4jAXy1RkxW9EC+/S5VGyJUFJdgENwb/bVAKyD7Aq3quRrCH+sZw7GINmxKPQoG4VmzJT KIRw== MIME-Version: 1.0 X-Received: by 10.60.54.168 with SMTP id k8mr1881834oep.56.1388865131471; Sat, 04 Jan 2014 11:52:11 -0800 (PST) Received: by 10.76.20.82 with HTTP; Sat, 4 Jan 2014 11:52:11 -0800 (PST) In-Reply-To: References: Date: Sat, 4 Jan 2014 21:52:11 +0200 Message-ID: Subject: Re: 10.0-RC1, armv6: "pfctl -s state" crashes on BeagleBone Black due to unaligned access From: Guy Yur To: freebsd-net@freebsd.org, freebsd-arm@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jan 2014 19:52:12 -0000 On Sat, Jan 4, 2014 at 6:50 PM, Warner Losh 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