<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/kallsyms.c, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-10-14T00:18:16Z</updated>
<entry>
<title>kernel/kallsyms.c: use __seq_open_private()</title>
<updated>2014-10-14T00:18:16Z</updated>
<author>
<name>Rob Jones</name>
<email>rob.jones@codethink.co.uk</email>
</author>
<published>2014-10-13T22:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0049f26ae0ad00016d8e237a6d712bff155cedc5'/>
<id>urn:sha1:0049f26ae0ad00016d8e237a6d712bff155cedc5</id>
<content type='text'>
Reduce boilerplate code by using __seq_open_private() instead of
seq_open() in kallsyms_open().

Signed-off-by: Rob Jones &lt;rob.jones@codethink.co.uk&gt;
Cc: Gideon Israel Dsouza &lt;gidisrael@gmail.com&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>kernel/kallsyms.c: fix %pB when there's no symbol at the address</title>
<updated>2014-08-08T22:57:18Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2014-08-08T21:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b86280aa48b67c8119ed8f6c6bebd8c0af13a269'/>
<id>urn:sha1:b86280aa48b67c8119ed8f6c6bebd8c0af13a269</id>
<content type='text'>
__sprint_symbol() should restore original address when kallsyms_lookup()
failed to find a symbol.  It's reported when dumpstack shows an address in
a dynamically allocated trampoline for ftrace.

  [ 1314.612287]  [&lt;ffffffff81700312&gt;] dump_stack+0x45/0x56
  [ 1314.612290]  [&lt;ffffffff8125f5b0&gt;] ? meminfo_proc_open+0x30/0x30
  [ 1314.612293]  [&lt;ffffffffa080a494&gt;] kpatch_ftrace_handler+0x14/0xf0 [kpatch]
  [ 1314.612306]  [&lt;ffffffffa00160c4&gt;] 0xffffffffa00160c3

You can see a difference in the hex address - c4 and c3.  Fix it.

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reported-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&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>kernel: use macros from compiler.h instead of __attribute__((...))</title>
<updated>2014-04-07T23:36:11Z</updated>
<author>
<name>Gideon Israel Dsouza</name>
<email>gidisrael@gmail.com</email>
</author>
<published>2014-04-07T22:39:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=52f5684c8e1ec7463192aba8e2916df49807511a'/>
<id>urn:sha1:52f5684c8e1ec7463192aba8e2916df49807511a</id>
<content type='text'>
To increase compiler portability there is &lt;linux/compiler.h&gt; which
provides convenience macros for various gcc constructs.  Eg: __weak for
__attribute__((weak)).  I've replaced all instances of gcc attributes
with the right macro in the kernel subsystem.

Signed-off-by: Gideon Israel Dsouza &lt;gidisrael@gmail.com&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&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>kernel: kallsyms: memory override issue, need check destination buffer length</title>
<updated>2013-04-15T05:47:26Z</updated>
<author>
<name>Chen Gang</name>
<email>gang.chen@asianux.com</email>
</author>
<published>2013-04-15T05:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e3f26752f0f8a6aade580115e1e68bcb1a4bc040'/>
<id>urn:sha1:e3f26752f0f8a6aade580115e1e68bcb1a4bc040</id>
<content type='text'>
  We don't export any symbols &gt; 128 characters, but if we did then
  kallsyms_expand_symbol() would overflow the buffer handed to it.
  So we need check destination buffer length when copying.

  the related test:
    if we define an EXPORT function which name more than 128.
    will panic when call kallsyms_lookup_name by init_kprobes on booting.
    after check the length (provide this patch), it is ok.

  Implementaion:
    add additional destination buffer length parameter (maxlen)
    if uncompressed string is too long (&gt;= maxlen), it will be truncated.
    not check the parameters whether valid, since it is a static function.

Signed-off-by: Chen Gang &lt;gang.chen@asianux.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>vsprintf: fix %ps on non symbols when using kallsyms</title>
<updated>2012-05-29T23:22:32Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2012-05-29T22:07:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4796dd200db943e36f876e7029552212e5bbdf33'/>
<id>urn:sha1:4796dd200db943e36f876e7029552212e5bbdf33</id>
<content type='text'>
Using %ps in a printk format will sometimes fail silently and print the
empty string if the address passed in does not match a symbol that
kallsyms knows about.  But using %pS will fall back to printing the full
address if kallsyms can't find the symbol.  Make %ps act the same as %pS
by falling back to printing the address.

While we're here also make %ps print the module that a symbol comes from
so that it matches what %pS already does.  Take this simple function for
example (in a module):

	static void test_printk(void)
	{
		int test;
		pr_info("with pS: %pS\n", &amp;test);
		pr_info("with ps: %ps\n", &amp;test);
	}

Before this patch:

 with pS: 0xdff7df44
 with ps:

