NetBSD Problem Report #52795
From paul@whooppee.com Fri Dec 8 22:46:18 2017
Return-Path: <paul@whooppee.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 2A7197A1B5
for <gnats-bugs@gnats.NetBSD.org>; Fri, 8 Dec 2017 22:46:18 +0000 (UTC)
Message-Id: <20171208224615.79FC016E44@speedy.whooppee.com>
Date: Sat, 9 Dec 2017 06:46:15 +0800 (+08)
From: paul@whooppee.com
Reply-To: paul@whooppee.com
To: gnats-bugs@NetBSD.org
Subject: loading if_gif module generates duplicate ip_ecn_xxx symbols
X-Send-Pr-Version: 3.95
>Number: 52795
>Category: kern
>Synopsis: ip_ecn_xxx duplicate symbols between if_gif and stf(4)
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pgoyette
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 08 22:50:00 +0000 2017
>Closed-Date: Thu Dec 21 21:32:12 +0000 2017
>Last-Modified: Thu Dec 21 21:32:12 +0000 2017
>Originator: Paul Goyette
>Release: NetBSD 8.99.7
>Organization:
+------------------+--------------------------+----------------------------+
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+
>Environment:
System: NetBSD speedy.whooppee.com 8.99.7 NetBSD 8.99.7 (SPEEDY 2017-11-29 22:03:05 UTC) #0: Wed Nov 29 23:14:50 UTC 2017 paul@speedy.whooppee.com:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/SPEEDY amd64
Architecture: x86_64
Machine: amd64
>Description:
The if_gif module includes a copy of ip_ecn.c routines, which are also
used by the stf(4) driver (not yet modular). If a kernel is built with
stf(4) included and gif(4) excluded, and then you load the if_gif module,
you get duplicate symbol error messages for ip_ecn_{e,in}gress and the
module fails to load.
>How-To-Repeat:
See above
>Fix:
Separate the ip_ecn routines out into a separate module, and make the
if_gif module require ip_ecn. Then, loading of if_gif will auto-load
ip_ecn if not already built-in. (If stf(4) is already included in the
kernel, ip_ecn would be built-in and no need to load another copy.)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->pgoyette
Responsible-Changed-By: pgoyette@NetBSD.org
Responsible-Changed-When: Fri, 08 Dec 2017 23:02:09 +0000
Responsible-Changed-Why:
I'm working on the fix
From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/52795 CVS commit: src
Date: Sat, 9 Dec 2017 08:03:07 +0000
Module Name: src
Committed By: pgoyette
Date: Sat Dec 9 08:03:07 UTC 2017
Modified Files:
src/distrib/sets/lists/modules: mi
src/sys/modules: Makefile
src/sys/modules/if_gif: Makefile
src/sys/net: if_gif.c
src/sys/netinet: ip_ecn.c
Added Files:
src/sys/modules/ip_ecn: Makefile
Log Message:
Split ip_ecn code into its own module, so it can be shared between
gif(4), stf(4), and ipsec(4). Without this, loading the if_gif
module can result in redefined global symbols if either ipsec(4) or
stf(4) but not gif(4) is built into the kernel.
Fixes PR kern/52795 (as reported by martin@ via irc).
XXX pullup to netbsd-8
To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.195 -r1.196 src/sys/modules/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/if_gif/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/ip_ecn/Makefile
cvs rdiff -u -r1.135 -r1.136 src/sys/net/if_gif.c
cvs rdiff -u -r1.16 -r1.17 src/sys/netinet/ip_ecn.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->needs-pullups
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Sat, 09 Dec 2017 08:06:56 +0000
State-Changed-Why:
Fix committed, need to pullup to netbsd-8
State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Sat, 09 Dec 2017 08:10:24 +0000
State-Changed-Why:
pullup requested - ticket netbsd-8 #436
From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/52795 CVS commit: [netbsd-8] src
Date: Thu, 21 Dec 2017 19:14:42 +0000
Module Name: src
Committed By: snj
Date: Thu Dec 21 19:14:42 UTC 2017
Modified Files:
src/distrib/sets/lists/modules [netbsd-8]: mi
src/sys/modules [netbsd-8]: Makefile
src/sys/modules/if_gif [netbsd-8]: Makefile
src/sys/net [netbsd-8]: if_gif.c
src/sys/netinet [netbsd-8]: ip_ecn.c
Added Files:
src/sys/modules/ip_ecn [netbsd-8]: Makefile
Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #436):
distrib/sets/lists/modules/mi: revision 1.112
sys/modules/Makefile: revision 1.196
sys/modules/ip_ecn/Makefile: revision 1.1
sys/modules/if_gif/Makefile: revision 1.3
sys/net/if_gif.c: revision 1.136
sys/netinet/ip_ecn.c: revision 1.17
Split ip_ecn code into its own module, so it can be shared between
gif(4), stf(4), and ipsec(4). Without this, loading the if_gif
module can result in redefined global symbols if either ipsec(4) or
stf(4) but not gif(4) is built into the kernel.
Fixes PR kern/52795 (as reported by martin@ via irc).
To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.110.2.1 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.192 -r1.192.2.1 src/sys/modules/Makefile
cvs rdiff -u -r1.2 -r1.2.12.1 src/sys/modules/if_gif/Makefile
cvs rdiff -u -r0 -r1.1.2.2 src/sys/modules/ip_ecn/Makefile
cvs rdiff -u -r1.126.2.4 -r1.126.2.5 src/sys/net/if_gif.c
cvs rdiff -u -r1.16 -r1.16.10.1 src/sys/netinet/ip_ecn.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Thu, 21 Dec 2017 21:32:12 +0000
State-Changed-Why:
pullup ticket 8-436 completed
>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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.