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: <20110518083551.GE14805@elte.hu>
Date:	Wed, 18 May 2011 10:35:51 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Mandeep Singh Baines <msb@...omium.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org,
	Marcin Slusarz <marcin.slusarz@...il.com>,
	Don Zickus <dzickus@...hat.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 3/4 v2] watchdog: disable watchdog when thresh is zero


* Mandeep Singh Baines <msb@...omium.org> wrote:

> +extern int watchdog_thresh;
>  struct ctl_table;
> -extern int proc_dowatchdog_enabled(struct ctl_table *, int ,
> -			void __user *, size_t *, loff_t *);
> +extern int __proc_dowatchdog(struct ctl_table *, int ,
> +			     void __user *, size_t *, loff_t *);
> +#define proc_dowatchdog_enabled __proc_dowatchdog
> +#define proc_dowatchdog_thresh __proc_dowatchdog

i like the other aspects of your patch but this one is a no-no, we do not use 
1970's tech to obfuscate nice C code! :-)

If the argument list is annoying then introduce a helper structure. But having 
it longer is no big issue either. Try to shorten the function names if 
possible.

Sidenote, the sysctl code has been misdesigned a bit: it should be possible to 
add sysctls in .c files and not centralize it all into kernel/sysctl.c 
forcibly: we could should have a central static array by using a .sysctl_data 
section or such. Anyone wanna fix/improve that?

	Ingo
--
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