<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/module.h, branch v3.12.33</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.33</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.33'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-07-02T10:05:56Z</updated>
<entry>
<title>module: allow multiple calls to MODULE_DEVICE_TABLE() per module</title>
<updated>2014-07-02T10:05:56Z</updated>
<author>
<name>Tom Gundersen</name>
<email>teg@jklm.no</email>
</author>
<published>2014-02-03T00:44:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c0994abad32816af80e7a32b37e1f2868d77a584'/>
<id>urn:sha1:c0994abad32816af80e7a32b37e1f2868d77a584</id>
<content type='text'>
commit 21bdd17b21b45ea48e06e23918d681afbe0622e9 upstream.

Commit 78551277e4df5: "Input: i8042 - add PNP modaliases" had a bug, where the
second call to MODULE_DEVICE_TABLE() overrode the first resulting in not all
the modaliases being exposed.

This fixes the problem by including the name of the device_id table in the
__mod_*_device_table alias, allowing us to export several device_id tables
per module.

Suggested-by: Kay Sievers &lt;kay@vrfy.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Tom Gundersen &lt;teg@jklm.no&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

Conflicts:
	include/linux/module.h
</content>
</entry>
<entry>
<title>module: Fix mod-&gt;mkobj.kobj potentially freed too early</title>
<updated>2013-09-03T07:05:47Z</updated>
<author>
<name>Li Zhong</name>
<email>zhong@linux.vnet.ibm.com</email>
</author>
<published>2013-09-03T07:03:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=942e443127e928a5631c3d5102aca8c8b3c2dd98'/>
<id>urn:sha1:942e443127e928a5631c3d5102aca8c8b3c2dd98</id>
<content type='text'>
DEBUG_KOBJECT_RELEASE helps to find the issue attached below.

After some investigation, it seems the reason is:
The mod-&gt;mkobj.kobj(ffffffffa01600d0 below) is freed together with mod
itself in free_module(). However, its children still hold references to
it, as the delay caused by DEBUG_KOBJECT_RELEASE. So when the
child(holders below) tries to decrease the reference count to its parent
in kobject_del(), BUG happens as it tries to access already freed memory.

This patch tries to fix it by waiting for the mod-&gt;mkobj.kobj to be
really released in the module removing process (and some error code
paths).

