Re: [RFC PATCH 6/9] livepatch: create per-task consistency model

From: Jiri Kosina
Date: Thu Feb 12 2015 - 09:27:12 EST


On Thu, 12 Feb 2015, Josh Poimboeuf wrote:

> > and you have a livepatch patching foo() and changing its return value
> > semantics. Then freezer doesn't really help.
>
> Don't we have the same issue with livepatch? For example:
>
> while (some_condition) {
> ret = foo();
> ...
> schedule(); <-- switch to the new universe while it's sleeps
> ...
> // use ret in an unexpected way
> }

Well if ret is changing semantics, the livepatch will also have to patch
the calling function (so that it handles new semantics properly), and
therefore by looking at the stacks you would see that fact and wouldn't
migrate the scheduled-out task to the new universe.

> I think it's not really a problem, just something the patch author needs
> to be aware of regardless.

Exactly; that's just up to the patch author to undersntad what the
semantical aspects of the patch he is writing are, and make appropriate
consistency model choice.

Thanks,

--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/