Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Sep 2021 18:34:42 +0200
From:      Kristof Provost <kp@FreeBSD.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        net@freebsd.org
Subject:   Re: page fault in pfioctl
Message-ID:  <B41D81F5-5B2B-4944-830E-C8F688BC8C62@FreeBSD.org>
In-Reply-To: <a081e770-581a-0e40-4076-ac11b59e1616@FreeBSD.org>
References:  <cc06b2d5-5349-33f3-4bdd-aa2ba5fa75b4@FreeBSD.org> <980E0B5C-41CF-466E-AD45-7B93532199F4@freebsd.org> <a081e770-581a-0e40-4076-ac11b59e1616@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 25 Sep 2021, at 18:25, Andriy Gapon wrote:
> On 13/06/2021 11:19, Kristof Provost wrote:
>> On 13 Jun 2021, at 09:41, Andriy Gapon <avg@freebsd.org> wrote:
>>> Based on
>>> the panic message (page fault with non-sleepable locks held), it seem=
s that
>>> the problem is with holding the lock across the copyout.  Usually tha=
t
>>> won't panic, but if the destination happens to be paged out... And on=
ly
>>> with INVARIANTS, I guess...
>>
>> Oh right. Thanks. I=E2=80=99ve gotten bitten by that one before, but h=
ad clearly
>> garbage collected the memory.
>>
>> I=E2=80=99ll fix this one and check for others on Monday.
>>
>> I=E2=80=99ll also see of we can persuade copyout to always panic on th=
is bug, not
>> just when the destination memory is actually paged out. That way we=E2=
=80=99ll catch
>> this in the regression tests in the future.
>
> I upgraded to the latest stable/13 and hit a fresh panic of the same ty=
pe.
> This time it's in pf_getstatus() and it's a copyout while 'pf rulesets'=
 lock is held.
>
I believe that=E2=80=99s fixed by https://cgit.freebsd.org/src/commit/sys=
/netpfil/pf/pf_ioctl.c?id=3Dcb13059663e455b3fc69c293dadec53c164490dc

Best regards,
Kristof



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B41D81F5-5B2B-4944-830E-C8F688BC8C62>