[ 1844.175287] kobject: 'holders' (ffff88007c1f1600): kobject_release, parent ffffffffa01600d0 (delayed)
[ 1844.178991] kobject: 'notes' (ffff8800370b2a00): kobject_release, parent ffffffffa01600d0 (delayed)
[ 1845.180118] kobject: 'holders' (ffff88007c1f1600): kobject_cleanup, parent ffffffffa01600d0
[ 1845.182130] kobject: 'holders' (ffff88007c1f1600): auto cleanup kobject_del
[ 1845.184120] BUG: unable to handle kernel paging request at ffffffffa01601d0
[ 1845.185026] IP: [&lt;ffffffff812cda81&gt;] kobject_put+0x11/0x60
[ 1845.185026] PGD 1a13067 PUD 1a14063 PMD 7bd30067 PTE 0
[ 1845.185026] Oops: 0000 [#1] PREEMPT
[ 1845.185026] Modules linked in: xfs libcrc32c [last unloaded: kprobe_example]
[ 1845.185026] CPU: 0 PID: 18 Comm: kworker/0:1 Tainted: G           O 3.11.0-rc6-next-20130819+ #1
[ 1845.185026] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
[ 1845.185026] Workqueue: events kobject_delayed_cleanup
[ 1845.185026] task: ffff88007ca51f00 ti: ffff88007ca5c000 task.ti: ffff88007ca5c000
[ 1845.185026] RIP: 0010:[&lt;ffffffff812cda81&gt;]  [&lt;ffffffff812cda81&gt;] kobject_put+0x11/0x60
[ 1845.185026] RSP: 0018:ffff88007ca5dd08  EFLAGS: 00010282
[ 1845.185026] RAX: 0000000000002000 RBX: ffffffffa01600d0 RCX: ffffffff8177d638
[ 1845.185026] RDX: ffff88007ca5dc18 RSI: 0000000000000000 RDI: ffffffffa01600d0
[ 1845.185026] RBP: ffff88007ca5dd18 R08: ffffffff824e9810 R09: ffffffffffffffff
[ 1845.185026] R10: ffff8800ffffffff R11: dead4ead00000001 R12: ffffffff81a95040
[ 1845.185026] R13: ffff88007b27a960 R14: ffff88007c1f1600 R15: 0000000000000000
[ 1845.185026] FS:  0000000000000000(0000) GS:ffffffff81a23000(0000) knlGS:0000000000000000
[ 1845.185026] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1845.185026] CR2: ffffffffa01601d0 CR3: 0000000037207000 CR4: 00000000000006b0
[ 1845.185026] Stack:
[ 1845.185026]  ffff88007c1f1600 ffff88007c1f1600 ffff88007ca5dd38 ffffffff812cdb7e
[ 1845.185026]  0000000000000000 ffff88007c1f1640 ffff88007ca5dd68 ffffffff812cdbfe
[ 1845.185026]  ffff88007c974800 ffff88007c1f1640 ffff88007ff61a00 0000000000000000
[ 1845.185026] Call Trace:
[ 1845.185026]  [&lt;ffffffff812cdb7e&gt;] kobject_del+0x2e/0x40
[ 1845.185026]  [&lt;ffffffff812cdbfe&gt;] kobject_delayed_cleanup+0x6e/0x1d0
[ 1845.185026]  [&lt;ffffffff81063a45&gt;] process_one_work+0x1e5/0x670
[ 1845.185026]  [&lt;ffffffff810639e3&gt;] ? process_one_work+0x183/0x670
[ 1845.185026]  [&lt;ffffffff810642b3&gt;] worker_thread+0x113/0x370
[ 1845.185026]  [&lt;ffffffff810641a0&gt;] ? rescuer_thread+0x290/0x290
[ 1845.185026]  [&lt;ffffffff8106bfba&gt;] kthread+0xda/0xe0
[ 1845.185026]  [&lt;ffffffff814ff0f0&gt;] ? _raw_spin_unlock_irq+0x30/0x60
[ 1845.185026]  [&lt;ffffffff8106bee0&gt;] ? kthread_create_on_node+0x130/0x130
[ 1845.185026]  [&lt;ffffffff8150751a&gt;] ret_from_fork+0x7a/0xb0
[ 1845.185026]  [&lt;ffffffff8106bee0&gt;] ? kthread_create_on_node+0x130/0x130
[ 1845.185026] Code: 81 48 c7 c7 28 95 ad 81 31 c0 e8 9b da 01 00 e9 4f ff ff ff 66 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb 48 83 ec 08 48 85 ff 74 1d &lt;f6&gt; 87 00 01 00 00 01 74 1e 48 8d 7b 38 83 6b 38 01 0f 94 c0 84
[ 1845.185026] RIP  [&lt;ffffffff812cda81&gt;] kobject_put+0x11/0x60
[ 1845.185026]  RSP &lt;ffff88007ca5dd08&gt;
[ 1845.185026] CR2: ffffffffa01601d0
[ 1845.185026] ---[ end trace 49a70afd109f5653 ]---

Signed-off-by: Li Zhong &lt;zhong@linux.vnet.ibm.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>modules: add support for soft module dependencies</title>
<updated>2013-08-20T06:07:41Z</updated>
<author>
<name>Andreas Robinson</name>
<email>andr345@gmail.com</email>
</author>
<published>2013-08-20T06:03:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7cb14ba75d57910cc4b62115dd5db7bd83c93684'/>
<id>urn:sha1:7cb14ba75d57910cc4b62115dd5db7bd83c93684</id>
<content type='text'>
Additional and optional dependencies not found while building the kernel and
modules, can now be declared explicitly.

Signed-off-by: Andreas Robinson &lt;andr345@gmail.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>CONFIG_SYMBOL_PREFIX: cleanup.</title>
<updated>2013-03-15T04:39:43Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2013-03-15T04:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b92021b09df70c1609e3547f3d6128dd560be97f'/>
<id>urn:sha1:b92021b09df70c1609e3547f3d6128dd560be97f</id>
<content type='text'>
We have CONFIG_SYMBOL_PREFIX, which three archs define to the string
"_".  But Al Viro broke this in "consolidate cond_syscall and
SYSCALL_ALIAS declarations" (in linux-next), and he's not the first to
do so.

Using CONFIG_SYMBOL_PREFIX is awkward, since we usually just want to
prefix it so something.  So various places define helpers which are
defined to nothing if CONFIG_SYMBOL_PREFIX isn't set:

1) include/asm-generic/unistd.h defines __SYMBOL_PREFIX.
2) include/asm-generic/vmlinux.lds.h defines VMLINUX_SYMBOL(sym)
3) include/linux/export.h defines MODULE_SYMBOL_PREFIX.
4) include/linux/kernel.h defines SYMBOL_PREFIX (which differs from #7)
5) kernel/modsign_certificate.S defines ASM_SYMBOL(sym)
6) scripts/modpost.c defines MODULE_SYMBOL_PREFIX
7) scripts/Makefile.lib defines SYMBOL_PREFIX on the commandline if
   CONFIG_SYMBOL_PREFIX is set, so that we have a non-string version
   for pasting.

