2

I would like to run the Phoronix Test Suite 6.2.2 under the SELinux sandbox on Fedora 23, but I can't execute it using $ sandbox ./phoronix-test-suite. I probably don't have the correct SELinux type. I would like to run the following test suites under the sandbox.

  • Disk Test Suite
  • Desktop Graphics
  • Memory Test Suite
  • Networking Test Suite
  • Kernel
  • Video Encoding
  • Linux System
  • Cryptography
  • CPU / Processor Suite

Here is what I have tried so far.

[slazer@localhost phoronix-test-suite]$ seinfo -t | egrep '^   sandbox'
   sandbox_x_client_t
   sandbox_net_client_t
   sandbox_xserver_tmpfs_t
   sandbox_web_client_tmpfs_t
   sandbox_devpts_t
   sandbox_xserver_t
   sandbox_exec_t
   sandbox_file_t
   sandbox_xserver_input_xevent_t
   sandbox_x_t
   sandbox_web_client_t
   sandbox_min_t
   sandbox_net_t
   sandbox_web_t
   sandbox_min_client_t
   sandbox_net_client_tmpfs_t
   sandbox_x_client_tmpfs_t
   sandbox_xserver_xproperty_t
   sandbox_t
   sandbox_min_client_tmpfs_t

[slazer@localhost phoronix-test-suite]$ pwd
/home/slazer/Downloads/phoronix-test-suite

[slazer@localhost phoronix-test-suite]$ ls
AUTHORS  ChangeLog  COPYING  deploy  documentation  install-sh  phoronix-test-suite  phoronix-test-suite.bat  pts-core  README.md  sehome  tmp

[slazer@localhost phoronix-test-suite]$ sandbox ./phoronix-test-suite
/bin/sh: ./phoronix-test-suite: Permission denied

[slazer@localhost phoronix-test-suite]$ sandbox -M -H sehome/ -T tmp/ -t sandbox_exec_t -X ./phoronix-test-suite
/usr/bin/sandbox:437: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
Could not set exec context to unconfined_u:unconfined_r:sandbox_exec_t:s0:c460,c525. Invalid argument

[slazer@localhost phoronix-test-suite]$ sandbox -M -H sehome/ -T tmp/ -t sandbox_exec_t ./phoronix-test-suite
Could not set exec context to unconfined_u:unconfined_r:sandbox_exec_t:s0:c106,c534. Invalid argument

[slazer@localhost phoronix-test-suite]$ sandbox -M -H sehome/ -T tmp/ -t sandbox_x_t -X ./phoronix-test-suite
/usr/bin/sandbox:437: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
Couldn't exec /home/slazer/Downloads/phoronix-test-suite/phoronix-test-suite: Permission denied
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
      after 1700 requests (1700 known processed) with 0 events remaining.

[slazer@localhost phoronix-test-suite]$ sandbox -M -H sehome/ -T tmp/ -t sandbox_t ./phoronix-test-suite
Failed to execute command /home/slazer/Downloads/phoronix-test-suite/phoronix-test-suite: Permission denied

[slazer@localhost phoronix-test-suite]$ sandbox -M -H sehome/ -T tmp/ -t sandbox_file_t ./phoronix-test-suite
Failed to execute command /home/slazer/Downloads/phoronix-test-suite/phoronix-test-suite: Operation not permitted

[slazer@localhost phoronix-test-suite]$ sandbox -M -H sehome/ -T tmp/ -t sandbox_net_t ./phoronix-test-suite
Failed to execute command /home/slazer/Downloads/phoronix-test-suite/phoronix-test-suite: Permission denied
  • what are you trying to achieve by running that under SELinux sandbox? – Jakuje May 1 '16 at 11:06
  • @Jakuje I am measuring the performance degradation of running an application in a SELinux Sandbox, in comparison with running it natively. – Slazer May 1 '16 at 11:11
  • I am afraid that under this sandbox, some of the required tasks will not work. You might try to run it under strace to check why exactly is it failing. If it is X application, you should certainly use -X switch. But I don't have fedora around here. – Jakuje May 1 '16 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.