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]
Date:   Tue, 2 Nov 2021 20:40:28 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     LABBE Corentin <clabbe@...libre.com>
Cc:     mchehab@...nel.org, hverkuil@...all.nl, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
        linux-staging@...ts.linux.dev, mjpeg-users@...ts.sourceforge.net
Subject: Re: [PATCH v2 04/10] staging: media: zoran: add debugfs

On Sun, Oct 17, 2021 at 10:05:06PM +0200, LABBE Corentin wrote:
> Le Thu, Oct 14, 2021 at 10:37:52AM +0300, Dan Carpenter a écrit :
> > On Wed, Oct 13, 2021 at 06:58:06PM +0000, Corentin Labbe wrote:
> > > +config VIDEO_ZORAN_DEBUG
> > > +	bool "Enable zoran debugfs"
> > > +	depends on VIDEO_ZORAN
> > > +	depends on DEBUG_FS
> > > +	help
> > > +	  Say y to enable zoran debug file.
> > > +	  This will create /sys/kernel/debug/CARD_NAME/debug for displaying
> > > +	  stats and debug information.
> > 
> > Why bother with a CONFIG?  Just make it always on?
> > 
> 
> Hello
> 
> I love to provides choice to user (and so avoid a dep on DEBUG_FS), even if I think I am the only one remaining user.

Sorry, for the delay, I was on vacation.

No, there is no depends on DEBUG_FS in the method that I am describing.

How that works is when DEBUG_FS is turned on then it's on for everything,
but when it's disabled it's disabled for everything.  You do not need
the "depends on DEBUG_FS" and if you make this an option the it feels
like it should be a selects DEBUG_FS instead.

How this normally works is that when you have debugfs disabled, there
are dummy files in the debugfs .h files.  I bet the compiler can tell
most of those are empty and removes them.  So if you have DEBUG_FS then
it doesn't use that much more memory than when VIDEO_ZORAN_DEBUG is
disabled.

I don't know if I'm being clear at all #jetlag.

It should be easy to check.  Just remove the "depends on DEBUG_FS" and
enable VIDEO_ZORAN_DEBUG.  Disable DEBUG_FS.  It should still build fine
because of the dummy functions.  That's build 1.  Then disable
VIDEO_ZORAN_DEBUG and that's build 2.  See how much memory difference
there is between 1 and 2.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