<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/moduleparam.h, branch v4.0</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.0</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-10-14T00:18:28Z</updated>
<entry>
<title>kernel/param: consolidate __{start,stop}___param[] in &lt;linux/moduleparam.h&gt;</title>
<updated>2014-10-14T00:18:28Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2014-10-13T22:55:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=63a12d9d01831208a47f5c0fbbf93f503d1fb162'/>
<id>urn:sha1:63a12d9d01831208a47f5c0fbbf93f503d1fb162</id>
<content type='text'>
Consolidate the various external const and non-const declarations of
__start___param[] and __stop___param in &lt;linux/moduleparam.h&gt;.  This
requires making a few struct kernel_param pointers in kernel/params.c
const.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>moduleparam: Resolve missing-field-initializer warning</title>
<updated>2014-09-11T00:29:25Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2014-09-11T00:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=184c3fc3f52fb75800deb76deffb70907d1f76ea'/>
<id>urn:sha1:184c3fc3f52fb75800deb76deffb70907d1f76ea</id>
<content type='text'>
Resolve a missing-field-initializer warning, that is produced
by every reference to module_param_call, by using designated
initialization for the first field. That is enough to silence
the complaint.

The message is only seen when doing a W=2 build. I happened to be using gcc
4.8.3, but I think most versions would produce the warning when it is
enabled. It can either be silenced by using even a single designated
initializer as I did here, or providing values for all of the fields. Because
of the number of references to the macro, this change silences many warnings
in W=2 builds.

One instance of the full warning message looks like this:

/home/share/git/nn-mdr/include/linux/moduleparam.h:198:16: warning: missing
initializer for field ‘free’ of ‘struct kernel_param_ops’
[-Wmissing-field-initializers]
  static struct kernel_param_ops __param_ops_##name =  \
		  ^
