[lkml]   [2019]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] livepatch: Enforce reliable stack trace as config dependency
On Mon 2019-02-11 08:08:13, Josh Poimboeuf wrote:
> Anyway, I'm not sure about this approach. This patch makes the s390
> livepatch code no longer compilable, turning it into completely dead
> code. So if something changes in the s390 code which causes it to stop
> compiling, nobody will notice.

Good point. Well, it is only small win when a code is buildable
but it could not get really used. Also the amount of arch-specific
code is really minimal.

> I think I'd rather go in the opposite direction: allow the patches to be
> loaded. Then they can be forced, if needed. That enables both compile
> and runtime testing. That way we don't make any backward progress,
> until such arches get reliable stacktraces.

Do you mean to convert the error into warning?

For example, the change below. Note that I did not mention
the possibility to force the transition by intention. It is risky
and people should not get used to it.

Heh, I think that this was the main reason why it was the error.
We did not want to get people used to forcing livepatches.

diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index d1af69e9f0e3..8d9bce251516 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -1035,11 +1035,10 @@ int klp_enable_patch(struct klp_patch *patch)
return -ENODEV;

if (!klp_have_reliable_stack()) {
- pr_err("This architecture doesn't have support for the livepatch consistency model.\n");
- return -EOPNOTSUPP;
+ pr_warn("This architecture doesn't have support for the livepatch consistency model.\n");
+ pr_warn("Only one livepatch can be installed.\n");


ret = klp_init_patch_early(patch);

Best Regards,

 \ /
  Last update: 2019-02-12 10:47    [W:0.031 / U:34.904 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site