title: Modify kernel parameters (mmap operation not permitted, EPERM)
body: <p>I am trying to run <a href="https://github.com/RedPitaya/RedPitaya/blob/master/Test/rp_remote_acquire/scope.c" rel="nofollow noreferrer">this code</a> on a server (RedPitaya) as well as a client (ubuntu virtual machine).</p>
  
  <p>The program returns the following error messages when it is run on the client with root privileges:</p>
  
  <pre><code>root@VirtualBox:/.../rp_remote_acquire# ./rp_remote_acquire -m 1 -a 192.169.1.100 -p 5000 -k 0 -c 0 -d 64
  mmap scope io failed (non-fatal), 1
  mmap scope ddr a failed (non-fatal), 1
  Segmentation fault (core dumped)
  </code></pre>
  
  <p>I am not sure if the segmentation fault is related to the first two errors because I only get a segmentation fault when the server is running...</p>
  
  <p>The error seems to be coming from here:</p>
  
  <pre><code>if (param-&gt;mapped_io == MAP_FAILED) {
      fprintf(stderr, "mmap scope io failed (non-fatal), %d\n", errno);
      param-&gt;mapped_io = NULL;
  }
  </code></pre>
  
  <p>I am aware that a <a href="https://stackoverflow.com/questions/8213671/mmap-operation-not-permitted">similar problem</a> has already been resolved on stackoverflow.</p>
  
  <p>I tried</p>
  
  <pre><code>sysctl dev.mem.restricted
  </code></pre>
  
  <p>and I tried adding</p>
  
  <pre><code>linux   /boot/vmlinuz-linux iomem=relaxed
  </code></pre>
  
  <p>to the end of</p>
  
  <pre><code>/boot/grub/grub.cfg
  </code></pre>
  
  <p>and rebooting, but the problem still persists... </p>
  
  <p>I would like to allow this program to access the computers virtual memory and thereby hopefully resolve all the errors. It could well be that I didn't manage to set the kernel parameters correctly.</p>
  
  <p>Could someone please point me in the right direction?</p>