Commit Graph

31 Commits

Author SHA1 Message Date
Artem Savkov
4a7dab17c8 Allow OOT modules to be built with non-distro kernels
Previously OOT-module builds used `--sourcedir` to specify oot-module
source directory which was a bit confusing and also denied users ability
to build kpatches agains oot modules built against non-distro kernels.

This patch adds `-p/--oot-module-src` option to specify source dir for
oot module while keeping `--sourcedir` for kernel source directory
specification.

I also tried to disambiguate `SRCDIR` in kpatch-build a bit. Now there
are 3 variables:
 - `KERNEL_SRCDIR` - contains path to kernel source directory
 - `OOT_MODULEL_SRCDIR` - contains path to out-of-tree module source directory
 - `BUILDDIR` - can be set to either of the above and is used for
   patch-related actions

Another attempt at this was done by @omatiusha in #1234

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2021-12-13 18:51:52 +01:00
Song Liu
8487a0ca0a manpages: update kpatch-build with -R | --non-replace option
Signed-off-by: Song Liu <song@kernel.org>
2021-05-25 15:21:44 -07:00
Artem Savkov
41de9e763a kpatch-build: clang support
Add support for clang-built kernels. This is completely automatic, we
check if the kernel was built with clang by looking for
CONFIG_CC_IS_CLANG in config.

This has almost no effect on non-clang built kernels with one exception:
we now do compliler checks _after_ we download kernel sources which is a
waste of resources in case when compilers don't match.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2021-02-17 12:59:51 +01:00
Julien Thierry
b470e5091d kpatch: Inform user when signal subcommand is unnecessary
From Linux-5.1 onward, the sysfs interface to send signals to
processes stalling livepatch transitions is replace by a peridical
signal sent by the kernel.

On such systems, the kpatch signal subcommand does nothing. Just
let the user know they don't need to worry about it.

Fixes: #1151
Signed-off-by: Julien Thierry <jthierry@redhat.com>
2021-01-14 17:55:29 +01:00
Joe Lawrence
37672ef681 manpages: update kpatch-build with --oot-module option
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2019-02-21 09:47:47 -05:00
Joe Lawrence
622e4330d9
Merge pull request #915 from sanskriti-s/kpatch-man-page-correction2
Added option to kpatch man page
2018-10-18 09:34:19 -04:00
Sanskriti Sharma
138ef899e8 Added option to kpatch man page
Added option signal to man page, under commands, based on usage function in
kpatch/kpatch usage()

Signed-off-by: Sanskriti sharma <sansharm@redhat.com>
2018-10-17 13:43:11 -04:00
Sanskriti Sharma
9e03722bcb Removed distros from kpatch-build man page
The man page earlier said that kpatch-build only works for Fedora, but now it
works for most distros to I deleted that line.

Signed-off-by: Sanskriti Sharma <sansharm@redhat.com>
2018-10-17 11:12:14 -04:00
Evgenii Shatokhin
cc09c5efd3 Do not mention initrd in the help messages and in the man page
Kpatch no longer uses initrd to make sure the patch modules are loaded
at boot. The users could either install the provided systemd service
for that or come up with some other solution.

The messages mentioning initrd could confuse the users.

Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
2018-02-20 17:27:25 +03:00
Alice Ferrazzi
70aaf2b063 updated man page 2017-12-22 02:20:20 +09:00
Josh Poimboeuf
8e8de4718d kpatch: deprecate the replace command
"kpatch replace" is complex, buggy, and probably unnecessary.  And
upstream livepatch has nothing like it.

Remove it from the kpatch utility, but leave the infrastructure in place
in the patch module and the core module for now.

Fixes: #456
2015-11-16 09:38:44 -06:00
Seth Jennings
d3abeb667a Allow user to skip gcc version check
Right now, unless the entire gcc version string, including build date
and package version, matches the distro kernel exactly, kpatch-build
won't proceed.

For some distros, it is very difficult to rollback to a previous
version of gcc and keep that version pinned on the system so that the
package manager doesn't update it.