/home/share/git/nn-mdr/fs/fuse/inode.c:35:1: note: in expansion of macro
‘module_param_call’
 module_param_call(max_user_bgreq, set_global_limit, param_get_uint,
 ^
/home/share/git/nn-mdr/include/linux/moduleparam.h:56:9: note: ‘free’
declared here
  void (*free)(void *arg);

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>param: check for tainting before calling set op.</title>
<updated>2014-08-27T12:24:10Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2014-08-26T20:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7a486d3781295b5298cbf9556928a76d26896863'/>
<id>urn:sha1:7a486d3781295b5298cbf9556928a76d26896863</id>
<content type='text'>
This means every set op doesn't need to call it, and it can move into
params.c.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module: add module_param_unsafe and module_param_named_unsafe</title>
<updated>2014-08-27T12:24:08Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2014-08-26T20:53:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3baee201b06cfaff84c2c5ddc551b192bb3eaed3'/>
<id>urn:sha1:3baee201b06cfaff84c2c5ddc551b192bb3eaed3</id>
<content type='text'>
Add the helpers to be used by modules wishing to expose unsafe debugging
or testing module parameters that taint the kernel when set.

Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Li Zhong &lt;zhong@linux.vnet.ibm.com&gt;
Cc: Jon Mason &lt;jon.mason@intel.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module: make it possible to have unsafe, tainting module params</title>
<updated>2014-08-27T12:24:08Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2014-08-26T20:52:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=91f9d330cc14932084c37751997213cb0e7ea882'/>
<id>urn:sha1:91f9d330cc14932084c37751997213cb0e7ea882</id>
<content type='text'>
Add flags field to struct kernel_params, and add the first flag: unsafe
parameter. Modifying a kernel parameter with the unsafe flag set, either
via the kernel command line or sysfs, will issue a warning and taint the
kernel.

Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Li Zhong &lt;zhong@linux.vnet.ibm.com&gt;
Cc: Jon Mason &lt;jon.mason@intel.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module: rename KERNEL_PARAM_FL_NOARG to avoid confusion</title>
<updated>2014-08-27T12:24:07Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2014-08-26T20:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6a4c264313c4ae32dc53821a9c57e0dc9696fb81'/>
<id>urn:sha1:6a4c264313c4ae32dc53821a9c57e0dc9696fb81</id>
<content type='text'>
Make it clear this is about kernel_param_ops, not kernel_param (which
will soon have a flags field of its own). No functional changes.

Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Li Zhong &lt;zhong@linux.vnet.ibm.com&gt;
Cc: Jon Mason &lt;jon.mason@intel.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>Add module param type 'ullong'</title>
<updated>2014-07-17T20:07:37Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2014-06-25T13:27:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b4210b810e5040f10a30ba56de6c3faab5c49345'/>
<id>urn:sha1:b4210b810e5040f10a30ba56de6c3faab5c49345</id>
<content type='text'>
Some driver might want to pass in an 64-bit value, so introduce
a module param type 'ullong'.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>param: hand arguments after -- straight to init</title>
<updated>2014-04-28T02:18:34Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2014-04-28T02:04:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=51e158c12aca3c9ac63988611a97c05109b14dc9'/>
<id>urn:sha1:51e158c12aca3c9ac63988611a97c05109b14dc9</id>
<content type='text'>
The kernel passes any args it doesn't need through to init, except it
assumes anything containing '.' belongs to the kernel (for a module).
This change means all users can clearly distinguish which arguments
are for init.

For example, the kernel uses debug ("dee-bug") to mean log everything to
the console, where systemd uses the debug from the Scandinavian "day-boog"
meaning "fail to boot".  If a future versions uses argv[] instead of
reading /proc/cmdline, this confusion will be avoided.

eg: test 'FOO="this is --foo"' -- 'systemd.debug="true true true"'

Gives:
argv[0] = '/debug-init'
argv[1] = 'test'
argv[2] = 'systemd.debug=true true true'
envp[0] = 'HOME=/'
envp[1] = 'TERM=linux'
envp[2] = 'FOO=this is --foo'

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>VERIFY_OCTAL_PERMISSIONS: stricter checking for sysfs perms.</title>
<updated>2014-03-24T01:51:00Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2014-03-24T01:30:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=58f86cc89c3372d3e61d5b71e5513ec5a0b02848'/>
<id>urn:sha1:58f86cc89c3372d3e61d5b71e5513ec5a0b02848</id>
<content type='text'>
Summary of http://lkml.org/lkml/2014/3/14/363 :

  Ted: module_param(queue_depth, int, 444)
  Joe: 0444!
  Rusty: User perms &gt;= group perms &gt;= other perms?
  Joe: CLASS_ATTR, DEVICE_ATTR, SENSOR_ATTR and SENSOR_ATTR_2?

Side effect of stricter permissions means removing the unnecessary
S_IFREG from several callers.

Note that the BUILD_BUG_ON_ZERO((perm) &amp; 2) test was removed: a fair
number of drivers fail this test, so that will be the debate for a
future patch.

Suggested-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt; for drivers/pci/slot.c
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module: LLVMLinux: Remove unused function warning from __param_check macro</title>
<updated>2014-03-17T04:24:50Z</updated>
<author>
<name>Mark Charlebois</name>
<email>charlebm@gmail.com</email>
</author>
<published>2014-03-17T02:48:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0283f9a529c81e64bafea80d6d3e056d1c3f656d'/>
<id>urn:sha1:0283f9a529c81e64bafea80d6d3e056d1c3f656d</id>
<content type='text'>
This code makes a compile time type check that is optimized away. Clang
complains that it generates an unused function:

linux/kernel/panic.c:471:1: warning: unused function '__check_panic'
      [-Wunused-function]
core_param(panic, panic_timeout, int, 0644);
^
linux/moduleparam.h:283:2: note: expanded from macro
      'core_param'
        param_check_##type(name, &amp;(var));                               \
        ^
&lt;scratch space&gt;:87:1: note: expanded from here
param_check_int
^
linux/moduleparam.h:369:34: note: expanded from macro
      'param_check_int'
#define param_check_int(name, p) __param_check(name, p, int)
                                 ^
linux/moduleparam.h:349:22: note: expanded from macro
      '__param_check'
        static inline type *__check_##name(void) { return(p); }
                            ^
&lt;scratch space&gt;:88:1: note: expanded from here
__check_panic

GCC won't complain for a static inline function but would if it was just
a static function.

Adding the unused attribute to the function declaration removes the warning.
Per request from Rusty Russell it is marked as __always_unused as the code
is meant to be optimized away.

This code works for both GCC and clang.

Signed-off-by: Mark Charlebois &lt;charlebm@gmail.com&gt;
Signed-off-by: Behan Webster &lt;behanw@converseincode.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
</feed>
