From owner-freebsd-pf@freebsd.org Sun May 1 03:09:24 2016 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8B30B0F6A9 for ; Sun, 1 May 2016 03:09:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9E741889 for ; Sun, 1 May 2016 03:09:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u4139OnF022070 for ; Sun, 1 May 2016 03:09:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-pf@FreeBSD.org Subject: [Bug 208140] panic: page fault in pf Date: Sun, 01 May 2016 03:09:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rkondakov@ya.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-pf@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2016 03:09:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208140 --- Comment #11 from Roman --- (In reply to Kristof Provost from comment #9) #4 0xffffffff805bc59d in pf_test_state_udp () at /usr/src/sys/netpfil/pf/pf.c:4461 4461 panic("key PF_SK_STACK is NULL"); p *state Cannot access memory at address 0x0 from core.txt: =3D=3D=3D=20 panic: key PF_SK_STACK is NULL cpuid =3D 0 KDB: stack backtrace: #0 0xffffffff80444e10 at kdb_backtrace+0x60 #1 0xffffffff8040b306 at vpanic+0x126 #2 0xffffffff8040b1d3 at panic+0x43 #3 0xffffffff805bc59d at pf_test_state_udp+0x3ad #4 0xffffffff805b6c33 at pf_test+0x19d3 #5 0xffffffff805c5ced at pf_check_in+0x1d #6 0xffffffff804d94d4 at pfil_run_hooks+0x84 #7 0xffffffff804f543d at ip_input+0x31d #8 0xffffffff804d8672 at netisr_dispatch_src+0x62 #9 0xffffffff804d13a6 at ether_demux+0x126 #10 0xffffffff804d204e at ether_nh_input+0x35e #11 0xffffffff804d8672 at netisr_dispatch_src+0x62 #12 0xffffffff804d1311 at ether_demux+0x91 #13 0xffffffff804d204e at ether_nh_input+0x35e #14 0xffffffff804d8672 at netisr_dispatch_src+0x62 #15 0xffffffff80fd452b at nfe_int_task+0x5eb #16 0xffffffff80455c45 at taskqueue_run_locked+0xe5 #17 0xffffffff804566d8 at taskqueue_thread_loop+0xa8 --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-pf@freebsd.org Mon May 2 17:57:58 2016 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B78ADB2AEF8 for ; Mon, 2 May 2016 17:57:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CFA31DC8 for ; Mon, 2 May 2016 17:57:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u42Hvw3d037891 for ; Mon, 2 May 2016 17:57:58 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-pf@FreeBSD.org Subject: [Bug 208140] panic: page fault in pf Date: Mon, 02 May 2016 17:57:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rkondakov@ya.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-pf@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2016 17:57:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208140 --- Comment #12 from Roman --- new crash: panic: page fault --- GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Unread portion of the kernel message buffer: panic: page fault cpuid =3D 0 KDB: stack backtrace: #0 0xffffffff80444e10 at kdb_backtrace+0x60 #1 0xffffffff8040b306 at vpanic+0x126 #2 0xffffffff8040b1d3 at panic+0x43 #3 0xffffffff8066ddab at trap_fatal+0x36b #4 0xffffffff8066e0ad at trap_pfault+0x2ed #5 0xffffffff8066d72a at trap+0x47a #6 0xffffffff80653892 at calltrap+0x8 #7 0xffffffff805b5fc6 at pf_test+0xd66 #8 0xffffffff805c5ced at pf_check_in+0x1d #9 0xffffffff804d94d4 at pfil_run_hooks+0x84 #10 0xffffffff804f543d at ip_input+0x31d #11 0xffffffff804d8672 at netisr_dispatch_src+0x62 #12 0xffffffff804d13a6 at ether_demux+0x126 #13 0xffffffff804d204e at ether_nh_input+0x35e #14 0xffffffff804d8672 at netisr_dispatch_src+0x62 #15 0xffffffff804d1311 at ether_demux+0x91 #16 0xffffffff804d204e at ether_nh_input+0x35e #17 0xffffffff804d8672 at netisr_dispatch_src+0x62 --- bt: #0 doadump (textdump=3D) at pcpu.h:219 #1 0xffffffff8040af62 in kern_reboot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:486 #2 0xffffffff8040b345 in vpanic (fmt=3D, ap=3D) at /usr/src/sys/kern/kern_shutdown.c:889 #3 0xffffffff8040b1d3 in panic (fmt=3D0x0) at /usr/src/sys/kern/kern_shutdown.c:818 #4 0xffffffff8066ddab in trap_fatal (frame=3D, eva=3D) at /usr/src/sys/amd64/amd64/trap.c:858 #5 0xffffffff8066e0ad in trap_pfault (frame=3D0xfffffe00003cf480, usermode=3D) at /usr/src/sys/amd64/amd64/trap.c:681 #6 0xffffffff8066d72a in trap (frame=3D0xfffffe00003cf480) at /usr/src/sys/amd64/amd64/trap.c:447 #7 0xffffffff80653892 in calltrap () at /usr/src/sys/amd64/amd64/exception.S:236 #8 0xffffffff805dbd06 in pfr_update_stats (kt=3D, a= =3D0x10, af=3D, len=3D74, dir_out=3D0, op_pass=3D1, notrule= =3D0) at /usr/src/sys/netpfil/pf/pf_table.c:1962 #9 0xffffffff805b5fc6 in pf_test (dir=3D1, ifp=3D, m0=3D0xfffffe00003cf798, inp=3D) at /usr/src/sys/netpfil/pf/pf.c:6105 #10 0xffffffff805c5ced in pf_check_in (arg=3D, m=3D0xfffffe00003cf798, ifp=3D0x10, dir=3D, inp=3D= 0x0) at /usr/src/sys/netpfil/pf/pf_ioctl.c:3551 #11 0xffffffff804d94d4 in pfil_run_hooks (ph=3D0xffffffff80b1e158, mp=3D0xfffffe00003cf820, ifp=3D0xfffff80006c16000, dir=3D1, inp=3D0x0) at /usr/src/sys/net/pfil.c:82 --- #8 0xffffffff805dbd06 in pfr_update_stats (kt=3D, a= =3D0x10, af=3D, len=3D74, dir_out=3D0, op_pass=3D1, notrule= =3D0) at /usr/src/sys/netpfil/pf/pf_table.c:1962 1962 sin.sin_family =3D AF_INET; (kgdb) p sin $1 =3D {sin_len =3D 16 '\020', sin_family =3D 2 '\002', sin_port =3D 0, sin= _addr =3D { s_addr =3D 0}, sin_zero =3D "\000\000\000\000\000\000\000"} #9 0xffffffff805b5fc6 in pf_test (dir=3D1, ifp=3D, m0=3D0xfffffe00003cf798, inp=3D) at /usr/src/sys/netpfil/pf/pf.c:6105 (kgdb) l 6100 &s->key[(s->direction =3D=3D PF_IN)]-> 6101 addr[(s->direction =3D=3D PF_OUT)], 6102 pd.af, pd.tot_len, dir =3D=3D PF_OUT, 6103 r->action =3D=3D PF_PASS, tr->src.neg); 6104 if (tr->dst.addr.type =3D=3D PF_ADDR_TABLE) 6105 pfr_update_stats(tr->dst.addr.p.tbl, 6106 (s =3D=3D NULL) ? pd.dst : 6107 &s->key[(s->direction =3D=3D PF_IN)]-> 6108 addr[(s->direction =3D=3D PF_IN)], 6109 pd.af, pd.tot_len, dir =3D=3D PF_OUT, p tr->dst.addr.p.tbl Cannot access memory at address 0x68 (kgdb) p tr $4 =3D (kgdb) p tr->dst Cannot access memory at address 0x39 (kgdb) p tr->dst.addr Cannot access memory at address 0x39 (kgdb) p tr->dst.addr.p Cannot access memory at address 0x59 (kgdb) p tr->dst.addr.p.tbl Cannot access memory at address 0x59 ...=20 p *tr - worked p tr->dst.addr.p.tbl - worked after p *tr --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-pf@freebsd.org Wed May 4 12:09:14 2016 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7624B2A732 for ; Wed, 4 May 2016 12:09:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C85DF174C for ; Wed, 4 May 2016 12:09:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u44C9EUA064540 for ; Wed, 4 May 2016 12:09:14 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-pf@FreeBSD.org Subject: [Bug 209259] kernel panic when using PF and NAT Date: Wed, 04 May 2016 12:09:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-pf@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2016 12:09:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209259 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |freebsd-pf@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-pf@freebsd.org Wed May 4 18:10:31 2016 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2D31B2D3B5 for ; Wed, 4 May 2016 18:10:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4130171E for ; Wed, 4 May 2016 18:10:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u44IAVp8083616 for ; Wed, 4 May 2016 18:10:31 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-pf@FreeBSD.org Subject: [Bug 208140] panic: page fault in pf Date: Wed, 04 May 2016 18:10:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rkondakov@ya.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-pf@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2016 18:10:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208140 --- Comment #13 from Roman --- Change to=20 options SCHED_4BSD Unread portion of the kernel message buffer: panic: key PF_SK_STACK is NULL cpuid =3D 0 KDB: stack backtrace: #0 0xffffffff80442b40 at kdb_backtrace+0x60 #1 0xffffffff8040b2a6 at vpanic+0x126 #2 0xffffffff8040b173 at panic+0x43 #3 0xffffffff805ba2cd at pf_test_state_udp+0x3ad #4 0xffffffff805b4963 at pf_test+0x19d3 #5 0xffffffff805c3a1d at pf_check_in+0x1d #6 0xffffffff804d7204 at pfil_run_hooks+0x84 #7 0xffffffff804f316d at ip_input+0x31d #8 0xffffffff804d63a2 at netisr_dispatch_src+0x62 #9 0xffffffff804cf0d6 at ether_demux+0x126 #10 0xffffffff804cfd7e at ether_nh_input+0x35e #11 0xffffffff804d63a2 at netisr_dispatch_src+0x62 #12 0xffffffff804cf041 at ether_demux+0x91 #13 0xffffffff804cfd7e at ether_nh_input+0x35e #14 0xffffffff804d63a2 at netisr_dispatch_src+0x62 #15 0xffffffff80fae52b at nfe_int_task+0x5eb #16 0xffffffff80453975 at taskqueue_run_locked+0xe5 #17 0xffffffff80454408 at taskqueue_thread_loop+0xa8 --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-pf@freebsd.org Sat May 7 11:34:52 2016 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 377C2B2FFFC for ; Sat, 7 May 2016 11:34:52 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 1231A1328 for ; Sat, 7 May 2016 11:34:52 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 64943155FC; Sat, 7 May 2016 11:34:51 +0000 (UTC) Date: Sat, 7 May 2016 11:34:51 +0000 To: freebsd-pf@freebsd.org From: "nvass-gmx.com (Nikos Vassiliadis)" Reply-to: D1944+331+90181aefda88703e@reviews.freebsd.org Subject: [Differential] D1944: PF and VIMAGE fixes Message-ID: <9f5cc49629b40c279cf1207c59f84da6@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D1944: PF and VIMAGE fixes X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: NDc2NzM0MzY4OTdiYThiNTU1MjY2ZDZmMTJiIFct0ts= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.22 List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2016 11:34:52 -0000 nvass-gmx.com added a comment. Thanks for taking a look Kristof, I believe all your points are valid. Thing is that all eventhandlers need a more thorough look. They don't work as they should; be it virtualized or not, be it a VIMAGE or GENERIC kernel. I am trying to take a look but I haven't thrown enough time to it. INLINE COMMENTS > @kristof wrote in sys/netpfil/pf/pf_if.c:130 > I don't understand why this is required. Surely if an ifnet lives in V_ifnet (so, lives in the current vnet) ifp->if_vnet is always going to be curvnet? You're correct. It is plain wrong REVISION DETAIL https://reviews.freebsd.org/D1944 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: nvass-gmx.com, bz, trociny, kristof, gnn, zec, rodrigc, glebius, eri Cc: ryan_timewasted.me, mmoll, javier_ovi_yahoo.com, farrokhi, julian, robak, freebsd-virtualization-list, freebsd-pf-list, freebsd-net-list