<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/kernel/module.c, branch v4.15-rc9</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.15-rc9</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.15-rc9'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2017-11-29T18:30:13+00:00</updated>
<entry>
<title>kallsyms: take advantage of the new '%px' format</title>
<updated>2017-11-29T18:30:13+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-11-29T18:30:13+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=668533dc0764b30c9dd2baf3ca800156f688326b'/>
<id>urn:sha1:668533dc0764b30c9dd2baf3ca800156f688326b</id>
<content type='text'>
The conditional kallsym hex printing used a special fixed-width '%lx'
output (KALLSYM_FMT) in preparation for the hashing of %p, but that
series ended up adding a %px specifier to help with the conversions.

Use it, and avoid the "print pointer as an unsigned long" code.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'trace-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace</title>
<updated>2017-11-17T22:58:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-11-17T22:58:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2dcd9c71c1ffa9a036e09047f60e08383bb0abb6'/>
<id>urn:sha1:2dcd9c71c1ffa9a036e09047f60e08383bb0abb6</id>
<content type='text'>
Pull tracing updates from

 - allow module init functions to be traced

 - clean up some unused or not used by config events (saves space)

 - clean up of trace histogram code

 - add support for preempt and interrupt enabled/disable events

 - other various clean ups

* tag 'trace-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (30 commits)
  tracing, thermal: Hide cpu cooling trace events when not in use
  tracing, thermal: Hide devfreq trace events when not in use
  ftrace: Kill FTRACE_OPS_FL_PER_CPU
  perf/ftrace: Small cleanup
  perf/ftrace: Fix function trace events
  perf/ftrace: Revert ("perf/ftrace: Fix double traces of perf on ftrace:function")
  tracing, dma-buf: Remove unused trace event dma_fence_annotate_wait_on
  tracing, memcg, vmscan: Hide trace events when not in use
  tracing/xen: Hide events that are not used when X86_PAE is not defined
  tracing: mark trace_test_buffer as __maybe_unused
  printk: Remove superfluous memory barriers from printk_safe
  ftrace: Clear hashes of stale ips of init memory
  tracing: Add support for preempt and irq enable/disable events
  tracing: Prepare to add preempt and irq trace events
  ftrace/kallsyms: Have /proc/kallsyms show saved mod init functions
  ftrace: Add freeing algorithm to free ftrace_mod_maps
  ftrace: Save module init functions kallsyms symbols for tracing
  ftrace: Allow module init functions to be traced
  ftrace: Add a ftrace_free_mem() function for modules to use
  tracing: Reimplement log2
  ...
</content>
</entry>
<entry>
<title>Merge tag 'modules-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux</title>
<updated>2017-11-15T21:46:33+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-11-15T21:46:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1be2172e96e33bfa22a5c7a651f768ef30ce3984'/>
<id>urn:sha1:1be2172e96e33bfa22a5c7a651f768ef30ce3984</id>
<content type='text'>
Pull module updates from Jessica Yu:
 "Summary of modules changes for the 4.15 merge window:

   - treewide module_param_call() cleanup, fix up set/get function
     prototype mismatches, from Kees Cook

   - minor code cleanups"

* tag 'modules-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
  module: Do not paper over type mismatches in module_param_call()
  treewide: Fix function prototypes for module_param_call()
  module: Prepare to convert all module_param_call() prototypes
  kernel/module: Delete an error message for a failed memory allocation in add_module_usage()