(arch/h8300/include/asm/linkage.h defines SYMBOL_NAME(), too).

Let's solve this properly:
1) No more generic prefix, just CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
2) Make linux/export.h usable from asm.
3) Define VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR().
4) Make everyone use them.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Reviewed-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Tested-by: James Hogan &lt;james.hogan@imgtec.com&gt; (metag)
</content>
</entry>
<entry>
<title>module: constify within_module_*</title>
<updated>2013-01-21T06:48:20Z</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2013-01-21T06:47:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=93843b3764170819aeb07fc867a0499b33a875ca'/>
<id>urn:sha1:93843b3764170819aeb07fc867a0499b33a875ca</id>
<content type='text'>
These helper functions just check a set intersection with a range, and
don't actually modify struct module.

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module: add new state MODULE_STATE_UNFORMED.</title>
<updated>2013-01-12T02:57:05Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2013-01-12T01:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0d21b0e3477395e7ff2acc269f15df6e6a8d356d'/>
<id>urn:sha1:0d21b0e3477395e7ff2acc269f15df6e6a8d356d</id>
<content type='text'>
You should never look at such a module, so it's excised from all paths
which traverse the modules list.

We add the state at the end, to avoid gratuitous ABI break (ksplice).

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module: signature checking hook</title>
<updated>2012-10-10T09:30:55Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2012-09-26T09:09:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=106a4ee258d14818467829bf0e12aeae14c16cd7'/>
<id>urn:sha1:106a4ee258d14818467829bf0e12aeae14c16cd7</id>
<content type='text'>
We do a very simple search for a particular string appended to the module
(which is cache-hot and about to be SHA'd anyway).  There's both a config
option and a boot parameter which control whether we accept or fail with
unsigned modules and modules that are signed with an unknown key.

If module signing is enabled, the kernel will be tainted if a module is
loaded that is unsigned or has a signature for which we don't have the
key.

(Useful feedback and tweaks by David Howells &lt;dhowells@redhat.com&gt;)

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module: move __module_get and try_module_get() out of line.</title>
<updated>2012-03-26T02:20:52Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2012-03-26T02:20:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d53799be6758841e1ffb1fd3780f73d0ffe44432'/>
<id>urn:sha1:d53799be6758841e1ffb1fd3780f73d0ffe44432</id>
<content type='text'>
With the preempt, tracepoint and everything, it's getting a bit
chubby.  For an Ubuntu-based config:

Before:
	$ size -t `find * -name '*.ko'` | grep TOTAL
	56199906        3870760	1606616	61677282	3ad1ee2	(TOTALS)
	$ size vmlinux
	   text	   data	    bss	    dec	    hex	filename
	8509342	 850368	3358720	12718430	 c2115e	vmlinux

After:
	$ size -t `find * -name '*.ko'` | grep TOTAL
	56183760	3867892	1606616	61658268	3acd49c	(TOTALS)
	$ size vmlinux
	   text	   data	    bss	    dec	    hex	filename
	8501842	 849088	3358720	12709650	 c1ef12	vmlinux

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (made all out-of-line)
</content>
</entry>
<entry>
<title>module: struct module_ref should contains long fields</title>
<updated>2012-01-12T23:02:14Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-01-12T23:02:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bd77c04772da38fca510c81f78e51f727123b919'/>
<id>urn:sha1:bd77c04772da38fca510c81f78e51f727123b919</id>
<content type='text'>
module_ref contains two "unsigned int" fields.

Thats now too small, since some machines can open more than 2^32 files.

Check commit 518de9b39e8 (fs: allow for more than 2^31 files) for
reference.

We can add an aligned(2 * sizeof(unsigned long)) attribute to force
alloc_percpu() allocating module_ref areas in single cache lines.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
CC: Tejun Heo &lt;tj@kernel.org&gt;
CC: Robin Holt &lt;holt@sgi.com&gt;
CC: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module.h: relocate MODULE_PARM_DESC into moduleparam.h</title>
<updated>2011-10-31T13:20:11Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-08-30T15:24:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=639938eb606e94af498c589feae2f0b8a5c285d1'/>
<id>urn:sha1:639938eb606e94af498c589feae2f0b8a5c285d1</id>
<content type='text'>
There are files which use module_param and MODULE_PARM_DESC
back to back.  They only include moduleparam.h which makes sense,
but the implicit presence of module.h everywhere hid the fact
that MODULE_PARM_DESC wasn't in moduleparam.h at all.  Relocate
the macro to moduleparam.h so that the moduleparam infrastructure
can be used independently of module.h

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
</feed>
