<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/params.c, 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>2015-01-20T01:08:31Z</updated>
<entry>
<title>param: fix uninitialized read with CONFIG_DEBUG_LOCK_ALLOC</title>
<updated>2015-01-20T01:08:31Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2015-01-19T22:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c772be52319de9756fd82f36d37a6d3e003441e3'/>
<id>urn:sha1:c772be52319de9756fd82f36d37a6d3e003441e3</id>
<content type='text'>
ignore_lockdep is uninitialized, and sysfs_attr_init() doesn't initialize
it, so memset to 0.

Reported-by: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>param: initialize store function to NULL if not available.</title>
<updated>2014-12-23T04:37:41Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2014-12-23T04:35:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=574732c73d155320f9358d9ee5d84beb0f4ecee2'/>
<id>urn:sha1:574732c73d155320f9358d9ee5d84beb0f4ecee2</id>
<content type='text'>
I rebased Kees' 'param: do not set store func without write perm'
on top of my 'params: cleanup sysfs allocation'.  However, my patch
uses krealloc which doesn't zero memory, leaving .store unset.

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>param: do not set store func without write perm</title>
<updated>2014-12-18T02:08:51Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2014-12-12T03:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b0a65b0cccd477b2fd8b7adad0ac39433df54829'/>
<id>urn:sha1:b0a65b0cccd477b2fd8b7adad0ac39433df54829</id>
<content type='text'>
When a module_param is defined without DAC write permissions, it can
still be changed at runtime and updated. Drivers using a 0444 permission
may be surprised that these values can still be changed.

For drivers that want to allow updates, any S_IW* flag will set the
"store" function as before. Drivers without S_IW* flags will have the
"store" function unset, unforcing a read-only value. Drivers that wish
neither "store" nor "get" can continue to use "0" for perms to stay out
of sysfs entirely.

Old behavior:
  # cd /sys/module/snd/parameters
  # ls -l
  total 0
  -r--r--r-- 1 root root 4096 Dec 11 13:55 cards_limit
  -r--r--r-- 1 root root 4096 Dec 11 13:55 major
  -r--r--r-- 1 root root 4096 Dec 11 13:55 slots
  # cat major
  116
  # echo -1 &gt; major
  -bash: major: Permission denied
  # chmod u+w major
  # echo -1 &gt; major
  # cat major
  -1

New behavior:
  ...
  # chmod u+w major
  # echo -1 &gt; major
  -bash: echo: write error: Input/output error

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>params: cleanup sysfs allocation</title>
<updated>2014-11-11T06:37:47Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2014-11-09T23:02:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=18eb74fa94161380c1acc9cf562cb835c4e54a25'/>
<id>urn:sha1:18eb74fa94161380c1acc9cf562cb835c4e54a25</id>
<content type='text'>
commit 63662139e519ce06090b2759cf4a1d291b9cc0e2 attempted to patch a
leak (which would only happen on OOM, ie. never), but it didn't quite
work.

This rewrites the code to be as simple as possible.  add_sysfs_param()
adds a parameter.  If it fails, it's the caller's responsibility to
clean up the parameters which already exist.

The kzalloc-then-always-krealloc pattern is perhaps overly simplistic,
but this code has clearly confused people.  It worked on me...

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<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>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: 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>
</feed>