For these user, add a --skip-gcc-check flag to kpatch-build to allow the
version check to be skipped.  If the user does this, it is assumed they
know what they are doing.  This flag is documented as "not recommended".

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-10-01 14:25:02 -05:00
Udo Seidel
6c73bc3652 added missing options -v, -t and -d 2014-09-26 19:12:45 +02:00
Gaetan Trellu
a44fbf3f8b kpatch: update the kpatch version and the man 2014-07-25 09:33:41 -04:00
Josh Poimboeuf
d707c4062d kpatch: add unload --all command
This may end up being useful in the distro patch module upgrade path.
If the core module also needs updating, we can first do "kpatch unload
--all" and "rmmod kpatch" before doing "kpatch load" of the new patch
module.
2014-07-23 09:16:11 -05:00
Josh Poimboeuf
53f8f1d149 kpatch: change --kver to --kernel-version 2014-05-21 16:50:33 -05:00
Josh Poimboeuf
8779d79c50 kpatch: get rid of system-installed modules
The user-installed vs system-installed dichotomy is confusing.  Let's
just have "installed".  RPM-installed modules can just call "kpatch
install" in their post-install step.
2014-05-21 16:50:28 -05:00
Josh Poimboeuf
65810a47d0 kpatch replace
Allow the user to atomically replace all existing modules with a new
"kpatch replace" command.  This provides a safe way to do atomic
upgrades for cumulative patch module updates.
2014-05-02 15:35:00 -05:00
Josh Poimboeuf
44c4ecd3ff kpatch: allow kpatch load/unload/info for files
A user may want to load a module without having to install it to the
initrd.  In fact, 99% of the time I think that will be the typical usage
of "kpatch load", with a given file as an argument rather than a DB
module.

Have "kpatch load" and other commands take a file as input.  If the file
is not found, then check the DB.
2014-04-15 14:59:47 -05:00
Josh Poimboeuf
a7efb05c81 update patch module terminology
Try to be more consistent with the terminology.  In various places we
call it a "hotpatch module", "hot patch module", or "patch module".  How
about we just call it a "patch module" everywhere?
2014-04-15 13:47:56 -05:00
Josh Poimboeuf
68e4cff461 kpatch: change wording of "load to" to "load into" 2014-04-14 12:30:11 -05:00
Seth Jennings
fcbf46978f Merge pull request #111 from spartacus06/change-subcommands
change 'apply/remove' to 'load/unload'
2014-04-10 16:11:54 -05:00
Seth Jennings
6655d00c60 change 'apply/remove' to 'load/unload'
After removing the distinction between 'enabled' modules and 'applied'
modules in 022e42bc, we can change the 'apply' and 'remove' subcommands,
to more intuitive 'load' and 'unload' subcommands.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-04-07 12:12:40 -05:00
Seth Jennings
065fde63d9 add sourcerpm option to kpatch-build man page
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-04-07 12:02:33 -05:00
Josh Poimboeuf
1e21aefbd4 man: remove enable/disable from kpatch man page
They were already removed from the kpatch script with commit 022e42b.
2014-04-01 07:38:37 -05:00
Josh Poimboeuf
e7dbaf0b52 man: use older '-c' option
The gzip '-k' option isn't supported on older versions of gzip, so use
the more portable '-c' option to send the compressed file to stdout.
2014-03-27 22:21:43 -07:00
Seth Jennings
28f98196df add man file deps to .gz targets
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-27 21:36:00 -05:00
Seth Jennings
a72abf3f14 add clean target for man
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-27 17:47:10 -05:00
Josh Poimboeuf
1631d52fcf man: don't delete source files when compressing man files
Fix the issue where a "make install" deletes the man source files.
2014-03-27 14:12:44 -07:00
Udo Seidel
148ef3b941 fixed typos 2014-03-25 17:12:50 +01:00
Udo Seidel
fd11e9f5d6 added man pages and updated SPEC file 2014-03-25 08:36:20 +01:00