<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/kernel/livepatch, branch v4.0-rc2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v4.0-rc2</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v4.0-rc2'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2015-02-22T22:02:56Z</updated>
<entry>
<title>livepatch: RCU protect struct klp_func all the time when used in klp_ftrace_handler()</title>
<updated>2015-02-22T22:02:56Z</updated>
<author>
<name>Petr Mladek</name>
<email>pmladek@suse.cz</email>
</author>
<published>2015-02-18T17:02:13Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c4ce0da8ec62d83c96e29db7dadd6d3985344bb3'/>
<id>urn:sha1:c4ce0da8ec62d83c96e29db7dadd6d3985344bb3</id>
<content type='text'>
func-&gt;new_func has been accessed after rcu_read_unlock() in klp_ftrace_handler()
and therefore the access was not protected.

Signed-off-by: Petr Mladek &lt;pmladek@suse.cz&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>livepatch: fix format string in kobject_init_and_add()</title>
<updated>2015-02-16T15:26:56Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2015-02-15T09:03:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e0b561ee78d82a4cc7792aa28fa4b1ea15325dcc'/>
<id>urn:sha1:e0b561ee78d82a4cc7792aa28fa4b1ea15325dcc</id>
<content type='text'>
kobject_init_and_add() takes expects format string for a name, so we
better provide it in order to avoid infoleaks if modules craft their
mod-&gt;name in a special way.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Reported-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Seth Jennings &lt;sjenning@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>livepatch: add missing newline to error message</title>
<updated>2015-02-06T20:28:35Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@redhat.com</email>
</author>
<published>2015-02-06T16:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=f638f4dc0880d515c807a67b8210885a4a4f18bb'/>
<id>urn:sha1:f638f4dc0880d515c807a67b8210885a4a4f18bb</id>
<content type='text'>
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>livepatch: rename config to CONFIG_LIVEPATCH</title>
<updated>2015-02-04T10:25:51Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@redhat.com</email>
</author>
<published>2015-02-03T22:45:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=12cf89b550d13eb7cb86ef182bd6c04345a33a1f'/>
<id>urn:sha1:12cf89b550d13eb7cb86ef182bd6c04345a33a1f</id>
<content type='text'>
Rename CONFIG_LIVE_PATCHING to CONFIG_LIVEPATCH to make the naming of
the config and the code more consistent.

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Reviewed-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>livepatch: fix uninitialized return value</title>
<updated>2015-01-21T14:22:48Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@redhat.com</email>
</author>
<published>2015-01-20T22:07:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=dbed7ddab967550d1181633e8ac7905808f29a94'/>
<id>urn:sha1:dbed7ddab967550d1181633e8ac7905808f29a94</id>
<content type='text'>
Fix a potentially uninitialized return value in klp_enable_func().

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Reviewed-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>livepatch: support for repatching a function</title>
<updated>2015-01-20T19:09:41Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@redhat.com</email>
</author>
<published>2015-01-20T15:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3c33f5b99d688deafd21d4a770303691c7c3a320'/>
<id>urn:sha1:3c33f5b99d688deafd21d4a770303691c7c3a320</id>
<content type='text'>
Add support for patching a function multiple times.  If multiple patches
affect a function, the function in the most recently enabled patch
"wins".  This enables a cumulative patch upgrade path, where each patch
is a superset of previous patches.

This requires restructuring the data a little bit.  With the current
design, where each klp_func struct has its own ftrace_ops, we'd have to
unregister the old ops and then register the new ops, because
FTRACE_OPS_FL_IPMODIFY prevents us from having two ops registered for
the same function at the same time.  That would leave a regression
window where the function isn't patched at all (not good for a patch
upgrade path).

This patch replaces the per-klp_func ftrace_ops with a global klp_ops
list, with one ftrace_ops per original function.  A single ftrace_ops is
shared between all klp_funcs which have the same old_addr.  This allows
the switch between function versions to happen instantaneously by
updating the klp_ops struct's func_stack list.  The winner is the
klp_func at the top of the func_stack (front of the list).

[ jkosina@suse.cz: turn WARN_ON() into WARN_ON_ONCE() in ftrace handler to
  avoid storm in pathological cases ]

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Reviewed-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>livepatch: enforce patch stacking semantics</title>
<updated>2015-01-20T19:09:41Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@redhat.com</email>
</author>
<published>2015-01-20T15:26:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=83a90bb1345767f0cb96d242fd8b9db44b2b0e17'/>
<id>urn:sha1:83a90bb1345767f0cb96d242fd8b9db44b2b0e17</id>
<content type='text'>
Only allow the topmost patch on the stack to be enabled or disabled, so
that patches can't be removed or added in an arbitrary order.

Suggested-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Reviewed-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>livepatch: change ARCH_HAVE_LIVE_PATCHING to HAVE_LIVE_PATCHING</title>
<updated>2015-01-20T14:02:25Z</updated>
<author>
<name>Miroslav Benes</name>
<email>mbenes@suse.cz</email>
</author>
<published>2015-01-20T11:49:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=32b7eb877165fdb29f1722071c6c64ced1789014'/>
<id>urn:sha1:32b7eb877165fdb29f1722071c6c64ced1789014</id>
<content type='text'>
Change ARCH_HAVE_LIVE_PATCHING to HAVE_LIVE_PATCHING in Kconfigs. HAVE_
bools are prevalent there and we should go with the flow.

Suggested-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>livepatch: fix deferred module patching order</title>
<updated>2015-01-09T21:27:47Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@redhat.com</email>
</author>
<published>2015-01-09T20:03:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=99590ba565a22c9f58f7528a94881d0455eef018'/>
<id>urn:sha1:99590ba565a22c9f58f7528a94881d0455eef018</id>
<content type='text'>
When applying multiple patches to a module, if the module is loaded
after the patches are loaded, the patches are applied in reverse order:

  $ insmod patch1.ko
  [   43.172992] livepatch: enabling patch 'patch1'

  $ insmod patch2.ko
  [   46.571563] livepatch: enabling patch 'patch2'

  $ modprobe nfsd
  [   52.888922] livepatch: applying patch 'patch2' to loading module 'nfsd'
  [   52.899847] livepatch: applying patch 'patch1' to loading module 'nfsd'

Fix the loading order by storing the klp_patches list in queue order.

Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>livepatch: handle ancient compilers with more grace</title>
<updated>2015-01-09T09:55:10Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2015-01-09T09:53:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b9dfe0bed999d23ee8838d389637dd8aef83fafa'/>
<id>urn:sha1:b9dfe0bed999d23ee8838d389637dd8aef83fafa</id>
<content type='text'>
We are aborting a build in case when gcc doesn't support fentry on x86_64
(regs-&gt;ip modification can't really reliably work with mcount).

This however breaks allmodconfig for people with older gccs that don't
support -mfentry.

Turn the build-time failure into runtime failure, resulting in the whole
infrastructure not being initialized if CC_USING_FENTRY is unset.

Reported-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
</content>
</entry>
</feed>
