title: Not able to write in /dev/mem
body: <p>The issue that I am experimenting is not related with <code>open()</code> or <code>mmap()</code> function, which are executed properly. I have disabled <code>CONFIG_STRICT_DEVMEM</code> in the kernel so I can read from <code>/dev/mem</code> without problems. Actually, I can do the following:</p>
  
  <pre><code>const char *path = "/dev/mem"
  int fd = open(path, O_RDWR); /* read and write flags*/
  p  = mmap(0, SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, BASE_ADDR); /* read and write flags*/
  </code></pre>
  
  <p>And the code does not fail. Nonetheless, I am using this code to write in the PCI address space. So, basically the <code>BASE_ADDR</code> is <code>0xc000000</code>, and the size is 256 MiB (<code>0x10000000</code>, all the PCI address space).</p>
  
  <p>Said that, when I try to write on these positions (with a specific offset, BDF format), nothing is written; again the code does not fail, it just does not write anything. </p>
  
  <p>In case my code was wrong, I tried <a href="https://busybox.net/about.html" rel="nofollow noreferrer">BusyBox</a>, with the following parameters:</p>
  
  <pre><code>[horro@ ~]$ sudo busybox devmem 0xc00b0a8c w 0xffffffff
  [horro@ ~]$ sudo busybox devmem 0xc00b0a8c             
  0x00000000
  </code></pre>
  
  <p>So, basically it is not writing anything.</p>