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  linux-hardening  linux-cve-announce  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]
Message-ID: <20110701114927.GA15802@tugrik.mns.mnsspb.ru>
Date:	Fri, 1 Jul 2011 15:49:27 +0400
From:	Kirill Smelkov <kirr@....spb.ru>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	matt mooney <mfm@...eddisk.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	USB list <linux-usb@...r.kernel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] USB: EHCI: Move sysfs related bits into
	ehci-sysfs.c

On Wed, Jun 29, 2011 at 02:51:42PM -0400, Alan Stern wrote:
> On Wed, 29 Jun 2011, Kirill Smelkov wrote:
> 
> > Yes, but still it would be good to always keep the invariant
> > 
> >     allocated <= uframe_periodic_max
> > 
> > and that debug is there to catch when this breaks.
> 
> Then perhaps it should print out the maximum number of microseconds
> already allocated for any uframe, instead of stopping as soon as it
> finds something above the new limit.

Yes, this makes sense, thanks. I've adjusted the patch accordingly.


> > > Can you make that check conditional on DEBUG being set?
> > 
> > Yes I can, but it seems to me we are starting to complicate the code.
> > 
> > What's the problem with returning error on setting uframe_periodic_max <
> > already allocated usb bandwith?
> 
> No problem, really.
> 
> > The checking is not a priority for me here, so if you think it's better not
> > to check or do it under #ifdef - let's do it. Though of course we all
> > have our preferences :)
> 
> Yes, it's just a matter of taste.  I prefer to add as little code as 
> possible for a feature that won't be used much.


Look: we have 3 choices: to check or not to check, and if we are
checking whether it is under #ifdef DEBUG. Not checking at all makes the
code inconsistent with the check in periodic_usecs(). Then, if we are
checking, putting it under #ifdef DEBUG goes against minimum complexity /
"to add as little code as possible ...". It looks the good balance is to
leave the checking as is module you above remark.

And with the above-mentioned correction and comments inspired by Sarah's
concern I'm resending the whole series as v3. Can we do it this way,
please?


Thanks,
Kirill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