Re: [PATCH 04/12] __wr_after_init: x86_64: __wr_op

From: Igor Stoppa
Date: Thu Dec 20 2018 - 11:53:33 EST


On 19/12/2018 23:33, Igor Stoppa wrote:

+ if (WARN_ONCE(op >= WR_OPS_NUMBER, "Invalid WR operation.") ||
+ WARN_ONCE(!is_wr_after_init(dst, len), "Invalid WR range."))
+ return (void *)dst;
+
+ offset = dst - (unsigned long)&__start_wr_after_init;

I forgot to remove the offset.
If the whole kernel memory is remapped, it is shifted by wr_poking_base.
I'll fix it in the next iteration.

+ wr_poking_addr = wr_poking_base + offset;

wr_poking_addr = wr_poking_base + dst;

--
igor