</content>
</entry>
<entry>
<title>Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security</title>
<updated>2017-11-13T18:41:25+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-11-13T18:41:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b33e3cc5c90b8293599318b68e61b93a89c127bb'/>
<id>urn:sha1:b33e3cc5c90b8293599318b68e61b93a89c127bb</id>
<content type='text'>
Pull security subsystem integrity updates from James Morris:
 "There is a mixture of bug fixes, code cleanup, preparatory code for
  new functionality and new functionality.

  Commit 26ddabfe96bb ("evm: enable EVM when X509 certificate is
  loaded") enabled EVM without loading a symmetric key, but was limited
  to defining the x509 certificate pathname at build. Included in this
  set of patches is the ability of enabling EVM, without loading the EVM
  symmetric key, from userspace. New is the ability to prevent the
  loading of an EVM symmetric key."

* 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  ima: Remove redundant conditional operator
  ima: Fix bool initialization/comparison
  ima: check signature enforcement against cmdline param instead of CONFIG
  module: export module signature enforcement status
  ima: fix hash algorithm initialization
  EVM: Only complain about a missing HMAC key once
  EVM: Allow userspace to signal an RSA key has been loaded
  EVM: Include security.apparmor in EVM measurements
  ima: call ima_file_free() prior to calling fasync
  integrity: use kernel_read_file_from_path() to read x509 certs
  ima: always measure and audit files in policy
  ima: don't remove the securityfs policy file
  vfs: fix mounting a filesystem with i_version
</content>
</entry>
<entry>
<title>/proc/module: use the same logic as /proc/kallsyms for address exposure</title>
<updated>2017-11-13T03:01:23+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-11-13T02:44:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=516fb7f2e73dcc303fb97fc3593209fcacf2d982'/>
<id>urn:sha1:516fb7f2e73dcc303fb97fc3593209fcacf2d982</id>
<content type='text'>
The (alleged) users of the module addresses are the same: kernel
profiling.

So just expose the same helper and format macros, and unify the logic.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>modules: make sysfs attribute files readable by owner only</title>
<updated>2017-11-13T01:00:53+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-11-13T01:00:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=277642dcca765a1955d4c753a5a315ff7f2eb09d'/>
<id>urn:sha1:277642dcca765a1955d4c753a5a315ff7f2eb09d</id>
<content type='text'>
This code goes back to the historical bitkeeper tree commit 3f7b0672086
("Module section offsets in /sys/module"), where Jonathan Corbet wanted
to show people how to debug loadable modules.

See

    https://lwn.net/Articles/88052/

from June 2004.

To expose the required load address information, Jonathan added the
sections subdirectory for every module in /sys/modules, and made them
S_IRUGO - readable by everybody.

It was a more innocent time, plus those S_IRxxx macro names are a lot
more confusing than the octal numbers are, so maybe it wasn't even
intentional.  But here we are, thirteen years later, and I'll just change
it to S_IRUSR instead.

Let's see if anybody even notices.

Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>module: export module signature enforcement status</title>
<updated>2017-11-08T20:16:36+00:00</updated>
<author>
<name>Bruno E. O. Meneguele</name>
<email>brdeoliv@redhat.com</email>
</author>
<published>2017-10-24T17:37:00+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fda784e50aace694ec2e4e16e2de07b91a938563'/>
<id>urn:sha1:fda784e50aace694ec2e4e16e2de07b91a938563</id>
<content type='text'>
A static variable sig_enforce is used as status var to indicate the real
value of CONFIG_MODULE_SIG_FORCE, once this one is set the var will hold
true, but if the CONFIG is not set the status var will hold whatever
value is present in the module.sig_enforce kernel cmdline param: true
when =1 and false when =0 or not present.

Considering this cmdline param take place over the CONFIG value when
it's not set, other places in the kernel could misbehave since they
would have only the CONFIG_MODULE_SIG_FORCE value to rely on. Exporting
this status var allows the kernel to rely in the effective value of
module signature enforcement, being it from CONFIG value or cmdline
param.

Signed-off-by: Bruno E. O. Meneguele &lt;brdeoliv@redhat.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>kernel/module: Delete an error message for a failed memory allocation in add_module_usage()</title>
<updated>2017-10-19T11:06:13+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2017-10-06T14:27:26+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9ad0457423af877ad1b76c105a57130da028ccad'/>
<id>urn:sha1:9ad0457423af877ad1b76c105a57130da028ccad</id>
<content type='text'>
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Jessica Yu &lt;jeyu@kernel.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Save module init functions kallsyms symbols for tracing</title>
<updated>2017-10-05T21:57:33+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-09-01T12:35:38+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=aba4b5c22cbac296f4081a0476d0c55828f135b4'/>
<id>urn:sha1:aba4b5c22cbac296f4081a0476d0c55828f135b4</id>
<content type='text'>
If function tracing is active when the module init functions are freed, then
store them to be referenced by kallsyms. As module init functions can now be
traced on module load, they were useless:

 &gt;# echo ':mod:snd_seq' &gt; set_ftrace_filter
 &gt;# echo function &gt; current_tracer
 &gt;# modprobe snd_seq
 &gt;# cat trace
 # tracer: function
 #
 #                              _-----=&gt; irqs-off
 #                             / _----=&gt; need-resched
 #                            | / _---=&gt; hardirq/softirq
 #                            || / _--=&gt; preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
         modprobe-2786  [000] ....  3189.037874: 0xffffffffa0860000 &lt;-do_one_initcall
         modprobe-2786  [000] ....  3189.037876: 0xffffffffa086004d &lt;-0xffffffffa086000f
         modprobe-2786  [000] ....  3189.037876: 0xffffffffa086010d &lt;-0xffffffffa0860018
         modprobe-2786  [000] ....  3189.037877: 0xffffffffa086011a &lt;-0xffffffffa0860021
         modprobe-2786  [000] ....  3189.037877: 0xffffffffa0860080 &lt;-0xffffffffa086002a
         modprobe-2786  [000] ....  3189.039523: 0xffffffffa0860400 &lt;-0xffffffffa0860033
         modprobe-2786  [000] ....  3189.039523: 0xffffffffa086038a &lt;-0xffffffffa086041c
         modprobe-2786  [000] ....  3189.039591: 0xffffffffa086038a &lt;-0xffffffffa0860436
         modprobe-2786  [000] ....  3189.039657: 0xffffffffa086038a &lt;-0xffffffffa0860450
         modprobe-2786  [000] ....  3189.039719: 0xffffffffa0860127 &lt;-0xffffffffa086003c
         modprobe-2786  [000] ....  3189.039742: snd_seq_create_kernel_client &lt;-0xffffffffa08601f6

When the output is shown, the kallsyms for the module init functions have
already been freed, and the output of the trace can not convert them to
their function names.

Now this looks like this:

 # tracer: function
 #
 #                              _-----=&gt; irqs-off
 #                             / _----=&gt; need-resched
 #                            | / _---=&gt; hardirq/softirq
 #                            || / _--=&gt; preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
         modprobe-2463  [002] ....   174.243237: alsa_seq_init &lt;-do_one_initcall
         modprobe-2463  [002] ....   174.243239: client_init_data &lt;-alsa_seq_init
         modprobe-2463  [002] ....   174.243240: snd_sequencer_memory_init &lt;-alsa_seq_init
         modprobe-2463  [002] ....   174.243240: snd_seq_queues_init &lt;-alsa_seq_init
         modprobe-2463  [002] ....   174.243240: snd_sequencer_device_init &lt;-alsa_seq_init
         modprobe-2463  [002] ....   174.244860: snd_seq_info_init &lt;-alsa_seq_init
         modprobe-2463  [002] ....   174.244861: create_info_entry &lt;-snd_seq_info_init
         modprobe-2463  [002] ....   174.244936: create_info_entry &lt;-snd_seq_info_init
         modprobe-2463  [002] ....   174.245003: create_info_entry &lt;-snd_seq_info_init
         modprobe-2463  [002] ....   174.245072: snd_seq_system_client_init &lt;-alsa_seq_init
         modprobe-2463  [002] ....   174.245094: snd_seq_create_kernel_client &lt;-snd_seq_system_client_init

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Allow module init functions to be traced</title>
<updated>2017-10-05T21:57:30+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-03-03T23:00:22+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3e234289f86b12985ef8909cd34525fcb66c4efb'/>
<id>urn:sha1:3e234289f86b12985ef8909cd34525fcb66c4efb</id>
<content type='text'>
Allow for module init sections to be traced as well as core kernel init
sections. Now that filtering modules functions can be stored, for when they
are loaded, it makes sense to be able to trace them.

Cc: Jessica Yu &lt;jeyu@kernel.org&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
