lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 27 May 2020 23:44:48 +0300
From:   Dmitry Yakunin <>
To:     Martin KaFai Lau <>
Cc:     "" <>,
        "" <>,
        "" <>,
        "" <>
Subject: Re: [PATCH bpf-next] bpf: add SO_KEEPALIVE and related options to bpf_setsockopt

27.05.2020, 20:03, "Martin KaFai Lau" <>:
> On Wed, May 27, 2020 at 06:05:43PM +0300, Dmitry Yakunin wrote:
>>  This patch adds support of SO_KEEPALIVE flag and TCP related options
>>  to bpf_setsockopt() routine. This is helpful if we want to enable or tune
>>  TCP keepalive for applications which don't do it in the userspace code.
>>  In order to avoid copy-paste, common code from classic setsockopt was moved
>>  to auxiliary functions in the headers.
> Thanks for refatoring some of the pieces. I suspect some more can be done.
> In the long run, I don't think this copy-and-paste is scalable.
> For most of the options (integer value and do not need ns_capable()),
> do_tcp_setsockopt() and sock_setsockopt() can be directly called with
> some refactoring.
> The change looks good. For this patch,
> Acked-by: Martin KaFai Lau <>

Thanks for your comment, Martin.
I agree with you, bpf_setsockopt and older setsockopts should be refactored to use common code.
I'll keep this in mind if i want to add new options.

Powered by blists - more mailing lists