• 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
..
piegen Loading commit data...
Makefile Loading commit data...
Makefile.library Loading commit data...
log-simple.c Loading commit data...
parasite-vdso.c Loading commit data...
parasite.c Loading commit data...
pie-reloc.lds.S.in Loading commit data...
pie-relocs.c Loading commit data...
pie-relocs.h Loading commit data...
pie.lds.S.in Loading commit data...
restorer.c Loading commit data...
util-fd.c Loading commit data...
util-vdso.c Loading commit data...
util.c Loading commit data...