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: <20131011072627.GA9514@gmail.com>
Date:	Fri, 11 Oct 2013 09:26:27 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo.kernel.org@...il.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/16] sched/wait: Collapse __wait_event macros -v5


* Paul E. McKenney <paulmck@...ux.vnet.ibm.com> wrote:

> > So, I think this code lives within kernel/params.c. Might be fixable?
> 
> But of course!  I was just trying to be lazy. ;-)
> 
> I could imagine adding a filename field to struct kernel_param that was 
> initialized with __FILE__, then making something like parameq() that did 
> the appropriate comparison allowing any match starting after a "/" and 
> ignoring the trailing ".h" or ".c", and then calling that from 
> parse_one() along with current parameq().  There doesn't seem to be any 
> point for doing the same to do_early_param().
> 
> There would be a few surprises with this approach, for example, 
> rcu_idle_gp_delay and rcu_idle_lazy_gp_delay, which are defined in 
> kernel/rcu/tree_plugin.h, would be:
> 
> 	tree_plugin.rcu_idle_gp_delay=4
> 	tree_plugin.rcu_idle_lazy_gp_delay=6000
> 
> or:
> 
> 	rcu/tree_plugin.rcu_idle_gp_delay=4
> 	rcu/tree_plugin.rcu_idle_lazy_gp_delay=6000
> 
> or:
> 
> 	kernel/rcu/tree_plugin.rcu_idle_gp_delay=4
> 	kernel/rcu/tree_plugin.rcu_idle_lazy_gp_delay=6000
> 
> or I suppose even:
> 
> 	linux-rcu/kernel/rcu/tree_plugin.rcu_idle_gp_delay=4
> 	linux-rcu/kernel/rcu/tree_plugin.rcu_idle_lazy_gp_delay=6000
> 
> instead of (say):
> 
> 	kernel/rcu/tree.rcu_idle_gp_delay=4
> 	kernel/rcu/tree.rcu_idle_lazy_gp_delay=6000
> 
> This could of course also be fixed by comparing the filename up to the 
> last "/" followed by the current parameter name.  Or, as Peter Zijlstra 
> suggested, by manually expanding kernel/rcu/tree_plugin.h into 
> kernel/rcu/tree.c.
> 
> Or I could use the non-standard __BASE_FILE__ instead of __FILE__, which 
> expands to .../kernel/rcu/tree.c.  LLVM seems to define this as well, so 
> should be OK to use.
> 
> So it doesn't look too horrible.  (Famous last words...)

Hm, I'm not so sure about the long names, for the following reasons: 
strings like 'kernel/rcu/tree_plugin.' might mean a lot to us kernel 
developers - less to sysadmins and users who would want to utilize them.

There's also a typo danger with overly long parameters and the parameter 
parser is not very intelligent about seeing the intent of the user.

So I think while rcu/tree.val would be useful syntax, going above that, 
especially with auto-generated file names (and file names can change) 
would be overdoing it a bit :-/

Thanks,

	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