[Cocci] [PATCH v1 0/6] module params: few simplifications
From: Luis R. Rodriguez mcg...@suse.com Here are a few simplifications on the sig_force module parameter code. I'm digging through this as long term I'd like enable standard use of the crypto code for module loading for firmware loading and later any file requested (non firmware) to replace udev deamons such as CRDA which should no longer be needed. Short term this means seeing what code we could re-use and the option to only force enable/passively enable signing is one of the options I'd like to see we keep for firmware signing. The same grammar as used for module signing can be used, but instead of copy+pasting code I decided to take generalize the feature option of sig_force, make it generic, learn from its implmentation of using const, making that generic and lastly to simplify this even further to one line code as I had done for the early_param_on_off() stuff recently. Since I'm also adding an on_off() case for module parameters I had to find a example simple use case for that, picked workqueue for that. We might later be able to use SmPL grammar to replace a lot of old code with these helpers (including early_param_on_off) but will let others look into that as I'd like to complete other tasks. All this goes test compiled on x86_64 on: * allnoconfig * allmodconfig * allyesconfig This series was based on top of linux-next next-20150420. Luis R. Rodriguez (6): kernel/params: constify struct kernel_param_ops uses kernel/module.c: use generic module param operaters for sig_enforce kernel/params.c: generalize bool_enable_only moduleparam.h: add module_param_config_*() helpers kernel/workqueue.c: use module_param_config_on_off() for power_efficient kernel/module.c: use module_param_config_on() for sig_enforce arch/s390/kernel/perf_cpum_sf.c | 2 +- arch/x86/kvm/mmu_audit.c| 2 +- arch/x86/platform/uv/uv_nmi.c | 2 +- drivers/block/null_blk.c| 4 +- drivers/char/ipmi/ipmi_watchdog.c | 6 +-- drivers/dma/dmatest.c | 4 +- drivers/ide/ide.c | 2 +- drivers/infiniband/ulp/srp/ib_srp.c | 4 +- drivers/input/misc/ati_remote2.c| 4 +- drivers/input/mouse/psmouse-base.c | 2 +- drivers/misc/lis3lv02d/lis3lv02d.c | 2 +- drivers/mtd/ubi/block.c | 2 +- drivers/net/wireless/ath/wil6210/main.c | 4 +- drivers/power/test_power.c | 16 drivers/thermal/intel_powerclamp.c | 4 +- drivers/tty/hvc/hvc_iucv.c | 2 +- drivers/tty/sysrq.c | 2 +- drivers/video/fbdev/uvesafb.c | 2 +- drivers/virtio/virtio_mmio.c| 2 +- fs/nfs/super.c | 2 +- include/linux/moduleparam.h | 73 ++--- kernel/module.c | 37 + kernel/params.c | 44 kernel/workqueue.c | 8 +--- net/sunrpc/auth.c | 2 +- net/sunrpc/xprtsock.c | 6 +-- security/apparmor/lsm.c | 6 +-- security/integrity/ima/ima_crypto.c | 2 +- sound/pci/hda/hda_intel.c | 2 +- 29 files changed, 141 insertions(+), 109 deletions(-) -- 2.3.2.209.gd67f9d5.dirty ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] documentation improvements
However, improving the user documentation is part of what I am supposdd to do on Coccinelle dugring this year. That is an interesting development. In particular, if you could let me know which are the areas which, according to you, are not so well documented, that woudl be helpful. I see that there are improvement possibilities like the following. * A bit of spell checking * How are the chances to pass program parameter descriptions to a dedicated Latex macro so that more consistent formatting of the option collection can be achieved? * Better outline around functionality from the semantic patch language * Would additional links be useful? * Can a tool like OCamlDoc also help? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] version 1.0.0
On Sun, Apr 19, 2015 at 05:37:21PM +0200, Julia Lawall wrote: Coccinelle version 1.0.0 is released. Congratulations, Julia! And thank you *very much* for all your hard work! All the best, Wolfram signature.asc Description: Digital signature ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
[Cocci] Is list_entry/rcu2.cocci example from coccinellery broken?
Hello, I'm trying to learn spatch. While playing around I've hit a problem of not being able to figure out how to rename hash_for_each_safe() in Linux kernel. I've looked around and found an adequate example which seemed to do what I'm interested in as well. However upon trying to test it it fails: ; cd /usr/src/linux ; wget https://raw.githubusercontent.com/coccinelle/coccinellery/c53a020006e37c40f006c3ab2f016b76b0de4d01/list_entry/rcu2.cocci ; spatch --version spatch version 1.0.0-rc24 with Python support and with PCRE support ; spatch --sp-file rcu2.cocci --dir . init_defs_builtins: /usr/local/share/coccinelle/standard.h 1179 1196 Fatal error: exception Failure(minus: parse error: = File rcu2.cocci, line 80, column 2, charpos = 1179 around = 'list_for_each_rcu', whole content = - list_for_each_rcu(_X(I),E1) ) Is this known? Is this a bug in spatch or is the example out of date? If it's the latter can anyone give me a hint how such a rename should be done now? Michał ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] version 1.0.0
Dear Markus, SF Markus Elfring (2015/04/20 10:25 +0200): Comments and bug reports are welcome. Thanks for your update on development progress. Does this software version contain also any improvements for the documentation which were occasionally missed in previous releases? I'm not sure there has been a lot done on documentation so far, but Julia will certainly correct this point if I'm wrong. However, improving the user documentation is part of what I am supposdd to do on Coccinelle dugring this year. That's why, I'd be interested in any feedback. In particular, if you could let me know which are the areas which, according to you, are not so well documented, that woudl be helpful. Best wishes, Sébastien. ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] version 1.0.0
Comments and bug reports are welcome. Thanks for your update on development progress. Does this software version contain also any improvements for the documentation which were occasionally missed in previous releases? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] version 1.0.0
On Mon, 20 Apr 2015, Wolfram Sang wrote: On Sun, Apr 19, 2015 at 05:37:21PM +0200, Julia Lawall wrote: Coccinelle version 1.0.0 is released. Congratulations, Julia! And thank you *very much* for all your hard work! Thanks. I hope it will actually work :) julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] version 1.0.0
Sébastien, However, improving the user documentation is part of what I am supposdd to do on Coccinelle dugring this year. That's why, I'd be interested in any feedback. In particular, if you could let me know which are the areas which, according to you, are not so well documented, that woudl be helpful. More and more people are hosting their documentation on github, written using markdown. https://help.github.com/articles/github-flavored-markdown/ Some examples: https://github.com/showcases/writing This approach also makes it easier for you to allow others to contribute. -- Derek M. Jones Software analysis tel: +44 (0)1252 520667 blog:shape-of-code.coding-guidelines.com ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci