NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/54387: DTrace Kernel module does not autoload on first use with GENERIC kernel



The following reply was made to PR kern/54387; it has been noted by GNATS.

From: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/54387: DTrace Kernel module does not autoload on first use
 with GENERIC kernel
Date: Sat, 20 Jul 2019 16:20:22 +0200

 On Sat, Jul 20, 2019 at 01:15:00PM +0000, venture37%geeklan.co.uk@localhost wrote:
 ,snip>
 > I suspect the change of the default value of WARNS for modules may be related but I'm not sure if the value should be reduced or this has highlighted a bug a in the module code.
 
 It was the change to external/cddl/osnet/dist/uts/common/dtrace/dtrace.c,
 Rev 1.39: Change module type to "MODULE_CLASS_MISC" to allow preloading.
 
 It should be sufficient to try to load module "dtrace" before we open
 the device, please try the diff attached.
 
 --
 J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig
 
 diff -r 34ade923a39d external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c
 --- external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c	Sat Jul 20 15:54:37 2019 +0200
 +++ external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c	Sat Jul 20 16:11:40 2019 +0200
 @@ -1140,6 +1140,16 @@ dt_vopen(int version, int flags, int *er
  	 */
  	dt_provmod_open(&provmod, &df);
  
 +#ifdef __NetBSD__
 +	modctl_load_t cmdargs;
 +
 +	cmdargs.ml_filename = "dtrace";
 +	cmdargs.ml_flags = MODCTL_NO_PROP;
 +	cmdargs.ml_props = NULL;
 +	cmdargs.ml_propslen = 0;
 +
 +	(void)modctl(MODCTL_LOAD, &cmdargs);
 +#endif
  	dtfd = open("/dev/dtrace/dtrace", O_RDWR);
  	err = errno; /* save errno from opening dtfd */
  #if defined(__FreeBSD__)
 


Home | Main Index | Thread Index | Old Index