Skip to contentSkip to conversation

Mistake in include IS_ENABLED(CONFIG_LIVEPATCH)

DISCUSSION Denys Fedoryshchenko 2 participants 2 messages Feb 11, 2017

lore
Share & tools
lore
#0 lore raw

Hello,

I noticed that sample of livepatch is not working in 4.9.9, because in include, linux/livepatch.h
it is:
#if IS_ENABLED(CONFIG_LIVEPATCH)

while config option is:
CONFIG_HAVE_LIVEPATCH=y

After editing livepatch.h sample module compiles fine

Probably that's just a typo?

#1 lore raw
Quoted 6 lines · Denys Fedoryshchenko

I noticed that sample of livepatch is not working in 4.9.9, because in include,
linux/livepatch.h
it is:
#if IS_ENABLED(CONFIG_LIVEPATCH)

Quoted 6 lines

while config option is:
CONFIG_HAVE_LIVEPATCH=y

After editing livepatch.h sample module compiles fine

Probably that's just a typo?

There are two config variables. CONFIG_HAVE_LIVEPATCH is set by those architectures for which livepatching implementation exists.

CONFIG_LIVEPATCH is the actual config option turning the support in kernel on/off.

What you are seeing is that if you have kernel configuration that has livepatching (CONFIG_LIVEPATCH) turned off, the sample module doesn't compile for it either. I'd say it's not unexpected behavior.

Signature · 2 lines
Jiri Kosina
SUSE Labs