Bug 238658 - netpfil: ipfw: remove unnecessary pointer printing in ip_dummy_net.c
Summary: netpfil: ipfw: remove unnecessary pointer printing in ip_dummy_net.c
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Tom Jones
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-06-17 11:28 UTC by Fuqian
Modified: 2020-07-22 10:01 UTC (History)
1 user (show)

See Also:


Attachments
The patch file (939 bytes, patch)
2019-06-17 11:28 UTC, Fuqian
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fuqian 2019-06-17 11:28:21 UTC
Created attachment 205176 [details]
The patch file

Remove the unnecessary printf in ip_dn_init to avoid printing out
the address of kernel pointer.
 sys/netpfil/ipfw/ip_dummynet.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c
index 3fe5f7f2f82..ab2c0cdfcd0 100644
--- a/sys/netpfil/ipfw/ip_dummynet.c
+++ b/sys/netpfil/ipfw/ip_dummynet.c
@@ -2511,7 +2511,6 @@ ip_dn_init(void)
 {
 	if (dn_cfg.init_done)
 		return;
-	printf("DUMMYNET %p with IPv6 initialized (100409)\n", curvnet);
 	dn_cfg.init_done = 1;
 	/* Set defaults here. MSVC does not accept initializers,
 	 * and this is also useful for vimages
Comment 1 Tom Jones freebsd_committer freebsd_triage 2020-07-11 16:41:27 UTC
I have created a review for this here: https://reviews.freebsd.org/D25619
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-07-13 13:36:23 UTC
A commit references this bug:

Author: thj
Date: Mon Jul 13 13:35:37 UTC 2020
New revision: 363141
URL: https://svnweb.freebsd.org/changeset/base/363141

Log:
  Don't print VNET pointer when initializing dummynet

  When dummynet initializes it prints a debug message with the current VNET
  pointer unnecessarily revealing kernel memory layout. This appears to be left
  over from when the first pieces of vimage support were added.

  PR:		238658
  Submitted by:	huangfq.daxian@gmail.com
  Reviewed by:	markj, bz, gnn, kp, melifaro
  Approved by:	jtl (co-mentor), bz (co-mentor)
  Event:		July 2020 Bugathon
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D25619

Changes:
  head/sys/netpfil/ipfw/ip_dummynet.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-07-22 10:01:01 UTC
A commit references this bug:

Author: thj
Date: Wed Jul 22 10:00:14 UTC 2020
New revision: 363414
URL: https://svnweb.freebsd.org/changeset/base/363414

Log:
  MFC r363141:

  Don't print VNET pointer when initializing dummynet

  When dummynet initializes it prints a debug message with the current VNET
  pointer unnecessarily revealing kernel memory layout. This appears to be left
  over from when the first pieces of vimage support were added.

  PR:		238658
  Submitted by:	huangfq.daxian@gmail.com
  Reviewed by:	markj, bz, gnn, kp, melifaro
  Approved by:	jtl (co-mentor), bz (co-mentor)
  Event:		July 2020 Bugathon
  Differential Revision:	https://reviews.freebsd.org/D25619

Changes:
_U  stable/12/
  stable/12/sys/netpfil/ipfw/ip_dummynet.c