title: compiling mem.c without CONFIG_STRICT_DEVMEM flag
body: <p>I'm trying to compile <code>mem.c</code> module with a <code>CONFIG_STRICT_DEVMEM</code> disabled. The idea is to have a module that will allow me to access address space in <code>/dev/mem</code> above 1MB. Why? I'm doing some testing which requires access to this memory space. </p>
  
  <p>I copied <code>mem.c</code> into my home directory, removed code that has access restriction and compiled it. However I'm getting the following warnings:</p>
  
  <pre><code>WARNING: "kmsg_fops" [/home/user/projects/new_mem/mem.ko] undefined!
  WARNING: "tty_init" [/home/user/projects/new_mem/mem.ko] undefined!
  WARNING: "phys_mem_access_prot" [/home/user/projects/new_mem/mem.ko] undefined!
  WARNING: "xlate_dev_mem_ptr" [/home/user/projects/new_mem/mem.ko] undefined!
  WARNING: "devmem_is_allowed" [/home/user/projects/new_mem/mem.ko] undefined!
  WARNING: "splice_from_pipe" [/home/user/projects/new_mem/mem.ko] undefined!
  WARNING: "shmem_zero_setup" [/home/user/projects/new_mem/mem.ko] undefined!
  make[1]: Leaving directory `/usr/src/linux-headers-4.4.0-34-generic'
  </code></pre>
  
  <p>My questions are:</p>
  
  <p>Do I really have to compile every module that have these functions defined or there is another way to do it? If there is then what is it?</p>
  
  <p>All I need need is to compile code to be able to access <code>/dev/mem</code>, I really don't need all the other modules. Short of removing unnecessary code from <code>mem.c</code> is there another way to remove this code?</p>
  
  <p>Any help is appreciated.</p>