lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160614171528.GA14276@outlook.office365.com>
Date:	Tue, 14 Jun 2016 10:15:29 -0700
From:	Andrey Vagin <avagin@...tuozzo.com>
To:	"Eggert, Lars" <lars@...app.com>
CC:	Pavel Emelyanov <xemul@...tuozzo.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"criu@...nvz.org" <criu@...nvz.org>,
	"Honda, Michio" <michio@...app.com>
Subject: Re: [CRIU] TCP_REPAIR MSS issue

Hi,

Recently we found that we have to restore more parameters for tcp
sockets.
https://patchwork.kernel.org/patch/9144995/

As for your problem, criu saves and restores mss_clamp. Could you check
that it works for your case?

on dump:
	static int tcp_stream_get_options(int sk, struct tcp_info *ti,
	TcpStreamEntry *tse)
	{
		int ret;
		socklen_t auxl;
		int val;

		auxl = sizeof(tse->mss_clamp);
		ret = getsockopt(sk, SOL_TCP, TCP_MAXSEG, &tse->mss_clamp, &auxl);
		if (ret < 0)
			goto err_sopt;

on restore:
        pr_debug("Will set mss clamp to %u\n", tse->mss_clamp);
        opts[onr].opt_code = TCPOPT_MAXSEG;
        opts[onr].opt_val = tse->mss_clamp;
        onr++;

        if (setsockopt(sk, SOL_TCP, TCP_REPAIR_OPTIONS,
                                opts, onr * sizeof(struct tcp_repair_opt)) < 0) {
                pr_perror("Can't repair options");
                return -1;
        }

Thanks,
Andrew

On Tue, Jun 14, 2016 at 11:40:01AM +0000, Eggert, Lars wrote:
> On 2016-06-14, at 13:28, Pavel Emelyanov <xemul@...tuozzo.com> wrote:
> > Andrey (in Cc) has played with TCP_REPAIR recently, I guess he can know something.
> 
> Thanks for CC'ing him. We looked a little bit more into this:
> 
> When TCP_REPAIR is on, tcp_connect() directly calls tcp_finish_connect() before returning, passing NULL for skb, which causes sk_rx_dst_set() to be bypassed. Later, when TCP_REPAIR is being turned off, do_tcp_setsockopt() just does tcp_send_window_probe(), but apparently all the "dst" stuff is being bypassed then also, so the mss remains at TCP_MSS_DEFAULT.
> 
> Lars


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