From owner-freebsd-sparc64@FreeBSD.ORG Sat Mar 8 20:40:00 2014 Return-Path: Delivered-To: freebsd-sparc64@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB8B4F92 for ; Sat, 8 Mar 2014 20:40:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9897B883 for ; Sat, 8 Mar 2014 20:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s28Ke0P4074122 for ; Sat, 8 Mar 2014 20:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s28Ke0B9074121; Sat, 8 Mar 2014 20:40:00 GMT (envelope-from gnats) Resent-Date: Sat, 8 Mar 2014 20:40:00 GMT Resent-Message-Id: <201403082040.s28Ke0B9074121@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-sparc64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Boris Lytochkin 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 A6279F87 for ; Sat, 8 Mar 2014 20:39:09 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9351687B for ; Sat, 8 Mar 2014 20:39:09 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s28Kd95W077206 for ; Sat, 8 Mar 2014 20:39:09 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s28Kd9Eb077203; Sat, 8 Mar 2014 20:39:09 GMT (envelope-from nobody) Message-Id: <201403082039.s28Kd9Eb077203@cgiserv.freebsd.org> Date: Sat, 8 Mar 2014 20:39:09 GMT From: Boris Lytochkin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: sparc64/187381: [panic] pfsync: memory address not aligned X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2014 20:40:00 -0000 >Number: 187381 >Category: sparc64 >Synopsis: [panic] pfsync: memory address not aligned >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-sparc64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 08 20:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Boris Lytochkin >Release: 10.0-STABLE >Organization: private person >Environment: FreeBSD rfloor1.cars 10.0-STABLE FreeBSD 10.0-STABLE #1 r262232M: Fri Feb 21 11:29:53 MSK 2014 boris@sparc1.cars:/usr/obj/usr/src/sys/CARSROUTER sparc64 >Description: An unligned memory access is possible in the following part of code: ====sys/netpfil/pf/if_pfsync.c, ~450 line================== if (PF_ANEQ(&sp->key[PF_SK_WIRE].addr[0], &sp->key[PF_SK_STACK].addr[0], sp->af) || PF_ANEQ(&sp->key[PF_SK_WIRE].addr[1], &sp->key[PF_SK_STACK].addr[1], sp->af) || sp->key[PF_SK_WIRE].port[0] != sp->key[PF_SK_STACK].port[0] || sp->key[PF_SK_WIRE].port[1] != sp->key[PF_SK_STACK].port[1]) { sks = uma_zalloc(V_pf_state_key_z, M_NOWAIT); if (sks == NULL) goto cleanup; } else sks = skw; ========================================================== once &sp->key[PF_SK_WIRE].addr is not an 32-bit aligned address (PF_ANEQ operates with uint32) >How-To-Repeat: Setup a pfsync link between sparc64-based routers and wait some time until the problem is triggered. >Fix: >Release-Note: >Audit-Trail: >Unformatted: