• Kirill Tkhai's avatar
    pie: Optimize send_fds() and recv_fds() with opts · 26162cac
    Kirill Tkhai authored
    Do not ask kernel to transfer more opts than we really need.
    
    When we're sending fds with flags, we ask kernel to copy the whole
    struct scm_fdset::opts array, like we'd send CR_SCM_MAX_FD fds,
    even if really we're transmitting only one fd.
    send_fds() does not initializes the rest of array memory, but kernel
    transmits this garbage. Also, recv_msg() does not return it to userspace.
    
    This patch makes kernel do not transmit uninitialized garbage.
    
    travis-ci: success for pie: Optimize send_fds() and recv_fds() with opts
    Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    26162cac
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...