Date: Thu, 11 Jul 2019 20:29:50 +0000 (UTC) From: Vincenzo Maffione <vmaffione@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349922 - stable/11/sys/dev/netmap Message-ID: <201907112029.x6BKTo21044032@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vmaffione Date: Thu Jul 11 20:29:50 2019 New Revision: 349922 URL: https://svnweb.freebsd.org/changeset/base/349922 Log: MFC r349752 netmap: fix kernel pointer printing in netmap_generic.c Print the adapter name rather than the address of the adapter to avoid kernel address leakage. PR: Bug 238642 Submitted by: Fuqian Huang <huangfq.daxian@gmail.com> Reviewed by: vmaffione Modified: stable/11/sys/dev/netmap/netmap_generic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap_generic.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_generic.c Thu Jul 11 20:14:59 2019 (r349921) +++ stable/11/sys/dev/netmap/netmap_generic.c Thu Jul 11 20:29:50 2019 (r349922) @@ -1022,7 +1022,7 @@ generic_netmap_dtor(struct netmap_adapter *na) */ netmap_adapter_put(prev_na); } - nm_prinf("Native netmap adapter %p restored", prev_na); + nm_prinf("Native netmap adapter for %s restored", prev_na->name); } NM_RESTORE_NA(ifp, prev_na); /* @@ -1124,7 +1124,7 @@ generic_netmap_attach(struct ifnet *ifp) nm_os_generic_set_features(gna); - nm_prinf("Emulated adapter for %s created (prev was %p)", na->name, gna->prev); + nm_prinf("Emulated adapter for %s created (prev was %s)", na->name, gna->prev->name); return retval; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907112029.x6BKTo21044032>