• Matthew Denton's avatar
    Linux sandbox: add interface for the brokered syscalls · bb65b101
    Matthew Denton authored
    Currently, BrokerProcess:SIGSYS_Handler dispatches syscall numbers to
    specific syscall handler, along with a couple sanity checks.
    
    When USER_NOTIF support lands, the broker will also need to read the
    syscall number and dispatch to a syscall handler. So, create an
    interface that lists the syscall handlers, and deduplicate the
    dispatching code.
    
    The current implementations of the syscall dispatch functions will
    be specific to BrokerClient, so move them from broker_process.cc to
    broker_client.cc as they won't be used by USER_NOTIF.
    This means a lot of changing open_broker.Syscall(...) to
    open_broker.GetBrokerClientSignalBased()->Syscall(...) in
    broker_process_unittest.cc.
    
    Bug: 1117351
    Change-Id: I830fa6d10f973cf90697c7e19b80b596ba0428b5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2379551
    Commit-Queue: Matthew Denton <mpdenton@chromium.org>
    Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
    Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#809136}
    bb65b101
linux_seccomp.h 4.18 KB