After this patch:

 with pS: 0xdff7df44
 with ps: 0xdff7df44

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&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>Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2011-03-26T00:52:22Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-03-26T00:52:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94df491c4a01b39d81279a68386158eb02656712'/>
<id>urn:sha1:94df491c4a01b39d81279a68386158eb02656712</id>
<content type='text'>
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: Fix WARN_ON() test for UP
  WARN_ON_SMP(): Allow use in if() statements on UP
  x86, dumpstack: Use %pB format specifier for stack trace
  vsprintf: Introduce %pB format specifier
  lockdep: Remove unused 'factor' variable from lockdep_stats_show()
</content>
</entry>
<entry>
<title>vsprintf: Introduce %pB format specifier</title>
<updated>2011-03-24T07:36:10Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-03-24T02:42:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f77a8d378254f27df4a114a5da67223af1fe93f'/>
<id>urn:sha1:0f77a8d378254f27df4a114a5da67223af1fe93f</id>
<content type='text'>
The %pB format specifier is for stack backtrace. Its handler
sprint_backtrace() does symbol lookup using (address-1) to
ensure the address will not point outside of the function.

If there is a tail-call to the function marked "noreturn",
gcc optimized out the code after the call then causes saved
return address points outside of the function (i.e. the start
of the next function), so pollutes call trace somewhat.

This patch adds the %pB printk mechanism that allows architecture
call-trace printout functions to improve backtrace printouts.

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: linux-arch@vger.kernel.org
LKML-Reference: &lt;1300934550-21394-1-git-send-email-namhyung@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6</title>
<updated>2011-03-24T03:51:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-03-24T03:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b81a618dcd3ea99de292dbe624f41ca68f464376'/>
<id>urn:sha1:b81a618dcd3ea99de292dbe624f41ca68f464376</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  deal with races in /proc/*/{syscall,stack,personality}
  proc: enable writing to /proc/pid/mem
  proc: make check_mem_permission() return an mm_struct on success
  proc: hold cred_guard_mutex in check_mem_permission()
  proc: disable mem_write after exec
  mm: implement access_remote_vm
  mm: factor out main logic of access_process_vm
  mm: use mm_struct to resolve gate vma's in __get_user_pages
  mm: arch: rename in_gate_area_no_task to in_gate_area_no_mm
  mm: arch: make in_gate_area take an mm_struct instead of a task_struct
  mm: arch: make get_gate_vma take an mm_struct instead of a task_struct
  x86: mark associated mm when running a task in 32 bit compatibility mode
  x86: add context tag to mark mm when running a task in 32-bit compatibility mode
  auxv: require the target to be tracable (or yourself)
  close race in /proc/*/environ
  report errors in /proc/*/*map* sanely
  pagemap: close races with suid execve
  make sessionid permissions in /proc/*/task/* match those in /proc/*
  fix leaks in path_lookupat()

Fix up trivial conflicts in fs/proc/base.c
</content>
</entry>
<entry>
<title>mm: arch: rename in_gate_area_no_task to in_gate_area_no_mm</title>
<updated>2011-03-23T20:36:55Z</updated>
<author>
<name>Stephen Wilson</name>
<email>wilsons@start.ca</email>
</author>
<published>2011-03-13T19:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cae5d39032acf26c265f6b1dc73d7ce6ff4bc387'/>
<id>urn:sha1:cae5d39032acf26c265f6b1dc73d7ce6ff4bc387</id>
<content type='text'>
Now that gate vma's are referenced with respect to a particular mm and not a
particular task it only makes sense to propagate the change to this predicate as
well.

Signed-off-by: Stephen Wilson &lt;wilsons@start.ca&gt;
Reviewed-by: Michel Lespinasse &lt;walken@google.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>printk: use %pK for /proc/kallsyms and /proc/modules</title>
<updated>2011-03-23T00:44:12Z</updated>
<author>
<name>Kees Cook</name>
<email>kees.cook@canonical.com</email>
</author>
<published>2011-03-22T23:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f36e2c448007b54851e7e4fa48da97d1477a175'/>
<id>urn:sha1:9f36e2c448007b54851e7e4fa48da97d1477a175</id>
<content type='text'>
In an effort to reduce kernel address leaks that might be used to help
target kernel privilege escalation exploits, this patch uses %pK when
displaying addresses in /proc/kallsyms, /proc/modules, and
/sys/module/*/sections/*.

Note that this changes %x to %p, so some legitimately 0 values in
/proc/kallsyms would have changed from 00000000 to "(null)".  To avoid
this, "(null)" is not used when using the "K" format.  Anything that was
already successfully parsing "(null)" in addition to full hex digits
should have no problem with this change.  (Thanks to Joe Perches for the
suggestion.) Due to the %x to %p, "void *" casts are needed since these
addresses are already "unsigned long" everywhere internally, due to their
starting life as ELF section offsets.

Signed-off-by: Kees Cook &lt;kees.cook@canonical.com&gt;
Cc: Eugene Teo &lt;eugene@redhat.com&gt;
Cc: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Cc: 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>
</feed>
