• Christian Brauner's avatar
    binderfs: port to new mount api · 095cf502
    Christian Brauner authored
    When I first wrote binderfs the new mount api had not yet landed. Now
    that it has been around for a little while and a bunch of filesystems
    have already been ported we should do so too. When Al sent his
    mount-api-conversion pr he requested that binderfs (and a few others) be
    ported separately. It's time we port binderfs. We can make use of the
    new option parser, get nicer infrastructure and it will be easier if we
    ever add any new mount options.
    
    This survives testing with the binderfs selftests:
    
    for i in `seq 1 1000`; do ./binderfs_test; done
    
    including the new stress tests I sent out for review today:
    
     TAP version 13
     1..1
     # selftests: filesystems/binderfs: binderfs_test
     # [==========] Running 3 tests from 1 test cases.
     # [ RUN      ] global.binderfs_stress
     # [  XFAIL!  ] Tests are not run as root. Skipping privileged tests
     # [==========] Running 3 tests from 1 test cases.
     # [ RUN      ] global.binderfs_stress
     # [       OK ] global.binderfs_stress
     # [ RUN      ] global.binderfs_test_privileged
     # [       OK ] global.binderfs_test_privileged
     # [ RUN      ] global.binderfs_test_unprivileged
     # # Allocated new binder device with major 243, minor 4, and name my-binder
     # # Detected binder version: 8
     # [==========] Running 3 tests from 1 test cases.
     # [ RUN      ] global.binderfs_stress
     # [       OK ] global.binderfs_stress
     # [ RUN      ] global.binderfs_test_privileged
     # [       OK ] global.binderfs_test_privileged
     # [ RUN      ] global.binderfs_test_unprivileged
     # [       OK ] global.binderfs_test_unprivileged
     # [==========] 3 / 3 tests passed.
     # [  PASSED  ]
     ok 1 selftests: filesystems/binderfs: binderfs_test
    
    Cc: Todd Kjos <tkjos@google.com>
    Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    Link: https://lore.kernel.org/r/20200313153427.141789-1-christian.brauner@ubuntu.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    095cf502
binderfs.c 19.4 KB