open-power-host-os / linux

Linux kernel source tree
Other
3 stars 4 forks source link

Need to have CONFIG_HAVE_RELIABLE_STACKTRACE for klp #33

Closed bssrikanth closed 6 years ago

bssrikanth commented 6 years ago
Mirrored with LTC bug https://bugzilla.linux.ibm.com/show_bug.cgi?id=169888 Currently when we try to live patch kernel on hostos-devel we get an error saying: Jul 23 11:54:04 kernel: livepatch: This architecture doesn't have support for the livepatch consistency model. Looks like we need below two configs to be enabled for klp: static inline bool klp_have_reliable_stack(void) { return IS_ENABLED(CONFIG_STACKTRACE) && IS_ENABLED(CONFIG_HAVE_RELIABLE_STACKTRACE); } On hostos we currently have one of them: ``` # cat /boot/config-4.17.0-1.dev.git5ce3eac.el7.ppc64le | grep CONFIG_STACKTRACE CONFIG_STACKTRACE_SUPPORT=y CONFIG_STACKTRACE=y # cat /boot/config-4.17.0-1.dev.git5ce3eac.el7.ppc64le | grep CONFIG_HAVE_RELIABLE_STACKTRACE # ``` We need hostos kernel to be built with CONFIG_HAVE_RELIABLE_STACKTRACE option as well to support klp [for testing]
cdeadmin commented 6 years ago

------- Comment From seg@us.ibm.com 2018-07-23 13:08:33 EDT------- We do not have support for Kernel Live Patching in HostOS in either hostos-devel or hostos-release and we do not want to turn it on at this time.

bssrikanth commented 6 years ago

I spoke to Kamalesh, immediate patching is removed from kernel from 4.16v. So reliable stack trace is the way to go for KLP. powerpc got this support via commit :

df78d3f6148092d33a9a24c7a9cfac3d0220b484 Author: Torsten Duwe duwe@lst.de Date: Fri May 4 14:38:34 2018 +0200

powerpc/livepatch: Implement reliable stack tracing for the consistency model

I did a quick test with that patch, KLP works on hostos for basic patching.

When hostos gets to v4.18-rc1 it will get to above patch.

cdeadmin commented 6 years ago

------- Comment From seg@us.ibm.com 2018-08-31 13:32:49 EDT------- OK we can all agree it's fixed (or fixed enough)