.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "KSPLICE-CREATE 8" .TH KSPLICE-CREATE 8 "2014-01-19" "Ksplice v0.9.9" "Ksplice" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" ksplice\-create \- Create a set of kernel modules for a rebootless kernel update .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBksplice-create\fR [\fI\s-1OPTIONS\s0\fR] \fB\-\-patch=\fR\fI\s-1PATCH_FILE\s0\fR \fI\s-1KERNEL_SOURCE\s0\fR .PP \&\fBksplice-create\fR [\fI\s-1OPTIONS\s0\fR] \fB\-\-diffext=\fR\fI\s-1EXTENSION\s0\fR \fI\s-1KERNEL_SOURCE\s0\fR .PP \&\fBksplice-create\fR [\fI\s-1OPTIONS\s0\fR] \fB\-\-git=\fR\fI\s-1COMMIT\s0\fR \fI\s-1KERNEL_SOURCE\s0\fR .PP \&\fBksplice-create\fR [\fI\s-1OPTIONS\s0\fR] \fB\-\-prebuild\fR \fI\s-1KERNEL_SOURCE\s0\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBksplice-create\fR creates a set of Ksplice kernel modules that, when loaded, will apply a user-specified source code patch to the running binary kernel. .PP Before you use \fBksplice-create\fR on a patch, you should confirm that the desired source code change does not make any semantic changes to kernel data structures\*(--that is, changes that would require existing instances of kernel data structures to be transformed (e.g., a patch that adds a field to a global data structure would require the existing data structures to change). If you use Ksplice on a patch that changes data structure semantics, Ksplice will not detect the problem and you could experience kernel problems as a result. .PP The to-be-applied source code patch can be specified by providing a \fIpatch\fR\|(1) file (\fB\-\-patch=\fR\fI\s-1PATCH_FILE\s0\fR) or by providing a file extension (\fB\-\-diffext=\fR\fI\s-1EXTENSION\s0\fR). .PP If a file extension is specified, then the desired source code patch will be determined by comparing all of the files in the \fI\s-1KERNEL_SOURCE\s0\fR directory tree whose names end with the extra extension \fI\s-1EXTENSION\s0\fR against the corresponding files without the extra extension. Only the new files containing the extra extension in their filenames should be modified. .PP Here is an example of using a file extension to specify a patch: .PP .Vb 3 \& $ cp KERNEL_SOURCE/kernel/sys.c KERNEL_SOURCE/kernel/sys.c.prctl_fixed \& [edit sys.c.prctl_fixed to include the desired changes] \& $ ksplice\-create \-\-diffext=.prctl_fixed KERNEL_SOURCE .Ve .PP \&\s-1KERNEL_SOURCE\s0 must be a directory containing the to-be-updated kernel's original source code. If your Linux distribution applies patches to the Linux kernel during the kernel build process, then those patches must be applied to the \fI\s-1KERNEL_SOURCE\s0\fR directory before invoking \fBksplice-create\fR on that directory. \fBksplice-create\fR will not modify the source code in the \&\fI\s-1KERNEL_SOURCE\s0\fR directory tree, but it will perform a kernel build in that directory tree. .PP \&\fI\s-1ORIG_CONFIG\s0\fR can be used to specify the directory containing the to-be-updated kernel's original \fI.config\fR file and original \fISystem.map\fR file (the files should have exactly those names). \fI\s-1ORIG_CONFIG\s0\fR defaults to \&\fI\s-1KERNEL_SOURCE\s0\fR\fB/ksplice\fR. .PP The default \fIgcc\fR\|(1) compiler and \fIas\fR\|(1) assembler on the system should be as close to the compiler and assembler originally used to build the running kernel as possible. If the current compiler and linker are too different from the original compiler and linker, \fBksplice-apply\fR will abort when applying the update. .PP \&\fBksplice-create\fR outputs a \fItar\fR\|(1) file, compressed with \fIgzip\fR\|(1), containing the desired Ksplice update modules. This tarball will be created in the current directory, and it can be manipulated using the other Ksplice utilities, such as \fBksplice-apply\fR. .PP The first time that \fBksplice-create\fR is invoked on a \fI\s-1KERNEL_SOURCE\s0\fR directory, it must build that kernel from scratch, which is much slower than the rest of the update-creation process. \fB\-\-prebuild\fR can be used to perform this initial kernel build without providing a source code patch. .PP In order to patch a function that has previously been patched by Ksplice, the user needs to ensure that the \fI\s-1KERNEL_SOURCE\s0\fR directory provided to Ksplice contains the source for the currently running kernel, including any patches that have previously been applied by Ksplice. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-\-patch=\fR\fI\s-1PATCH_FILE\s0\fR" 8 .IX Item "--patch=PATCH_FILE" Builds a Ksplice update out of the given \fIpatch\fR\|(1) file \fI\s-1PATCH_FILE\s0\fR. .IP "\fB\-\-diffext=\fR\fI\s-1EXTENSION\s0\fR" 8 .IX Item "--diffext=EXTENSION" Builds a Ksplice update using the modified source files with names ending in \&\fI\s-1EXTENSION\s0\fR. The patch will be determined by comparing all of the files in the \&\fI\s-1KERNEL_SOURCE\s0\fR directory tree whose names end with the extra extension \&\fI\s-1EXTENSION\s0\fR against the corresponding files without the extra extension. .IP "\fB\-\-git\fR=\fI\s-1COMMIT\s0\fR" 8 .IX Item "--git=COMMIT" Builds a Ksplice update using the commit \fI\s-1COMMIT\s0\fR in the Git working tree \&\fI\s-1KERNEL_SOURCE\s0\fR. The original state corresponding to the running kernel is remembered in the Git ref \fBrefs/ksplice/pre\fR, which will be created from the current \fB\s-1HEAD\s0\fR if it does not yet exist (and can be changed using the \&\fB\-\-series\fR option). Therefore, the source code change to be applied corresponds to the output of \fBgit diff ksplice/pre\fR \fI\s-1COMMIT\s0\fR. .IP "\fB\-\-prebuild\fR" 8 .IX Item "--prebuild" Compiles the original source code that will be needed to build future Ksplice updates. If any Ksplice updates have previously been built in the \&\fI\s-1KERNEL_SOURCE\s0\fR tree, the source files in the tree are reverted to their original state. .IP "\fB\-\-series\fR" 8 .IX Item "--series" Specifies that the current state of the \fI\s-1KERNEL_SOURCE\s0\fR tree should be used as the original source that corresponds to the running kernel. If a Ksplice update has recently been built in the \fI\s-1KERNEL_SOURCE\s0\fR tree, this option specifies that the Ksplice update being built should be applied after the previous update in series. This option can be used with \fB\-\-prebuild\fR to forget the previous original state and perform no other action. .IP "\fB\-\-build\-modules\fR" 8 .IX Item "--build-modules" For a patch that includes changes to kernel modules, in addition to building a hot update that can be applied to the running kernel, this option will cause \&\fBksplice-create\fR to generate a set of new modules based on the updated source code. These modules can be used to replace the kernel modules stored on disk, where they can later be loaded normally after part of the hot update has been applied using \fIksplice\-apply\fR\|(1) \fB\-\-partial\fR. .IP "\fB\-v\fR, \fB\-\-verbose\fR" 8 .IX Item "-v, --verbose" Causes \fBksplice-create\fR to print debugging messages about its progress. Using multiple \-v options increases the verbosity. The maximum is 2. .IP "\fB\-j\fR \fI\s-1JOBS\s0\fR, \fB\-\-jobs=\fR\fI\s-1JOBS\s0\fR" 8 .IX Item "-j JOBS, --jobs=JOBS" Specifies the number of jobs to run simultaneously while performing kernel builds. \fBksplice-create\fR also honors the environment variable \&\s-1CONCURRENCY_LEVEL.\s0 .IP "\fB\-\-patch\-opt=\fR\fI\s-1OPTIONS\s0\fR" 8 .IX Item "--patch-opt=OPTIONS" Can be used to pass options to \fIpatch\fR\|(1). If this option is \s-1NOT\s0 specified, then \&\fB\-p1\fR is passed to \fBpatch\fR. If this option is specified, then only the specified options will be passed to \fBpatch\fR. This option can be repeated in order to pass multiple options to \fBpatch\fR. This option is ignored when the to-be-applied source code patch is specified using \fB\-\-diffext\fR. .IP "\fB\-\-id=\fR\fI\s-1ID\s0\fR" 8 .IX Item "--id=ID" Specifies the unique value that will be used as the identifier of the Ksplice update. This identifier will, for example, appear in the name of the update tarball. By default, a random 8\-character \s-1ID\s0 will be generated. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIksplice\-apply\fR\|(8), \fIksplice\-view\fR\|(8), \fIksplice\-undo\fR\|(8) .SH "BUGS" .IX Header "BUGS" Please report bugs to . .SH "AUTHORS" .IX Header "AUTHORS" Jeff Arnold, Anders Kaseorg, and Tim Abbott .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2007\-2009 Ksplice, Inc. .PP This is free software and documentation. You can redistribute and/or modify it under the terms of the \s-1GNU\s0 General Public License, version 2.