Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933341AbcKONgh (ORCPT ); Tue, 15 Nov 2016 08:36:37 -0500 Received: from mail-db5eur01on0139.outbound.protection.outlook.com ([104.47.2.139]:23280 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752774AbcKONge (ORCPT ); Tue, 15 Nov 2016 08:36:34 -0500 X-Greylist: delayed 4681 seconds by postgrey-1.27 at vger.kernel.org; Tue, 15 Nov 2016 08:36:33 EST Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=xemul@virtuozzo.com; Subject: Re: [CRIU] [PATCH net-next] tcp: allow to enable the repair mode for non-listening sockets To: Andrei Vagin , "David S. Miller" References: <1479176114-12658-1-git-send-email-avagin@openvz.org> CC: Hideaki YOSHIFUJI , , James Morris , , , Alexey Kuznetsov , Patrick McHardy From: Pavel Emelyanov Message-ID: <582AFAA2.2000100@virtuozzo.com> Date: Tue, 15 Nov 2016 15:08:02 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 MIME-Version: 1.0 In-Reply-To: <1479176114-12658-1-git-send-email-avagin@openvz.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: HE1PR0802CA0015.eurprd08.prod.outlook.com (10.172.123.153) To VI1PR0802MB2144.eurprd08.prod.outlook.com (10.172.12.13) X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2144;2:WqOg7MUCV72zG1px1xLkNfcaTwkoilhYhZ/xxemARVqvN3dqHeTmh2JYIopDZfPKdfiG68McQK5et/oYcXFo04JGTXq1aVA1fX5Qo3i8jcMF5mBpsdQZl12mkT71V1299fbUGHfIqCWtD1qm5GLpHXGvLExN3r2olzYVAgxv9fQ=;3:GyIfo6uF/0DhD129jXTNPv5JG9y5MNkPh3iPSqp1eli6EkVofZSoOqaR3lTLgFS49+ELFCQn0CM1a8J6gqTaP0uAdYCr9NGrIriNfOWDkj34v/UA+i1PTlSw+WVavH6BQ/d6ncpDNi9vrZHZetrQ8V8kk/oXwD5g/WDxYzIc+QY=;25:hhv9l9rOjM5PQwrd4QBT7kydiG7Uw+ml6L6B6Kc6vrHKPdvqJkLKIGjZahRCCwlo8wHk03BEyyjljCs5BcwGH88GkGe6nKA1xjIuD+4k7DdBhawddPwa66tD0lmtMOFaLm0FgQu27GVzLwO9b1I20GKxohilSwxOP+HZ+EyLVo/IqbAXiGzqGyNjgZpk7KGUEWunS/WikkWbipaoyk55vMg5NEYPohRBot1Keu2VgNi/lZ+HkA0g/9N531Dw25RBQZV1sLw3EtqDAIZt/colSYfWbwmbYUvrmZKt0hGAUc75oSDVH2/2lCjkJRoqkpYCcfEXkdnHiKLACDq/3kS7VaPPGVq+BM8+ByWFteIMPnzEvQqyvfm/t9VDuJb0kJPjv0te26wA/AuhIoRyE5HhppCW6ysgybzEb5g6RIKauzOuwZOWAqsGHU87sQ3LHakr X-MS-Office365-Filtering-Correlation-Id: 9ce237eb-edf1-4f20-1cff-08d40d4f884c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:VI1PR0802MB2144; X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2144;31:hARywDZ6YRWcQv38AYjMYLURDVSwKzmbT+KQdEI7apPgm+kxC7/jBuKOPfhQQsKYFU9e7m7dP7mcu6EkwvgZBL/J9yFvuoXLQh+jtEFzoXzJylsdIqZ3jI+w4rCGqzV1AcZ3B5enpdHs27vAvrGXx4Y0TGXtOBwPHekbZnKd3bSRiCdfoLznNqHhpdDVV/3QoQSq+hsSzyaJAstV8IX7DHvXtOmPr5vRwk29uwHeU3VvhHOGH7UsEhw2vNcJAYV2;20:iBvnXc+kuOPaFjnxsM9h88tlyJlhVLnD//xEAR4jaP9FHHby2fciVtPDqyHXermBXrXbHSKzjK1bKJEal71XM1U5zEAzTRMzDmqLgFps5Z3jNKK24Jk8/JNRzCqRVwRHhwOp2YTfRFU29P4ioD7u1xna79qXpSvdB/hsp7zxlAM=;4:HvdputO9DBxFnxc3iOUmB0ZusVqZAy/sr9wvudYh8s68XYj6X/42jM0+m+BJpARhUsJDZzzrMf+Qlv+6tlrRPPmARKPhU/jwrq6dJXfVaPtrUY8pXxcX/xkcQLe4cVFqLPXgT8jeSc4Gt95TeHXk5ozpSQszc7Ofl/7iulfEhBGW47YpayiUxnY/flFxH8ofrZLAWERwhIQ0vzzfe2ueoaTFb0BJfAz/evhMBQMjdaE4RbyGVGFvdfWvYc1brxKhwFuE5ga+2+IZnDrWb9E9wxeiH6nbXtEZU2vFSg7laeWOTqiTukAfTjbydGDwcwqCfHjuTMVfA0a/e0G1QUvdtDGZqs9kTu2PHE8cJXO4jSQrpBcI+vmSbuaSESBdp7a9TYb/XZMRcCeB5h6iNxb8ekiI0D8NiKUmE/5wRz15zQVgx7NxlfWbcXnou49dZWvM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060326)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6061324)(6043046);SRVR:VI1PR0802MB2144;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0802MB2144; X-Forefront-PRVS: 012792EC17 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(7916002)(24454002)(377454003)(199003)(189002)(47776003)(76176999)(3846002)(64126003)(6116002)(42186005)(106356001)(101416001)(54356999)(87266999)(105586002)(50986999)(65816999)(81166006)(50466002)(66066001)(23676002)(33656002)(230700001)(81156014)(36756003)(7736002)(6666003)(2950100002)(8676002)(7846002)(4326007)(229853002)(5660300001)(59896002)(92566002)(305945005)(83506001)(80316001)(189998001)(68736007)(2906002)(77096005)(4001350100001)(86362001)(5001770100001)(97736004)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0802MB2144;H:[10.24.38.43];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA4MDJNQjIxNDQ7MjM6cjhlam9mWnA4VzQ2a0tLOSthTnhzMXYy?= =?utf-8?B?bDF5VXZsSVNwc3ZzSVJuQW5vSXNuaEpFNHFMZkdrbHZudVhBc2JVTm55OGg1?= =?utf-8?B?cUFCem81MTZzckdGcnFaZERIMmNzSGcrcHliRjFGd09FQ25BMjIzYmtVRlk4?= =?utf-8?B?V08rek03K0x1MjZsdm01Q3F1c2krRE1XdXVrNTB1N0Z4ek5qaUtKNHV2M2N3?= =?utf-8?B?T0VKRkZURjBLLzdoUmJZL0pSbHRqT1dubllkYU92eTUzcUpzNHQ2dWhSaTFy?= =?utf-8?B?UmdMN2E4eHBIRlViN2FIOFl2VkRQMTNXZWErRzFmTm9MeVZucDI4SnpyUlIv?= =?utf-8?B?R2tkWWRFTW53d0tVbHZQSEdMbC9Gc2toM1Y0Y1lIVGpkVlJpT2RMR09WZCtk?= =?utf-8?B?c2hoVFpWSlp5Wmh4T1pvaDloNzVHb1hPOUs0Mm5UOFliYnF6MHFId1F1a2hj?= =?utf-8?B?ZXJQdUZBWFgxTlRtSE1iNlN5TnFPcDRJNTNTRkJ5cTJEWjZYZ3pJaStSRFVo?= =?utf-8?B?LzIxOHN1UExWemlxRmw1cWJaNUJOK01UbmJ4cjczc1pUWFB2WG4yckZsNnFN?= =?utf-8?B?TU5obzBTR3pyRExGU0t0VVJhRTVIVElML2xFVVZBb2lYdHl4NStLYURSYnND?= =?utf-8?B?RTk0dWhCNWUvSWh3c21TT0E3R1UyaU15TW0rbmFjcGx2bEtlN2NFamVuamNP?= =?utf-8?B?Mk5lM0dYT1JzTUNwS00zaGJzY09zaEp5VlFYOG5YRE0yMmtuSDlNcDFoR1d0?= =?utf-8?B?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qLIO4lCA5izn6yHBPU4GjCKVbl0gh3e2+oEdvts3anUnqN31VUjo76p3VdJaIc5EjeL3ans7dGsm47zHdTCdu1SaE5G7M=;20:ri5arAIliKRlIh17GeKmEDNqUCBFn7s7ynOROxTNsF7q96sR8faUBsYWZ/xNHLwlwW8zaBQuc56bsj/kiElOqWpVAZ3pRoTUZDe65ezobhLZfyFNCaxS1uI5jUxrQb4UL0E6eAJMyBSTyoX0KNy4ois3K827empQn2N/vLfw3Bw= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2016 12:04:19.1887 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2144 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1156 Lines: 32 On 11/15/2016 05:15 AM, Andrei Vagin wrote: > The repair mode is used to get and restore sequence numbers and > data from queues. It used to checkpoint/restore connections. > > Currently the repair mode can be enabled for sockets in the established > and closed states, but for other states we have to dump the same socket > properties, so lets allow to enable repair mode for these sockets. > > The repair mode reveals nothing more for sockets in other states. > > Signed-off-by: Andrei Vagin Acked-by: Pavel Emelyanov > --- > net/ipv4/tcp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c > index 3251fe7..a2a3a8c 100644 > --- a/net/ipv4/tcp.c > +++ b/net/ipv4/tcp.c > @@ -2302,7 +2302,7 @@ EXPORT_SYMBOL(tcp_disconnect); > static inline bool tcp_can_repair_sock(const struct sock *sk) > { > return ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN) && > - ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_ESTABLISHED)); > + (sk->sk_state != TCP_LISTEN); > } > > static int tcp_repair_set_window(struct tcp_sock *tp, char __user *optbuf, int len) >