------------------------------------------------------------------- Fri May 24 13:17:53 CEST 2019 - mbenes@suse.cz - Bump up the version number in spec file - commit 71bb6e8 ------------------------------------------------------------------- Tue Apr 9 10:47:32 CEST 2019 - nstange@suse.de - Fix for CVE-2018-14734 ("drivers/infiniband/core/ucma.c in the Linux kernel through 4.17.11 allows ucma_leave_multicast to access a certain data structure after a cleanup step in ucma_process_join") Live patch for CVE-2018-14734. Upstream commit cb2595c1393b ("infiniband: fix a possible use-after-free bug"). KLP: CVE-2018-14734 References: bsc#1131390 CVE-2018-14734 - commit a763dc9 ------------------------------------------------------------------- Tue Mar 12 10:58:36 CET 2019 - mbenes@suse.cz - Bump up the version number in spec file - commit 1a6b2f4 ------------------------------------------------------------------- Fri Mar 8 12:57:46 CET 2019 - nstange@suse.de - Fix for CVE-2019-9213 ("mm: enforce min addr even if capable() in expand_downwards()") Live patch for CVE-2019-9213. Upstream commit 0a1d52994d44 ("mm: enforce min addr even if capable() in expand_downwards()"). KLP: CVE-2019-9213 References: bsc#1128378 CVE-2019-9213 - commit 85c79e2 ------------------------------------------------------------------- Thu Mar 7 15:23:42 CET 2019 - mbenes@suse.cz - livepatch_main.c: Adaptation to a new livepatch API The atomic replace patch set among others removed the two-stage API. There is no (un)registration step needed now. SLES backport defines KLP_NOREG_API macro to easily distinguish whether the kernel provides the old or the new API. Use it and change the module init and exit functions accordingly. - commit 060163b ------------------------------------------------------------------- Wed Mar 6 14:47:25 CET 2019 - nstange@suse.de - Fix for CVE-2019-8912 ("af_alg_release() in crypto/af_alg.c neglects to set a NULL value for a certain structure member, which leads to a use-after-free in sockfs_setattr") Live patch for CVE-2019-8912. Upstream commit 9060cb719e61 ("net: crypto set sk to NULL when af_alg_release."). KLP: CVE-2019-8912 References: bsc#1126284 CVE-2019-8912 - commit f0e6112 ------------------------------------------------------------------- Wed Mar 6 14:12:33 CET 2019 - nstange@suse.de - Fix for CVE-2018-12232 ("NULL pointer dereference if close and fchownat system calls share a socket file descriptor") Live patch for CVE-2018-12232. Upstream commit 6d8c50dcb029 ("socket: close race condition between sock_close() and sockfs_setattr()"). KLP: CVE-2018-12232 References: bsc#1127757 CVE-2018-12232 - commit d3bb3ad ------------------------------------------------------------------- Tue Feb 26 12:07:38 CET 2019 - nstange@suse.de - Fix for CVE-2019-7221 ("KVM: nVMX: use-after-free of the hrtimer for emulation of the preemption timer") Live patch for CVE-2019-7221. Upstream commit ecec76885bcf ("KVM: nVMX: unconditionally cancel preemption timer in free_nested (CVE-2019-7221)"). KLP: CVE-2019-7221 References: bsc#1124734 CVE-2019-7221 - commit 4667871 ------------------------------------------------------------------- Wed Feb 13 16:58:35 CET 2019 - nstange@suse.de - Fix for CVE-2019-6974 ("KVM: potential use-after-free via kvm_ioctl_create_device()") Live patch for CVE-2019-6974. Upstream commit cfa39381173d ("kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)"). KLP: CVE-2019-6974 References: bsc#1124729 CVE-2019-6974 - commit f9bf16e ------------------------------------------------------------------- Thu Feb 7 14:13:00 CET 2019 - mbenes@suse.cz - uname_patch: Use klp-convert macros and rely on klp-convert where possible - commit 4c9eb70 ------------------------------------------------------------------- Wed Feb 6 14:12:44 CET 2019 - mbenes@suse.cz - Define macros to switch easily between klp-convert and kallsyms Kallsyms trick does not have to be used for resolving undefined symbols when klp-convert is available. It would be great though to share live patches sources between both modes of operation. Define macros to help with the task. Their definitions depend on whether USE_KLP_CONVERT macro is defined. tar-up.sh script is responsible to decide. - commit e3a42b7 ------------------------------------------------------------------- Wed Feb 6 10:53:44 CET 2019 - mbenes@suse.cz - Use klp-convert where provided klp-convert tool converts undefined symbols in a live patch kernel module to special relocation records which are resolved by the kernel. It allows to omit kallsyms tricks. Wire it to the spec file and let tar-up.sh script decide if it is to be used depending on a codestream. SLE15-SP1 is supported currently. - commit 3efd330 ------------------------------------------------------------------- Tue Jan 29 10:31:01 CET 2019 - mbenes@suse.cz - Bump up the version number in spec file - commit 2ff1015 ------------------------------------------------------------------- Mon Jan 14 15:44:03 CET 2019 - nstange@suse.de - Fix for CVE-2018-16884 ("nfs4: use-after-free in svc_process_common()") Live patch for CVE-2018-16884. Upstream commits b8be5674fa9a ("sunrpc: use SVC_NET() in svcauth_gss_* functions") and d4b09acf924b ("sunrpc: use-after-free in svc_process_common()"). KLP: CVE-2018-16884 References: bsc#1119947 CVE-2018-16884 - commit 937b6aa ------------------------------------------------------------------- Wed Dec 12 11:11:29 CET 2018 - mbenes@suse.cz - Bump up the version number in spec file - commit 4742edb ------------------------------------------------------------------- Tue Dec 11 11:43:18 CET 2018 - nstange@suse.de - Fix for CVE-2018-9568 ("Memory corruption due to incorrect socket cloning") Live patch for CVE-2018-9568. Upstream commit 9d538fa60bad ("net: Set sk_prot_creator when cloning sockets to the right proto"). KLP: CVE-2018-9568 References: bsc#1118320 CVE-2018-9568 - commit d028cf9 ------------------------------------------------------------------- Tue Dec 11 11:27:23 CET 2018 - mbenes@suse.cz - uname_patch: don't hold uts_sem while accessing userspace memory Backport upstream patch 42a0cc347858 ("sys: don't hold uts_sem while accessing userspace memory"). - commit d4e00de ------------------------------------------------------------------- Wed Nov 21 14:13:44 CET 2018 - nstange@suse.de - Fix for CVE-2018-5848 ("function wmi_set_ie() in net/wireless/ath/wil6210/wmi.c is affected by a buffer overflow") Live patch for CVE-2018-5848. Upstream commit b5a8ffcae410 ("wil6210: missing length check in wmi_set_ie"). KLP: CVE-2018-5848 References: bsc#1115339 CVE-2018-5848 - commit 87ce5bc ------------------------------------------------------------------- Thu Nov 1 14:24:09 CET 2018 - mbenes@suse.cz - Bump up the version number in spec file - commit 2b6da82 ------------------------------------------------------------------- Thu Oct 25 16:30:18 CEST 2018 - nstange@suse.de - Fix for CVE-2018-5391 ("FragmentSmack (IP fragments)") Live patch for CVE-2018-5391. Upstream commits 56e2c94f055d ("inet: frag: enforce memory limits earlier") 4672694bd4f1 ("ipv4: frags: handle possible skb truesize change") 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping segments") 385114dec8a4 ("net: modify skb_rbtree_purge to return the truesize of all purged skbs.") fa0f527358bd ("ip: use rb trees for IP frag queue.") 70837ffe3085 ("ipv4: frags: precedence bug in ip_expire()") KLP: CVE-2018-5391 References: bsc#1103098 CVE-2018-5391 - commit 0c445bc ------------------------------------------------------------------- Wed Oct 24 15:38:50 CEST 2018 - nstange@suse.de - Fix for CVE-2018-18386 ("hangs after a pseudoterminal is put in both ICANON and EXTPROC mode") Live patch for CVE-2018-18386. Upstream commit 966031f34018 ("n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD)"). KLP: CVE-2018-18386 References: bsc#1112039 CVE-2018-18386 - commit 2a3f725 ------------------------------------------------------------------- Fri Oct 5 11:42:39 CEST 2018 - mbenes@suse.cz - Bump up the version number in spec file - commit 915e043 ------------------------------------------------------------------- Tue Oct 2 12:11:44 CEST 2018 - nstange@suse.de - Fix for CVE-2018-17182 ("fix vmacache counter flushing") Live patch for CVE-2018-17182. Upstream commit 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely"). KLP: CVE-2018-17182 References: bsc#1110233 CVE-2018-17182 - commit 97a4f00 ------------------------------------------------------------------- Tue Sep 25 10:57:45 CEST 2018 - nstange@suse.de - Fix for CVE-2018-14633 ("security flaw in iscsi target code") Live patch for CVE-2018-14633. No upstream commit yet. KLP: CVE-2018-14633 References: bsc#1107832 CVE-2018-14633 - commit cc29c07 ------------------------------------------------------------------- Wed Sep 12 17:18:39 CEST 2018 - mbenes@suse.cz - Bump up the version number in spec file - commit 3b24b24 ------------------------------------------------------------------- Fri Sep 7 06:22:48 CEST 2018 - nstange@suse.de - Fix for CVE-2018-10938 ("infinite loop in net/ipv4/cipso_ipv4.c:cipso_v4_optptr() allows for DoS") Live patch for CVE-2018-10938. Upstream commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop"). KLP: CVE-2018-10938 References: bsc#1106191 CVE-2018-10938 - commit 981dd53 ------------------------------------------------------------------- Wed Sep 5 14:08:44 CEST 2018 - nstange@suse.de - Fix for CVE-2018-10902 ("double free in midi subsystem") Live patch for CVE-2018-10902. Upstream commit 39675f7a7c7e ("ALSA: rawmidi: Change resized buffers atomically"). KLP: CVE-2018-10902 References: bsc#1105323 CVE-2018-10902 - commit a27fc64 ------------------------------------------------------------------- Thu Aug 23 13:33:27 CEST 2018 - mbenes@suse.cz - Bump up the version number in spec file - commit b712c5c ------------------------------------------------------------------- Mon Aug 20 11:11:52 CEST 2018 - nstange@suse.de - Fix for CVE-2018-15471 ("Linux netback driver OOB access in hash handling") Live patch for CVE-2018-15471. No upstream commit yet. KLP: CVE-2018-15471 References: bsc#1105026 CVE-2018-15471 - commit 950d7d8 ------------------------------------------------------------------- Thu Aug 9 16:26:32 CEST 2018 - mbenes@suse.cz - Bump up the version number in spec file - commit 9b6cc2a ------------------------------------------------------------------- Thu Aug 9 13:13:21 CEST 2018 - nstange@suse.de - Fix for CVE-2018-5390 ('denial of service conditions with low rates of specially modified packets aka "SegmentSmack"') Live patch for CVE-2018-5390. Upstream commits 72cd43ba64fc ("tcp: free batches of packets in tcp_prune_ofo_queue()") f4a3313d8e2c ("tcp: avoid collapses in tcp_prune_queue() if possible") 3d4bf93ac120 ("tcp: detect malicious patterns in tcp_collapse_ofo_queue()") 8541b21e781a ("tcp: call tcp_drop() from tcp_data_queue_ofo()") 58152ecbbcc6 ("tcp: add tcp_ooo_try_coalesce() helper") KLP: CVE-2018-5390 References: bsc#1102682 CVE-2018-5390 - commit e65054f ------------------------------------------------------------------- Wed Aug 8 16:22:14 CEST 2018 - nstange@suse.de - Fix CVE-2018-3646 ('kvm: L1 Terminal Fault -VMM aka "Foreshadow" aka "Ocean Breeze" aka "Project Ocean"') Live patch for CVE-2018-3646. No upstream commit yet. KLP: CVE-2018-3646 References: bsc#1099306 CVE-2018-3646 - commit 49f1900 ------------------------------------------------------------------- Wed Aug 8 15:18:36 CEST 2018 - nstange@suse.de - Fix for CVE-2017-18344 ("The timer_create syscall implementation doesn't properly validate the sigevent->sigev_notifyfield, which leads to out-of-bounds access") Live patch for CVE-2017-18344. Upstream commit cef31d9af9082 ("posix-timer: Properly check sigevent->sigev_notify"). KLP: CVE-2017-18344 References: bsc#1103203 CVE-2017-18344 - commit 9b19438 ------------------------------------------------------------------- Wed Aug 8 15:08:00 CEST 2018 - nstange@suse.de - Provide common kallsyms wrapper API With bsc#1103203, the need for disambiguating between a multiply defined symbol arose. This is something the kallsyms_lookup_name() based code snippet we used to copy&paste to every individual CVE fix can't handle. Implement a proper wrapper API for doing the kallsyms lookups. - commit bd113d8 ------------------------------------------------------------------- Tue Jul 17 15:52:36 CEST 2018 - nstange@suse.de - Fix CVE-2018-12904 ("kvm: privilege escalation in L1 guest") Live patch for CVE-2018-12904. Upstream commit 727ba748e110 ("kvm: nVMX: Enforce cpl=0 for VMX instructions"). KLP: CVE-2018-12904 References: bsc#1099258 CVE-2018-12904 - commit 046abb2 ------------------------------------------------------------------- Wed Jul 11 13:55:14 CEST 2018 - nstange@suse.de - provide KLP_SHADOW_ID() helper macro In analogy to the KGR_SHADOW_ID() macro, introduce KLP_SHADOW_ID() for the construction of unique shadow variable id's. - commit d8d2d59 ------------------------------------------------------------------- Wed Jul 11 13:50:52 CEST 2018 - nstange@suse.de - Fix CVE-2018-10853 ("kvm: guest userspace to guest kernel write") Live patch for CVE-2018-10853. Upstream commit 3c9fa24ca7c9 ("kvm: x86: use correct privilege level for sgdt/sidt/fxsave/fxrstor access"). KLP: CVE-2018-10853 References: bsc#1097108 CVE-2018-10853 - commit 5b17ab0 ------------------------------------------------------------------- Sun Jul 8 13:02:18 CEST 2018 - nstange@suse.de - scripts/register-patches.sh: implement conditional inclusion Currently, subpatches provide a patched_funcs.csv file describing what needs to be patched. register-patches.sh inspects those to assemble one global klp_patch structure. The current format for these patched_funcs.csv's is obj old_func(,sympos) newfun However, sometimes subpatches depend on some kernel configuration values like CONFIG_X86_64 and functions shall get patched only if the target kernel configuration matches. Extends the patched_funcs.csv format to obj old_func(,sympos) newfun (cpp condition) where everything coming after 'newfun' is taken to be a CPP condition to be used for conditional inclusion. In case there's no condition specified, assign that entry the same semantics as if a '1' had been given. Make register-patches.sh guard the corresponding klp_func entries with #if pragmas. Furthermore, let it guard the enclosing klp_object instances by or'ing together all its klp_funcs' conditions. For the sake of better readability, omit redundant #if pragmas as well as condition clauses. In particular, - if a function entry hasn't got any condition explicitly specified, there won't be any #if pragma, neither at the klp_func nor at the klp_object level, - if multiple function entries for an object are protected by the same condition, it'll be or'ed in at the klp_object level only once, - if all of an object's functions share the same condition, no #if pragmas will be emitted at the klp_func level because they would only duplicate what's already there for the enclosing object and - multiple subsequent function entries sharing the same condition get collated. - commit 56f0729 ------------------------------------------------------------------- Sun Jul 8 13:02:17 CEST 2018 - nstange@suse.de - scripts/register-patches.sh: allow spaces as patched_funcs.csv separators Currently there's one single cut(1) usage which requires that (single) tabs are used as field separators for the patched_funcs.csv. As the rest of the code can deal with sequences of any whitespace already, this imposes an unnecessary restriction on the format. Substitute that cut(1) usage by a sed(1) invocation as appropriate. - commit 9852661 ------------------------------------------------------------------- Mon Jun 4 15:20:08 CEST 2018 - mbenes@suse.cz - livepatch_main.c: Set .replace to true - commit 643f04c ------------------------------------------------------------------- Mon May 14 08:30:00 CEST 2018 - nstange@suse.de - scrips/create-makefile.sh: add support for assembly files - commit cf2464a ------------------------------------------------------------------- Mon Dec 11 15:20:23 CET 2017 - mbenes@suse.cz - New branch for SLE15_Update_0 (SLE15 GA) - commit dfddefb ------------------------------------------------------------------- Wed Dec 6 14:40:14 CET 2017 - mbenes@suse.cz - Revert "shadow variables: introduce upstream patch" This reverts commit e899c4fd3fe7602ebd70f578d8475f1049de7c78. - commit a27c66a ------------------------------------------------------------------- Wed Dec 6 14:37:09 CET 2017 - mbenes@suse.cz - Revert "shadow variables: drop EXPORT_SYMBOL()s" This reverts commit ac6cfebd7f831213ebcd4b2690672871572ec49e. - commit 40d0ba6 ------------------------------------------------------------------- Wed Dec 6 14:37:06 CET 2017 - mbenes@suse.cz - Revert "shadow variables: share shadow data among KGraft modules" This reverts commit 8e1e705d4d56981949f7ae3854d8e1cc2be7f40f. - commit d184b38 ------------------------------------------------------------------- Wed Dec 6 14:36:56 CET 2017 - mbenes@suse.cz - Revert "shadow variables: add KGR_SHADOW_ID helper" This reverts commit 237c8f3d13c382321d3e65d138d328eae0b82f6c. - commit 22d6153 ------------------------------------------------------------------- Wed Dec 6 12:18:06 CET 2017 - mbenes@suse.cz - rpm/config.sh: Use SUSE:SLE-15:GA project - commit ff32fc9 ------------------------------------------------------------------- Wed Dec 6 12:14:17 CET 2017 - mbenes@suse.cz - Revert "scripts: Generate ExclusiveArch in spec file dynamically" This reverts commit 95ed856ea8f99b4e48d7d324278b3628d2ac2fa2. SLE15 will support ppc64le arch from the beginning. - commit 92e9bdb ------------------------------------------------------------------- Tue Dec 5 16:42:04 CET 2017 - mbenes@suse.cz - uname_patch: fix UNAME26 for 4.0 Backport upstream commit 39afb5ee4640 ("kernel/sys.c: fix UNAME26 for 4.0"). - commit 5988feb ------------------------------------------------------------------- Mon Dec 4 15:25:24 CET 2017 - mbenes@suse.cz - Revert "Add compat.h to deal with changes of KGR_PATCH macro" This reverts commit 4186bef35862029a2fd36ba4a73d5fa538992709. All currently supported kernels (that is, everything since SLE12_Update_14 and SLE12-SP1_Update_5) have sympos support. We can drop compat, because we don't need it anymore. - commit 11e3220 ------------------------------------------------------------------- Thu Nov 30 15:15:20 CET 2017 - mbenes@suse.cz - scripts: Generate ExclusiveArch in spec file dynamically ppc64le architecture kernel support is not present in all currently supported branches. It may cause problem for the maintenance team. Generate ExclusiveArch dynamically. It should be 'ppc64le x86_64' for SLE12-SP3 and 'x86_64' for the rest. - commit 95ed856 ------------------------------------------------------------------- Thu Nov 16 14:27:46 CET 2017 - mbenes@suse.cz - rpm/kgraft-patch.spec: Add ppc64le as a supported arch ppc64le is about to be supported in Live Patching product. Add it to ExclusiveArch tag. - commit 8437c94 ------------------------------------------------------------------- Thu Nov 16 14:26:35 CET 2017 - mbenes@suse.cz - rpm/kgraft-patch.spec: Remove s390x from supported archs s390x is not supported in Live Patching product. Remove it from ExclusiveArch. - commit f9614f2 ------------------------------------------------------------------- Tue Oct 31 10:34:53 CET 2017 - nstange@suse.de - livepatch_main.c: klp_patch_init(): fix error handling In case either of the invocations of klp_register_patch() or klp_enable_patch() fails, anything which has been setup by the prior per-(sub-)patch initialiation code, i.e. the expansion of @@KLP_PATCHES_INIT_CALLS@@, won't get undone. Fix this. Also make klp_patch_init() look more like the common 'goto err' idiom and adjust scripts/register_patches.sh accordingly. Fix for commit 7e20201cdcb8 ("kGraft to livepatch migration. API change."). - commit 6552b44 ------------------------------------------------------------------- Tue Oct 31 10:34:52 CET 2017 - nstange@suse.de - scripts/register_patches.sh: generate klp_object array The KLP API doesn't take a flat list of to be patched functions like KGraft did, but introduces an intermediate layer: struct klp_object. Each klp_patch instance is supposed to reference an array of klp_object's which in turn provide an array of klp_func's each. To facilitate merging, we want to generate this list of klp_object's automatically, exactly like we did for the flat function list with KGraft. For each klp_patch instance, there must be at most one klp_object entry referring to the same object. Hence care must be taken not to add an entry for the same object twice in case two different (sub-)patches both patch some functions therein. Require from each (sub-)patch to provide the list of to be patched symbols in a file named SUBPATCH/patched_funcs.csv with each line conforming to the obj old_func(,sympos) new_func pattern. Make scripts/register.sh generate an klp_object array initializer based on this and let it expand the @@KLP_PATCHES_OBJS@@ tag within livepatch_main.c accordingly. Do not replace the now obsolete @@KLP_PATCHES_FUNCS@@ anymore. Add and remove the @@KLP_PATCHES_OBJS@@ and @@KLP_PATCHES_FUNCS@@ markers to and from livepatch_main.c respectively. [ mb: amend copy&paste error ($newfun at the end of uname klp_func[]) ] - commit 0fe721b ------------------------------------------------------------------- Thu Oct 26 13:54:06 CEST 2017 - lpechacek@suse.com - kGraft to livepatch migration. External rename. External rename and thus final step of kGraft -> upstream livepatch migration. kgraft-patch* modules are now livepatch* and live in /lib/modules/$(uname -r)/livepatch. References: fate#323682 [ mb: changelog ] - commit f842fd5 ------------------------------------------------------------------- Thu Oct 5 12:12:29 CEST 2017 - nstange@suse.de - shadow variables: add KGR_SHADOW_ID helper As shadow variables are supposed to be shared among different KGraft modules their id's must be compile time constants. Introduce the KGR_SHADOW_ID helper macro for generating them in a uniform manner based on the bsc# number and a local id. - commit 237c8f3 ------------------------------------------------------------------- Thu Oct 5 12:12:28 CEST 2017 - nstange@suse.de - shadow variables: share shadow data among KGraft modules As it stands, each KGraft module maintains its own set of shadow variable management structures and thus, shadow variables are not sharable between livepatch modules. This behaviour is different from the upstream implementation and, as pointed out by Miroslav Benes, it also opens up an opportunity for a small window where the system might become vulnerable again during transition as we stack new livepatches on top. Let all KGraft patches share the shadow data. Sharing is implemented by moving the management structures from a KGraft module's .data to dynamically allocated memory. Each KGraft module will have specifically named pointers, 'kgr_shadow_hash12' and 'kgr_shadow_lock12', referencing them. Upon initialization, a KGraft module will discover already existing such shadow data by kallsyms-searching all loaded modules for these pointer symbols. If none is found, a new instance is allocated. The newly introduced kgr_shadow_init() implementing this is idempotent and can thus be called from the bsc# subpatches' initializers if needed. Upon KGraft module removal, the new kgr_shadow_cleanup() will conduct another kallsyms search and deallocate the shadow data in case there are no more users. kgr_shadow_cleanup() is also idempotent. Initialization and teardown of the common shadow data is serialized with the module_mutex which has to be taken for the kallsyms search anyway. - commit 8e1e705 ------------------------------------------------------------------- Thu Oct 5 12:12:27 CEST 2017 - nstange@suse.de - shadow variables: drop EXPORT_SYMBOL()s The shadow variable API will only ever get used by the KGraft module itself and thus, there's no need for exporting it. Drop all EXPORT_SYMBOL annotations. - commit ac6cfeb ------------------------------------------------------------------- Thu Oct 5 12:12:26 CEST 2017 - nstange@suse.de - shadow variables: introduce upstream patch Joe Lawrence posted the sixth version of his shadow variable patch [1] implementing the association of additional out-of-band data members to existing structure instances from livepatches. Jiri Kosina has applied this to his git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching.git for-4.15/shadow-variables tree and thus, it's queued up and close to getting merged. The plan is to eventually backport this shadow variable support to SLE kernels, but we also want to have it usable from KGraft modules by now. Port the implementation to the kraft-patches module. Namely, - dump shadow.c in it's current upstream state as it is after commits 439e7271dc2b ("livepatch: introduce shadow variable API") 5d9da759f758 ("livepatch: __klp_shadow_get_or_alloc() is local to shadow.c") 19205da6a0da ("livepatch: Small shadow variable documentation fixes") - add a shadow.h header and declare the newly introduced functions there - and incorporate the new files into the KGraft module's build system. [1] 1504211861-19899-2-git-send-email-joe.lawrence@redhat.com ("[PATCH v6] livepatch: introduce shadow variable API") - commit e899c4f ------------------------------------------------------------------- Wed Jul 12 11:14:40 CEST 2017 - lpechacek@suse.com - kGraft to livepatch migration. API change. Change from kGraft API to livepatch API. Note: error handling in _init() function is broken and fixed later. Automatic generation of klp_objects is not present at all. Added later. References: fate#323682 [ mb: changelog, patch split, whitespace errors ] - commit 7e20201 ------------------------------------------------------------------- Wed Jul 12 11:08:57 CEST 2017 - lpechacek@suse.com - kGraft to livepatch migration. Internal rename. Internal rename in preparation for kGraft -> upstream livepatch migration. External module naming stays the same. API is not touched yet. References: fate#323682 [ mb: changelog edit ] - commit 28a04a2 ------------------------------------------------------------------- Tue Jun 13 15:54:27 CEST 2017 - nstange@suse.de - scripts/register-patches.sh: register subpatch sources in rpm spec In order to reduce the manual merging work upon addition of new (sub)patches, commit 4e8dc885be22 ("scripts: create kgr_patch_main.c dynamically") introduced the register-patches.sh helper. It discovers those and tweaks the main entry point, kgr_patch_main.c, as needed. However, a remaining manual merging task is to list a (sub)patch's source archive in rpm/kgraft-patch.spec and to %setup it. Make scripts/register-patches.sh do this. Namely, - introduce the @@KGR_PATCHES_SOURCES@@ and @@KGR_PATCHES_SETUP_SOURCES@@ placeholders in rpm/kgraft-patch.spec - and make scripts/register-patches.sh expand those within a spec file to be given as an additional command line argument. Finally, adjust scripts/tar-up.sh accordingly. - commit 9eafc8a ------------------------------------------------------------------- Tue Jun 13 15:51:42 CEST 2017 - nstange@suse.de - scripts/register-patches.sh: don't add ','s to @@KGR_PATCHES_FUNCS@@ register-patches.sh expands kgr_patch_main.c's @@KGR_PATCHES_FUNCS@@ placeholder by concatenating all available patches' KGR_PATCH__FUNCS together, separating them by commas. The KGR_PATCH__FUNCS are CPP macros supposed to be provided by each patch. If one of these happens to be empty, the preprocessed expansion will contain two consecutive commas which gcc doesn't like in array initializers. Do not add any commas to the @@KGR_PATCHES_FUNCS@@ expansion but require the individual KGR_PATCH__FUNCS macros to already contain trailing ones as needed. Fixes: 4e8dc885be22 ("scripts: create kgr_patch_main.c dynamically") - commit ba41416 ------------------------------------------------------------------- Wed Jun 7 12:05:41 CEST 2017 - nstange@suse.de - scripts: create kgr_patch_main.c dynamically The kgraft-patches repository has got many branches, each corresponding to a supported codestream. Each of those carries a potentially different set of live (sub)patches which are controlled through the entry points in kgr_patch_main.c. According to Miroslav, merging of a new (sub)patch based on the pristine master is a pita due to conflicts. Since all (sub)patches stick to certain conventions already, the required modifications of the merging-hotspot kgr_patch_main.c are quite mechanic. Let a script do the work. Namely, - insert some special @@-embraced placeholders at the few places depending on the actual set of (sub)patches, - let register-patches.sh discover the available (sub)patches by searching for directories - and let register-patches.sh replace those placeholders in kgr_patch_main.c Finally, add a register-patches.sh invocation to tar-up.sh. This procedure requires that a SUBPATCH located in directory SUBPATCH/ adheres to the following conventions: - It must provide a provide a SUBPATCH/kgr_patch_SUBPATCH.h header. - This header must provide declarations for kgr_patch_SUBPATCH_init() and kgr_patch_SUBPATCH_cleanup(). - This header must also #define a KGR_PATCH_SUBPATCH_FUNCS macro. It should expand to a comma separated list of KGR_PATCH*() entries, each corresponding to a function the subpatch wants to replace. [mbenes: fixed typos, empty line removed] - commit 4e8dc88 ------------------------------------------------------------------- Mon Apr 24 16:00:54 CEST 2017 - mbenes@suse.cz - Replace $(PWD) with $(CURDIR) in Makefile CURDIR is an internal variable of make and more suitable. - commit 03bf1d5 ------------------------------------------------------------------- Wed Apr 19 14:02:27 CEST 2017 - mbenes@suse.cz - Create Makefile automatically Introduce scripts/create-makefile.sh script to automatically create a makefile. The scripts is called from tar-up.sh or could be called manually. - commit 1af6c29 ------------------------------------------------------------------- Mon Oct 24 13:26:09 CEST 2016 - mbenes@suse.cz - Better to use SUSE:SLE-12:Update than Devel:kGraft:SLE12 project - commit bdc7598 ------------------------------------------------------------------- Tue May 10 15:43:59 CEST 2016 - mbenes@suse.cz - Add compat.h to deal with changes of KGR_PATCH macro Sympos patch set for kGraft redefined KGR_PATCH macro and added two new ones. Add new compat.h which contains macro magic so that all kGraft patches would work on both old and new kernels with the patch set merged. - commit 4186bef ------------------------------------------------------------------- Fri May 6 17:01:17 CEST 2016 - mbenes@suse.cz - Fix the number of parameters of KGR_PATCH macro New kernels contain kGraft's sympos patch set which changed number of paramaters of KGR_PATCH macro and introduced new macros. Fix it in master so it will be ok for new branches. - commit 78cf676 ------------------------------------------------------------------- Tue Sep 1 13:00:23 CEST 2015 - mmarek@suse.com - Include the RPM version number in the module name - commit 8fa02c6 ------------------------------------------------------------------- Wed Aug 26 11:29:44 CEST 2015 - mbenes@suse.cz - Remove forgotten debug option in the Makefile - commit 9c24ab8 ------------------------------------------------------------------- Mon Aug 17 13:42:04 CEST 2015 - mbenes@suse.cz - Add license and copyright notices - commit d42d3aa ------------------------------------------------------------------- Wed Jul 15 15:58:35 CEST 2015 - mbenes@suse.cz - Remove immediate flag Fake signal was merged to kGraft and immediate feature removed. Remove it in kGraft patches from now on too. - commit c767ad2 ------------------------------------------------------------------- Wed May 20 16:32:17 CEST 2015 - mbenes@suse.cz - Set immediate flag to false Using immediate set to true can lead to BUGs and oopses when downgrading, reverting or applying replace_all patches. There is no way how to find out if there is a process in the old code which is being removed. The module would be put, removed and the process will crash. The consistency model guarantees that there is no one in the old code when the finalization ends. Thus use it for all case to be safe. - commit 830e1a3 ------------------------------------------------------------------- Tue May 12 15:48:07 CEST 2015 - mbenes@suse.cz - Fix description in rpm spec file Spec file description mentions initial kGraft patch which is only true for real initial patch. Make it more neutral. References: bsc#930408 - commit a55e023 ------------------------------------------------------------------- Wed Apr 1 15:36:24 CEST 2015 - mbenes@suse.cz - Generate archives names automatically in tar-up.sh - commit 1f34f18 ------------------------------------------------------------------- Wed Apr 1 13:39:26 CEST 2015 - mbenes@suse.cz - Automatically generate .changes file from git log Also add comments to tar-up.sh script to distinguish between sections. - commit 212a7ae ------------------------------------------------------------------- Thu Mar 26 14:24:21 CET 2015 - mmarek@suse.cz - Revert "Require exact kernel version in the patch" This needs to be done differently, so that modprobe --force works as expected. References: bnc#920615 This reverts commit c62c11aecd4e3f8822e1b835fea403acc3148c5a. - commit bc88dd7 ------------------------------------------------------------------- Wed Mar 25 13:10:24 CET 2015 - mmarek@suse.cz - Require exact kernel version in the patch References: bnc#920615 - commit c62c11a ------------------------------------------------------------------- Tue Mar 24 12:15:41 CET 2015 - mmarek@suse.cz - Add the git commit and branch to the package description References: bnc#920633 - commit 1ff4e48 ------------------------------------------------------------------- Wed Nov 26 10:09:14 CET 2014 - mbenes@suse.cz - Set immediate flag for the initial patch Setting immediate to true will simplify installation of the initial patch and possibly also of the further updates. References: bnc#907150 - commit 391b810 ------------------------------------------------------------------- Tue Nov 25 16:26:40 CET 2014 - mbenes@suse.cz - Add .replace_all set to true Add .replace_all flag set to true even to the initial patch. Thus we will not forget to add that later. Also .immediate is there as a comment. - commit 933e15e ------------------------------------------------------------------- Mon Nov 24 15:02:33 CET 2014 - mmarek@suse.cz - Drop the hardcoded kernel release string The updated kgraft-devel macros set this during build time, so we do not need to know the kernel release string beforehand. As a name suffix for the source packages, let's use SLE12_Test in the master branch and SLE12_Update_ in the update branches. - commit 65f7a25 ------------------------------------------------------------------- Fri Nov 21 15:48:48 CET 2014 - mmarek@suse.cz - Check that we are building against the set kernel version - commit 689e44a ------------------------------------------------------------------- Wed Nov 12 04:11:14 CET 2014 - mmarek@suse.cz - Mark the module as supported References: bnc#904970 - commit 6249314 ------------------------------------------------------------------- Tue Nov 11 17:11:28 CET 2014 - mmarek@suse.cz - Build the test packages against Devel:kGraft:SLE12 - commit c952fbb ------------------------------------------------------------------- Thu Nov 6 13:55:43 CET 2014 - mbenes@suse.cz - Add top git commit hash to uname -v Add top git commit hash to version part of uname. This makes the identification of current patch level easy (even in crash: p kgr_tag). References: fate#317769 - commit 54c9595 ------------------------------------------------------------------- Tue Nov 4 16:23:50 CET 2014 - mbenes@suse.cz - Replace @@RELEASE@@ in kgr_patch->name with @@RPMRELEASE@@ We need to replace @@RELEASE@@ in kgr_patch->name with @@RPMRELEASE@@ due to sysfs tree. @@RELEASE@@ changes with each new version of package. - commit 51fd9dd ------------------------------------------------------------------- Mon Nov 3 17:27:24 CET 2014 - mmarek@suse.cz - Add a source-timestamp file with the git commit hash and branch This is required by the bs-upload-kernel script to upload packages to the BS. It can also be used by the specfile in the future. - commit feab4f1 ------------------------------------------------------------------- Mon Nov 3 16:56:31 CET 2014 - mbenes@suse.cz - Initial commit - commit 600de9d ------------------------------------------------------------------- Mon Nov 3 14:59:46 CET 2014 - mmarek@suse.cz - Add config.sh script This tells the automatic builder which IBS project to use. - commit aa7f1cb