NetBSD Problem Report #26773
Received: (qmail 20211 invoked by uid 605); 27 Aug 2004 02:17:52 -0000
Message-Id: <1093573062.928769.2943.nullmailer@yamt.dyndns.org>
Date: Fri, 27 Aug 2004 11:17:42 +0900
From: yamt@mwd.biglobe.ne.jp
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: yamt@mwd.biglobe.ne.jp
To: gnats-bugs@gnats.NetBSD.org
Subject: ipf assumes mbufs are always writable
X-Send-Pr-Version: 3.95
>Number: 26773
>Category: kern
>Synopsis: ipf assumes mbufs are always writable
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: ipf-bug-people
>State: analyzed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 27 02:18:01 +0000 2004
>Closed-Date:
>Last-Modified: Tue Sep 05 23:11:32 +0000 2006
>Originator: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release: NetBSD 2.0G
>Organization:
>Environment:
System: NetBSD kaeru 2.0G NetBSD 2.0G (build.kaeru) #1626: Thu Aug 26 21:45:21 JST 2004 takashi@kaeru:/home/takashi/work/kernel/build.kaeru i386
Architecture: i386
Machine: i386
>Description:
ipf have an assumption that mbufs are always writable.
it sometimes does m_copyback on a shared mbuf and
triggers an assertion failure ("mlen == 0 || !M_READONLY(m)")
in m_copyback.
while 2-0 branch doesn't have the KASSERT, i think that
the problem itsself exists on the branch as well.
PR/26433 is about the same problem of pf.
PR/25761 also has some related info, including a stack trace.
>How-To-Repeat:
see PR/25761.
>Fix:
always ensuring that mbufs are writable beforehand
(in fr_check_wrapper?) might be a short-term fix.
for long-term, it's better to do some kind of copy-on-write.
>Release-Note:
>Audit-Trail:
From: YAMAMOTO Takashi <yamt@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/26773 CVS commit: src/sys/netinet
Date: Mon, 6 Sep 2004 10:00:43 +0000 (UTC)
Module Name: src
Committed By: yamt
Date: Mon Sep 6 10:00:43 UTC 2004
Modified Files:
src/sys/netinet: ip_fil_netbsd.c
Log Message:
fr_check_wrapper, fr_check_wrapper6:
ensure that mbufs are writable beforehand as ipf assumes.
PR/26773 and PR/26850.
To generate a diff of this commit:
cvs rdiff -r1.14 -r1.15 src/sys/netinet/ip_fil_netbsd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Havard Eidnes <he@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/26773 CVS commit: [netbsd-2-0] src/sys/netinet
Date: Sat, 11 Sep 2004 11:23:27 +0000 (UTC)
Module Name: src
Committed By: he
Date: Sat Sep 11 11:23:27 UTC 2004
Modified Files:
src/sys/netinet [netbsd-2-0]: ip_fil_netbsd.c
Log Message:
Pull up revision 1.15 (requested by yamt in ticket #833):
Ensure that mbufs are writable, as IPF assumes so.
Fixes PR#26773 and PR#26850.
To generate a diff of this commit:
cvs rdiff -r1.3.2.8 -r1.3.2.9 src/sys/netinet/ip_fil_netbsd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: jdolecek
State-Changed-When: Sun Oct 3 11:16:16 UTC 2004
State-Changed-Why:
Is this fixed by your commit? If yes, please close this PR.
State-Changed-From-To: feedback->analyzed
State-Changed-By: yamt
State-Changed-When: Sun Oct 3 22:29:49 UTC 2004
State-Changed-Why:
workarounded.
Responsible-Changed-From-To: kern-bug-people->darrenr
Responsible-Changed-By: darrenr@netbsd.org
Responsible-Changed-When: Thu, 08 Dec 2005 11:12:29 +0000
Responsible-Changed-Why:
From: darrenr@netbsd.org (Darren Reed)
To: yamt@mwd.biglobe.ne.jp
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/26773
Date: Thu, 8 Dec 2005 11:12:10 +0000 (UTC)
You've commented that the current situation is "workarounded".
What would you consider the correct fix?
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
To: darrenr@netbsd.org
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/26773
Date: Thu, 08 Dec 2005 21:16:06 +0900
> You've commented that the current situation is "workarounded".
>
> What would you consider the correct fix?
mbufs should be copied only when being modified, rather than always.
YAMAMOTO Takashi
Responsible-Changed-From-To: darrenr->kern-bug-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Sun, 03 Sep 2006 01:06:40 +0000
Responsible-Changed-Why:
Back to role account, darrenr doesn't have commit access any longer.
Responsible-Changed-From-To: kern-bug-people->ipf-bug-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Tue, 05 Sep 2006 23:11:32 +0000
Responsible-Changed-Why:
New role account for IPF bugs.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.