Commit 77dbd72b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'livepatching-for-5.17' of...

Merge tag 'livepatching-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching

Pull livepatching updates from Petr Mladek:

 - Correctly handle kobjects when a livepatch init fails

 - Avoid CPU hogging when searching for many livepatched symbols

 - Add livepatch API page into documentation

* tag 'livepatching-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
  livepatch: Avoid CPU hogging with cond_resched
  livepatch: Fix missing unlock on error in klp_enable_patch()
  livepatch: Fix kobject refcount bug on klp_init_patch_early failure path
  Documentation: livepatch: Add livepatch API page
parents d0a231f0 b2dfc3fe
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

=================
Livepatching APIs
=================

Livepatch Enablement
====================

.. kernel-doc:: kernel/livepatch/core.c
   :export:


Shadow Variables
================

.. kernel-doc:: kernel/livepatch/shadow.c
   :export:

System State Changes
====================

.. kernel-doc:: kernel/livepatch/state.c
   :export:

Object Types
============

.. kernel-doc:: include/linux/livepatch.h
   :identifiers: klp_patch klp_object klp_func klp_callbacks klp_state
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ Kernel Livepatching
    shadow-vars
    system-state
    reliable-stacktrace
    api

.. only::  subproject and html

+2 −2
Original line number Diff line number Diff line
@@ -82,8 +82,8 @@ to do actions that can be done only once when a new variable is allocated.
      - call destructor function if defined
      - free shadow variable

* klp_shadow_free_all() - detach and free all <*, id> shadow variables
  - find and remove any <*, id> references from global hashtable
* klp_shadow_free_all() - detach and free all <_, id> shadow variables
  - find and remove any <_, id> references from global hashtable

    - if found

+2 −2
Original line number Diff line number Diff line
@@ -52,12 +52,12 @@ struct klp_state:

The state can be manipulated using two functions:

  - *klp_get_state(patch, id)*
  - klp_get_state()

    - Get struct klp_state associated with the given livepatch
      and state id.

  - *klp_get_prev_state(id)*
  - klp_get_prev_state()

    - Get struct klp_state associated with the given feature id and
      already installed livepatches.
+1 −0
Original line number Diff line number Diff line
@@ -243,6 +243,7 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
		ret = fn(data, namebuf, NULL, kallsyms_sym_address(i));
		if (ret != 0)
			return ret;
		cond_resched();
	}
	return 0;
}
Loading