Date: Thu, 20 Apr 2017 22:20:02 +0200 From: peter.blok@bsd4all.org To: Marko Zec <zec@fer.hr> Cc: Kristof Provost <kristof@sigsegv.be>, freebsd-net@freebsd.org Subject: Re: MFC VIMAGE fixes to 11-stable Message-ID: <FDF97779-6D4E-48E8-912A-7C2E11C97727@bsd4all.org> In-Reply-To: <20170420214128.29379fdb@x23> References: <8E6FC1CD-24D5-46D5-A6A1-760DD612F92D@bsd4all.org> <20170420124256.1190665d@x23> <60C3FBF7-7CF3-49AF-9DDF-0589AE9D9146@sigsegv.be> <20170420152853.019e5480@x23> <ACA8734E-88DF-4E7F-BB54-00D393ED7EA6@sigsegv.be> <C662C1B6-BCB7-4B92-9512-9E5B085B0AF8@bsd4all.org> <20170420214128.29379fdb@x23>
next in thread | previous in thread | raw e-mail | index | archive | help
Yeah, you are right. To keep the pf code as unchanged as possible, it is = sometimes unclear whether something is virtualised or not. The SLIST_HEAD and RB_HEAD in pfvar.h need virtualisation as well. > On 20 Apr 2017, at 21:41, Marko Zec <zec@fer.hr> wrote: >=20 > On Thu, 20 Apr 2017 21:24:33 +0200 > <peter.blok@bsd4all.org <mailto:peter.blok@bsd4all.org>> wrote: >=20 >> It doesn=E2=80=99t solve my problem, but below is the stack back = trace that >> leads to the problem that allocation doen for the default vnet are >> given back as part of the vnet destroy. >>=20 >> #0 0xffffffff807ff275 at pfr_destroy_kentry+0x35 >> #1 0xffffffff807fe47c at pfr_remove_kentries+0x1fc >> #2 0xffffffff808053cd at pfr_setflags_ktable+0xcd >> #3 0xffffffff80802108 at pfr_clr_tables+0x248 >> #4 0xffffffff807ecd75 at vnet_pf_uninit+0x4a5 >> #5 0xffffffff806a9d2c at vnet_destroy+0x13c >> #6 0xffffffff8056cdcf at prison_deref+0x2af >> #7 0xffffffff805ee287 at taskqueue_run_locked+0x127 >> #8 0xffffffff805ef428 at taskqueue_thread_loop+0xc8 >> #9 0xffffffff80565505 at fork_exit+0x85 >> #10 0xffffffff808d245e at fork_trampoline+0xe >=20 > Having absolutely no clue what the PF code does or is supposed to do, > I'd bet that V_irtualizing pfr_ktablehead, and probably pfr_nulltable > and pfr_ktable_cnt as well, would help here. >=20 > Marko >=20 >>=20 >>=20 >>> On 20 Apr 2017, at 15:32, Kristof Provost <kristof@sigsegv.be> >>> wrote: >>>=20 >>> On 20 Apr 2017, at 15:28, Marko Zec wrote: =20 >>>> Right. But pfi_attach_group_event() and the other handlers cited >>>> above _do_ in fact invoke CURVNET_SET(vnet0) on entry, overriding >>>> the proper vnet choice from the caller. >>>>=20 >>> Yes, that does look wrong. >>> I should have looked a bit further. >>>=20 >>>> Therefore the proper fix should be as simple as removing >>>> CURVNET_SET() / CURVNET_RESTORE() macro pairs from the cited >>>> handlers.=20 >>> Hopefully, yes. I=E2=80=99ve still got some other pf/vnet issues on = my todo >>> list, but I=E2=80=99ve now added this too. It might actually = explain some >>> other bug report I=E2=80=99ve seen (but not looked at in any depth). >>>=20 >>> Regards, >>> Kristof >>> _______________________________________________ >>> freebsd-net@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-net >>> To unsubscribe, send any mail to >>> "freebsd-net-unsubscribe@freebsd.org" =20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FDF97779-6D4E-48E8-912A-7C2E11C97727>