[lkml]   [2019]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[Xen-devel] xen/mem-reservation API and out-of-tree kernel modules

I am working on porting an out-of-tree kernel driver to the kernel
5.0 and that driver uses functionality provided by
module.  Since commit [1] it is not possible to build a kernel module
which uses mem-reservation API as xen_scrub_pages variable, which is
checked in
xenmem_reservation_scrub_page, became a kernel module parameter and is
now only
accessible for built-in modules:

static inline void xenmem_reservation_scrub_page(struct page *page)
    if (xen_scrub_pages)

This results in link-time warning:

    WARNING: "xen_scrub_pages" [yourmodule.ko] undefined!

and thus not allowing the module to run. At the moment I can only see a
possible fix
for this by making the following change:

diff --git a/drivers/xen/mem-reservation.c b/drivers/xen/mem-reservation.c
index 3782cf070338..85fecfec50e1 100644
--- a/drivers/xen/mem-reservation.c
+++ b/drivers/xen/mem-reservation.c
@@ -18,6 +18,7 @@

 bool __read_mostly xen_scrub_pages =
 core_param(xen_scrub_pages, xen_scrub_pages, bool, 0);

but this looks a bit unusual for the kernel?

I am looking for community advice here and help

Thank you,

 \ /
  Last update: 2019-01-31 15:02    [W:0.097 / U:3.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site