lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	04 Oct 2007 13:52:32 +0200
From:	Urs Thuermann <urs@...ogud.escape.de>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
	Patrick McHardy <kaber@...sh.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Oliver Hartkopp <oliver@...tkopp.net>,
	Oliver Hartkopp <oliver.hartkopp@...kswagen.de>
Subject: Re: [PATCH 5/7] CAN: Add virtual CAN netdevice driver

Arnaldo Carvalho de Melo <acme@...stprotocols.net> writes:

> > +#ifdef CONFIG_CAN_DEBUG_DEVICES
> > +static int debug;
> > +module_param(debug, int, S_IRUGO);
> > +#endif
> 
> Can debug be a boolean? Like its counterpart on DCCP:

debug used to a bit mask, like it still is in core.h.  You can see
this in the test

        debug & 1 ? ... : ...

below.  Only the test for bit 0 is left, so we could change it to bool.

> net/dccp/proto.c:
> 
> module_param(dccp_debug, bool, 0444);
> 
> Where we also use a namespace prefix, for those of us who use ctags or
> cscope.

I think ctags should be able to handle multiple identical static
symbols.  Isn't it?  I find it somewhat clumsy to write

        modprobe vcan vcan_debug=1

I think it would be nice to change the module_param() macro so that
you can name the module argument and the corresponding variable
independently, like

        module_param(can_debug, "debug", bool, 0444);

OK, forget that last paragraph.  I've looked at the definition of
module_param() and have seen that we have module_param_named().  I
think we should use that.

> > +
> > +/* To be moved to linux/can/dev.h */
> 
> Is this comment still valid? If so can this move happen now? If not I
> think it would be better to stick a "FIXME: " just before it, no?

OK.

> > +static int echo; /* echo testing. Default: 0 (Off) */
> > +module_param(echo, int, S_IRUGO);
> > +MODULE_PARM_DESC(echo, "Echo sent frames (for testing). Default: 0 (Off)");
> 
> echo also seems to be a boolean

ACK.

> > +static int vcan_open(struct net_device *dev)
> > +{
> > +	DBG("%s: interface up\n", dev->name);
> > +
> > +	netif_start_queue(dev);
> > +	return 0;
> > +}
> > +
> > +static int vcan_stop(struct net_device *dev)
> > +{
> > +	DBG("%s: interface down\n", dev->name);
> > +
> > +	netif_stop_queue(dev);
> > +	return 0;
> > +}
> 
> Thinking out loud: I guess these days we can try to reduce the clutter
> on the source code for things like "hey, I entered function foo" using
> simple systemtap scripts, that could even be shipped with the kernel
> sources. Not something pressing right now, just a suggestion.

I've never heard of systemtap before.  I've ust looked at its overview
web page which sounds promising.  I think I'll check it out when time
permits...


urs
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists