From patchwork Fri Dec 22 13:05:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Ricardo Leitner X-Patchwork-Id: 10140519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C9DEF601A1 for ; Tue, 2 Jan 2018 13:26:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0D8D203B9 for ; Tue, 2 Jan 2018 13:26:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5A14285B6; Tue, 2 Jan 2018 13:26:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from uhil19pa10.eemsg.mail.mil (uhil19pa10.eemsg.mail.mil [214.24.21.83]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49D2F284B9 for ; Tue, 2 Jan 2018 13:26:53 +0000 (UTC) Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.2]) by uhil19pa10.eemsg.mail.mil with ESMTP; 02 Jan 2018 13:26:51 +0000 X-IronPort-AV: E=Sophos;i="5.45,497,1508803200"; d="scan'208";a="7209248" IronPort-PHdr: =?us-ascii?q?9a23=3A7vGN9xc5Hdv4y52vGYbbsn/ulGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxcmyYxWN2/xhgRfzUJnB7Loc0qyK6/mmBjVLvcfJmUtBWaQEbwUCh8?= =?us-ascii?q?QSkl5oK+++Imq/EsTXaTcnFt9J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4//u?= =?us-ascii?q?jXkkmV4SZKWmxpwXaG2+Hvt6PUqZemHhgssBEGgWvgo+S/bmiFuZUTFJfXqyUK?= =?us-ascii?q?U85i8jBIK8EYjDXpytgKCG3CqjHJ1WYWZGBUqQEXfobYqEXewBaCCVIs9nlzwL?= =?us-ascii?q?T6OhS5M/2hG0rw/20b1nLvDb+icAr5LsyMB15/HPlRE17TF0Dcad3HuRQGF3hW?= =?us-ascii?q?MIQDk23KFhoUFmxFeD1bV4gvNDGtxO4fNJTho6OYTbz+xgBND4QhjBccuRSFa6?= =?us-ascii?q?XtWmBik8T9www98KZkZyBc+igwvN3yW0HrAVkKaLC4Ys8qLG2HjxJdhyxGra1K?= =?us-ascii?q?U7iFkmWMRPP3W8hqFj7wjTG5LJk0KBmqm3aasc2SnN9GGfzWaTp0xYThB/Ub/E?= =?us-ascii?q?XXEeYUvWq8715kXcQL+yEb4nKBdOydaeKqtWbd3klUhJROv5N9TEeG++h2CwBR?= =?us-ascii?q?OUybyWd4rqZ38R3CPDB0gYiwoT52qJNRAiBie9pGLTFDxvFFPoY0Pq6uR+rXe7?= =?us-ascii?q?QlY1zwGMdUFh0aC6+gQWhfydVfMcwKgIuCE/pDVoBFy9xc7ZC8Kcpwp9e6VRed?= =?us-ascii?q?094E1d2mLfqwN9P4egIrtnhl4GcgR7plju1htsColalsgqtnwqxhJoKa2EyFNB?= =?us-ascii?q?ay+Y3ZfoN73UMGby/xeva7PN11HdytmW+aAP6Okip1XkpgGpGVIo82973NlNz3?= =?us-ascii?q?uc+pLKARIIXp3sSEY39gZ1p6vBbyYn+4zU0GdgMa6usj/Nw9gpHvcqyg68f9dD?= =?us-ascii?q?N6OJDBXyHNAHCMW1J+wqnleoYggCPO9M6K4+J9mmeOee2K63IOZgmyqrjX9J4I?= =?us-ascii?q?Bn1UKM7DZ8R/XT35YDxPGZ0A6HWC36jFu7tMD4h5xEbykIHmWj0SjkGJJRZqpq?= =?us-ascii?q?cIcFE2iuJ9G3yctkh572QHNY6kCsB0kd18+0fBqedVv93Rdf1U4Pu3yohTO4zy?= =?us-ascii?q?BokzEutqef2i3Ow+DmdBUZIW5GX3Ntgkn2IYizldwaW1Kobwcxnhu/+Un637Rb?= =?us-ascii?q?pLh4L2TLX0dIfjT5L31lUquqrLaNf85P6JQusSVYS+m8ZVGaSrjnrBsA1CPvBW?= =?us-ascii?q?xexCo0dzuyoJX2gwR6iH6BLHZ0tHfZfcBwxQzD5NDFXv5ewD4GRCh+iTnKCVmx?= =?us-ascii?q?JMKp/c2Vl5fFs+CxS3mhWodVcSb10YOKrDG76nFyAR2jg/CzncXqERI90S//09?= =?us-ascii?q?llSz/Iowr7YojlzKm6Kv9ncVVzBFPm7Mp6AI5+mJMqhJ4MwXgamomV/X0fnGfw?= =?us-ascii?q?L9pb37n+YWEORTEVxd7V+w7l11N/Ln6TwIL5THqdyNN7Z9amemMWxj4978dSBa?= =?us-ascii?q?eM9rNEgC91rUSgrQ3LZ/h9gikSyeE15X4HmOEGphAtzj6HDrAJGklYIDbsmAiW?= =?us-ascii?q?4NCwq6VXfmmvfqaq2Ep4g9+hEKmIohtAV3bhZpciAShw491hMFLKzXL+8Z/keN?= =?us-ascii?q?/NYtITrBGUlQnPj/RNIpIrivUKnTZnOX76vXA90+40lwFu3ZWhsYebKmVt4KK4?= =?us-ascii?q?DgdWNjLvYcMf4DbtjbxRnsyOxYCgAo1hGikXXJvvVf+oHigdtfL7NwaJFT0xsX?= =?us-ascii?q?mbFqTCEg+Y8kdptWrPE4qsN3GVOnYW0cliSAOaJExFjwAeRC86kYIhFgC22Mzh?= =?us-ascii?q?d1905jUL6V78rhtD1P5oNwXlXWjFvwqobCk7SISELBVK9A5C/1naPdaY7u1tAy?= =?us-ascii?q?FS5oehoxCVKmyHewRICnkEWlaeC1HtJLWu4MPP8+yfBuu+NPbBe6mBqelEW/eP?= =?us-ascii?q?35Kv3ZNs/yyQOcWXInliE/o711JNXXBjBcvWhi4PRDYRlyLRaM6bvwyx9Tdroc?= =?us-ascii?q?C66vjrXxjv5YSXAbtILdpv4wy2gbuEN+OIgiZ5MyxX1osUxXLTxrgf3UQSizpy?= =?us-ascii?q?dzmjELQAszTCTKTMla9WFREbbzl/NMxS76IzxgNNI9LUisvp1r5kif44E09FWk?= =?us-ascii?q?L6lc63Y8wKIn29NFTcCUaKKruJOyPEz9vwYaOmRr1alP9UuAGouTaHD0/jOSyO?= =?us-ascii?q?mCLyWByoNeFMjTqbPABFuI2naRZiF3TsQMj9ahKlNN93jDs2waA7h37RKWEdMS?= =?us-ascii?q?J8c15WrrGK4yJXmOl/G3dG7npjN+WEnDyZ7+bAIJYMrfRrGjh0l/5d4Hki0LRV?= =?us-ascii?q?7S5ERPtzmCbJs9FhvUqpkuiVxTphShZOrSxLhI2Tt0V4JarZ7oVAWWrD/B8V92?= =?us-ascii?q?qQBA4Fp8V7BdD0vKBQ0sbAlKT2KDhY8tLU+dATB8/bKc6dN3ohKxXpEibODAQZ?= =?us-ascii?q?VT6rKX3fh0tFnfGO8X2Vq4I2qoLrmJsPVLBbUkc6FukdCkt7H9wPO4t4XjQhkb?= =?us-ascii?q?GHlsEI/ma+oAPXRMpEopDNTuiSDun3KDaFkblEYAMFwbD4LIQXKIL2wElial50?= =?us-ascii?q?nITEBUXQQcxNoi1mbg8xvkpB6n5+QXMv20j9cAOi/GcTFeKonh4xkgZ+Z/oi+y?= =?us-ascii?q?3o41osJVrKozAwkFUrltXjmjCRcz/xIL22XY5IFyr+r1IxPY/jQwZpcQ2ymlRp?= =?us-ascii?q?NC3aSLJKkbRvb3prhxPcuZZUAvFcTLdEbwIXxfGZf/Uoy0pTqyW9yU9B++TFFY?= =?us-ascii?q?NolBE2fp60s3JAxwVjYcYoKqzXIqpJyEVfibyKvi+pze0+2hERJ1wK8G+Ify4I?= =?us-ascii?q?okMIPKE8JyW05uxs9RCCmzxbdWcRTfUqvPNq+V4mO+mb1S3gyaRDKke/NuyEMa?= =?us-ascii?q?yWp3XAldSJQlMs1kIEjU9F8qZ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g2qXeW1lJDzXQOS9MD/mpU+dFifRnaphqQKrr5MEf?= =?us-ascii?q?JciiX8xjVeFIf1h/KTs9a29GRXtllHEJtu4hzEGaVfOI57ORf5lsSwWEh8BzX/?= =?us-ascii?q?d9vQdhUzueqa3OEM7PtiN0Hmf48UPgoEy67m6XpSVgZuSaD2sUyfXe8KYNtmVe?= =?us-ascii?q?7LrnFS6YJ7MaMPO0KdpJPypDdStF82GBMpaKM3rjFCdEnBggNVW6jwuLMbhAoT?= =?us-ascii?q?S9h5tlFQGW6qPmIx+SbHX7xPjKaNEPwV7imTTqsWXkVnNiN+RB2014tqe7uthv?= =?us-ascii?q?1HqWRGniV8oPc2yTBmQgWzuTH0raIXxT0g4K24tCkGuXFdTOWekyfJCU1EzPQO?= =?us-ascii?q?jKccF2jt5Ee5YHkCcIvy+qdoKd7n9Yk77HQ1eQ8jcDEeXeS8FyHwiLuFApCOsN?= =?us-ascii?q?JZnxONpMTOYqOwLScMMrQx0xTjSGZh0gLGhhZn7HMLQim87N8jPIi9PMclximr?= =?us-ascii?q?GWjcb1sM4LlGsMj2tV4NUuQ2b0ltwGN93cibXicNXtDAG34pjgg4bmVJaIlM5g?= =?us-ascii?q?EcF6k0mTuIpa1G/gYIYDfIDISq5JTfkd3P2XknQtdg3njWqbGdhpM2zH1lnMt5?= =?us-ascii?q?7jaJuHQWbePYScFtAn/31odR0uH+YvKtsuccSIR41LuhSvgCMtK4+Wu33pVqVV?= =?us-ascii?q?WpxrMEH1q2KOUD3KvUUz+5SW2EXuSGa2aMkCg9Mk7z/RmnMEY6acZLr084N+vN?= =?us-ascii?q?mIRclwn/Xr9uQSWQv1DbxnQ5MewGbwI2pJunewsSQe8ff+icP+kuz+EgB1YXan?= =?us-ascii?q?/JHDd2C/WovlK3m4h7IXpg613gYevx6gDmLMeSGh4cHI7dqp5+5+e3RnqFOXB6?= =?us-ascii?q?1x1yIEh0+PvDF1QrqOBTbYydnd7OiNRnyeQFbetiMTUhut4PnYJu8Y2U0M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8cgX9giH8BAQE?= Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 02 Jan 2018 13:26:46 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w02DQjhH013131; Tue, 2 Jan 2018 08:26:46 -0500 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id vBMGSsrA137513 for ; Fri, 22 Dec 2017 11:28:54 -0500 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id vBMGSo5K010397; Fri, 22 Dec 2017 11:28:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A1DNAwA2MT1a/ysaGNZdHQEBBQELAYJsJ?= =?us-ascii?q?ikDgVonjip0jh6BWieXKBSCAQoFhTYChE4/GAEBAQEBAQEBAWuFTAYnGQEbHQE?= =?us-ascii?q?DDAYQChgZIQIRAQUBHAcSiFyBOQEDFQECmEVAjX0YBQEcgwsFg1wKGScNWYI1A?= =?us-ascii?q?QEBAQEBBAEBAQEcAgYSg3qBNlyBVoFpNYVkRYEpgQSFPQEEoww9kDGEfowHh3O?= =?us-ascii?q?NX4hzBgIJCBQkgRcfOYFPMhojUjKBd4JFDxyBf2CKNQEBAQ?= X-IPAS-Result: =?us-ascii?q?A1DNAwA2MT1a/ysaGNZdHQEBBQELAYJsJikDgVonjip0jh6?= =?us-ascii?q?BWieXKBSCAQoFhTYChE4/GAEBAQEBAQEBAWuFTAYnGQEbHQEDDAYQChgZIQIRA?= =?us-ascii?q?QUBHAcSiFyBOQEDFQECmEVAjX0YBQEcgwsFg1wKGScNWYI1AQEBAQEBBAEBAQE?= =?us-ascii?q?cAgYSg3qBNlyBVoFpNYVkRYEpgQSFPQEEoww9kDGEfowHh3ONX4hzBgIJCBQkg?= =?us-ascii?q?RcfOYFPMhojUjKBd4JFDxyBf2CKNQEBAQ?= X-IronPort-AV: E=Sophos;i="5.45,441,1508817600"; d="scan'208";a="158351" Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.35]) by goalie.tycho.ncsc.mil with ESMTP; 22 Dec 2017 11:28:49 -0500 IronPort-PHdr: =?us-ascii?q?9a23=3AsaBcIBJH6+IcJSI/3NmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgXKv37rarrMEGX3/hxlliBBdydt6odzbKO+4nbGkU4qa6bt34DdJEeHzQksu?= =?us-ascii?q?4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1?= =?us-ascii?q?Ov71GonPhMiryuy+4ZLebxlViDanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPde?= =?us-ascii?q?RWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbY?= =?us-ascii?q?UwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0yRD+s7bpkSAXwhS?= =?us-ascii?q?kaNzA37m/ZhM93gq1ZrhKsvABzz5LObY2JLvdyYr/RcNUHTmRBRMZRUClBD5u7?= =?us-ascii?q?YYQVFeoOIfhXr436p1ATsRW+BBWjC/n1yjBVgX/9wKs03PogEQHa2gwvAcgOu2?= =?us-ascii?q?nTodXwLqgSS/y6w7fMzTXEdf9W3Sny6InUchAnv/6MR6l9ccXUyUY1FgPFik+c?= =?us-ascii?q?ppDiPzOQz+kAtXWQ4eRnVeKqkWEnqgdxryCzycg2konGnJkaylTa+iljxoY6O8?= =?us-ascii?q?G4RUhmatCnCJtdrz+WO5Z5T884XW1ltzw2xqMHtJKhcyUHxowrywDDZ/CbboSF?= =?us-ascii?q?5w/vWPiSLDp3gX9ldq6ziwu8/EWl0OLxWce03VJPoydFjNbDqGwB2hnP5cWHRP?= =?us-ascii?q?t98EKs2TiR2A3d5exJJFs7laTVJpMuxLM7i4Advl7ZHiDsnUX7lK+WeVsg+uiv?= =?us-ascii?q?8+nobKjoqJ+BOoNpjgzwKLgjltCwDOgiLAcBQW2b+f+z1LH5+E32WrRKjvksnq?= =?us-ascii?q?ncsZDaIdwXpq+/AwBLzoYu8wizAyqp3dgCg3UKI0hJdAyGgoTzNFzDLuj0DfKl?= =?us-ascii?q?jFStlDdryerGPrrkApjVK3jMiq3hcqpj5E5Yzwo/19Rf6IxVCrEdJvL8RFXxuc?= =?us-ascii?q?fXDh88KQO0wuLnBM9h2YMZXGKDGrWZP7/KsV+U+uIvJPGBZJQItzbmMPUl+/7v?= =?us-ascii?q?gmM5mV8aZ6Wp24AXZ2qiEvRpJEWZf2Lmgs0dHmcSogo+UOvqhUWZUTFNY3ayXq?= =?us-ascii?q?Q85iw0CY+9EYfCRpyigLyG3CuhGJ1WfXpJBkqDEXfvaYXXE8sLPTmfJs5njyws?= =?us-ascii?q?SamqS4hn0wqn8gD91f4vKOfI9iAGnYzs2cIz5ODJkxw2sztuAIDV12CLUnExhW?= =?us-ascii?q?gUXxco061l509w0FGO1e5/mfMcXdhS4e5ZFxw3PoPGzvBrTtX1Vh/Fc/+XR1u8?= =?us-ascii?q?BNarGzc8SpQ22dBdTVx6HoCHhwrI0i6tS4UUnLWRCJt81q/dw378PY4pzn/c36?= =?us-ascii?q?QliB8iT8pTM2C8rqF6/gnXQYXOlhPKxO6Raa0A0XuVpy+4xm2UsRQAXQ=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BXAgA2MT1a/ysaGNZdHQEBBQELAYJsJ?= =?us-ascii?q?imBXSeOKnSPeCeXKBSCAQoFhTYChQ0YAQEBAQEBAQEBAWoogjgigkoGJxkBGx0?= =?us-ascii?q?BAwwGEAoYGSECEQEFARwHEohcgTkBAxUBAphFQI19GAUBHIMLBYNcChknDVmCN?= =?us-ascii?q?QEBAQEBAQQBAQEBHAIGEoN6gTaCMoFpNYVkRYEpgQSFPQWjDD2QMYR+jAeHc41?= =?us-ascii?q?fiHMGAgkIFCSBFx85gU8yGiNSMoF3gkUPHIF/YIo1AQEB?= X-IPAS-Result: =?us-ascii?q?A0BXAgA2MT1a/ysaGNZdHQEBBQELAYJsJimBXSeOKnSPeCe?= =?us-ascii?q?XKBSCAQoFhTYChQ0YAQEBAQEBAQEBAWoogjgigkoGJxkBGx0BAwwGEAoYGSECE?= =?us-ascii?q?QEFARwHEohcgTkBAxUBAphFQI19GAUBHIMLBYNcChknDVmCNQEBAQEBAQQBAQE?= =?us-ascii?q?BHAIGEoN6gTaCMoFpNYVkRYEpgQSFPQWjDD2QMYR+jAeHc41fiHMGAgkIFCSBF?= =?us-ascii?q?x85gU8yGiNSMoF3gkUPHIF/YIo1AQEB?= X-IronPort-AV: E=Sophos;i="5.45,441,1508803200"; d="scan'208";a="7440412" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from uphb3cpa04.eemsg.mail.mil (HELO USFB19PA04.eemsg.mail.mil) ([214.24.26.43]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 22 Dec 2017 16:28:43 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;ad8c6f50-6a48-4a40-bc84-702b317f6968 Authentication-Results: USFB19PA17.eemsg.mail.mil; dkim=pass (signature verified) header.i=@gmail.com X-EEMSG-check-008: 125389272|USFB19PA17_EEMSG_MP13.csd.disa.mil X-EEMSG-SBRS: 2.7 X-EEMSG-ORIG-IP: 209.85.220.196 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CbAgAxAj1af8TcVdFdHQEBBQELAYJsJoItnTyBWieXKBSCAQqFOwKETkAXAQEBAQEBAQEBEwEBCQsLCCYxhSQDAycZARsdAQMMBhAKGBkhAhEBBQEcBxKIXIE5AQMVAZhtQI19GAUBHIMLBYNfChknDVmCNQEBAQEBAQQBAQEBHAIGCQEIg3mBNlyBVoFpNYVkRYEpgQSFPQWjDD2QMYR+jAeHc41fiHMGAgkIFCSBFyABggYyGiNRMoF3gkUPHIF/YIoAAQEB X-IPAS-Result: A0CbAgAxAj1af8TcVdFdHQEBBQELAYJsJoItnTyBWieXKBSCAQqFOwKETkAXAQEBAQEBAQEBEwEBCQsLCCYxhSQDAycZARsdAQMMBhAKGBkhAhEBBQEcBxKIXIE5AQMVAZhtQI19GAUBHIMLBYNfChknDVmCNQEBAQEBAQQBAQEBHAIGCQEIg3mBNlyBVoFpNYVkRYEpgQSFPQWjDD2QMYR+jAeHc41fiHMGAgkIFCSBFyABggYyGiNRMoF3gkUPHIF/YIoAAQEB Received: from mail-qk0-f196.google.com ([209.85.220.196]) by USFB19PA17.eemsg.mail.mil with ESMTP; 22 Dec 2017 13:05:44 +0000 Received: by mail-qk0-f196.google.com with SMTP id 143so19979588qki.2; Fri, 22 Dec 2017 05:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MAHkGc9ucsEoRXdXws/FZiUx1bf8jGdO1QNOJDV+sQ0=; b=FRIRRTCXSq0rdXVUdpB2AKzF41u9cRO5YH+fwFByWvoUdh+gwOvqSdXxGu5laAfQrY MXd+eLYPMyhFomM7j+dURCNZlT+anm1JEReuokg+juyqk//Omdh1sG02JMZIYo839aBT 0nzra6UDtpY6Toc7Gd7ZFxxFUiMhjUCEZ8x7wvEg0sEtrKWIFKQj+kptyu6Iv7PN7q8j HkaPACgPsSdOQKfiv+juXdsKPEEKq2uPQcu3QTOqsBEGfnlyB7VV5N7vQUQBo9hczKCe Sx/lvm3FoY7ANDmVeLoJ4ITTT72VmFpGEUwIqSycT9GzWWhi9sGyG+y0YaBroHQOaY+s z3Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MAHkGc9ucsEoRXdXws/FZiUx1bf8jGdO1QNOJDV+sQ0=; b=LGHkR/+uJQRo1q2haZvI3cUftRQjgeLNmxRVQeOzut52j+0Y5q5dGKv5qhyoFXSQRK 6Rh7AiGwmKLlFZkt64ZFWcSewv6/18U/wbLAYpv5btuyAvuF65jN9QeDuTYA0J0s2Hut AZ8RLlXuvFzqpSdXLY7eSIRg77uRc87/jQWrLV1lagenTPe4x92MEYAk3isdW3UZZhZ4 xKVy3tlXiBHGPqkoD5gTvFpC2/pf2cfCQRJkZUdWv3SOUDTAp81MOt+o5w7HmgdxKSUm JvXzcnGfpJEdWKtrO9eTSijfbyRbYokV2B8ZSKVD8ifA0tTlPnRPfyLf3tH9DqNkpbg5 XCLQ== X-Gm-Message-State: AKGB3mLoWYAuIRM1GGOiQaonvgYZn/zXBJELH1oH46mhzzZ0wgqpD7AV zTi9r17+JnS0W4mfYyg2dH3kHWNt X-Google-Smtp-Source: ACJfBotto9lDHoIvqpcRbVfp24B4PY6Hu/i4HDvWY+j5rD8YCDvsWpVyEJxElYO3HzH0s0Bm1ZPR/w== X-Received: by 10.55.96.134 with SMTP id u128mr18035227qkb.99.1513947939449; Fri, 22 Dec 2017 05:05:39 -0800 (PST) Received: from localhost.localdomain.com ([2001:1284:f013:a4f9:5ee0:c5ff:fe34:bf34]) by smtp.gmail.com with ESMTPSA id v73sm3852525qkg.34.2017.12.22.05.05.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Dec 2017 05:05:38 -0800 (PST) From: Marcelo Ricardo Leitner To: selinux@tycho.nsa.gov, netdev@vger.kernel.org, linux-sctp@vger.kernel.org, linux-security-module@vger.kernel.org Date: Fri, 22 Dec 2017 11:05:17 -0200 Message-Id: <10ed2bd9a3f6d7e56bd5e946c671a744251b23ae.1513940757.git.marcelo.leitner@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: X-Mailman-Approved-At: Tue, 02 Jan 2018 08:24:19 -0500 Subject: [PATCH v3 2/4] sctp: Add ip option support X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Cc: marcelo.leitner@gmail.com, nhorman@tuxdriver.com, vyasevich@gmail.com, sds@tycho.nsa.gov Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP From: Richard Haines Add ip option support to allow LSM security modules to utilise CIPSO/IPv4 and CALIPSO/IPv6 services. Signed-off-by: Richard Haines Acked-by: Marcelo Ricardo Leitner --- include/net/sctp/sctp.h | 4 +++- include/net/sctp/structs.h | 2 ++ net/sctp/chunk.c | 13 ++++++++----- net/sctp/ipv6.c | 42 +++++++++++++++++++++++++++++++++++------- net/sctp/output.c | 5 ++++- net/sctp/protocol.c | 36 ++++++++++++++++++++++++++++++++++++ net/sctp/socket.c | 9 +++++++-- 7 files changed, 95 insertions(+), 16 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index d7d8cba014697602832fe20e414b632104c9f239..1b2f40a3a87875c10647fc768372cabea61fe3b8 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -436,9 +436,11 @@ static inline int sctp_list_single_entry(struct list_head *head) static inline int sctp_frag_point(const struct sctp_association *asoc, int pmtu) { struct sctp_sock *sp = sctp_sk(asoc->base.sk); + struct sctp_af *af = sp->pf->af; int frag = pmtu; - frag -= sp->pf->af->net_header_len; + frag -= af->ip_options_len(asoc->base.sk); + frag -= af->net_header_len; frag -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk); if (asoc->user_frag) diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 0477945de1a3cf5c27348e99d9a30e02c491d1de..9942ed5159448c924f0f018abeea9bab93fc3437 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -461,6 +461,7 @@ struct sctp_af { void (*ecn_capable)(struct sock *sk); __u16 net_header_len; int sockaddr_len; + int (*ip_options_len)(struct sock *sk); sa_family_t sa_family; struct list_head list; }; @@ -485,6 +486,7 @@ struct sctp_pf { int (*addr_to_user)(struct sctp_sock *sk, union sctp_addr *addr); void (*to_sk_saddr)(union sctp_addr *, struct sock *sk); void (*to_sk_daddr)(union sctp_addr *, struct sock *sk); + void (*copy_ip_options)(struct sock *sk, struct sock *newsk); struct sctp_af *af; }; diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index 3afac275ee82dbec825dd71378dffe69a53718a7..9d130f447f636c034e4232a9e6426ffce07007ca 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c @@ -153,7 +153,6 @@ static void sctp_datamsg_assign(struct sctp_datamsg *msg, struct sctp_chunk *chu chunk->msg = msg; } - /* A data chunk can have a maximum payload of (2^16 - 20). Break * down any such message into smaller chunks. Opportunistically, fragment * the chunks down to the current MTU constraints. We may get refragmented @@ -170,6 +169,8 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, struct list_head *pos, *temp; struct sctp_chunk *chunk; struct sctp_datamsg *msg; + struct sctp_sock *sp; + struct sctp_af *af; int err; msg = sctp_datamsg_new(GFP_KERNEL); @@ -188,9 +189,12 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, /* This is the biggest possible DATA chunk that can fit into * the packet */ - max_data = asoc->pathmtu - - sctp_sk(asoc->base.sk)->pf->af->net_header_len - - sizeof(struct sctphdr) - sizeof(struct sctp_data_chunk); + sp = sctp_sk(asoc->base.sk); + af = sp->pf->af; + max_data = asoc->pathmtu - af->net_header_len - + sizeof(struct sctphdr) - sizeof(struct sctp_data_chunk) - + af->ip_options_len(asoc->base.sk); + max_data = SCTP_TRUNC4(max_data); /* If the the peer requested that we authenticate DATA chunks @@ -210,7 +214,6 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, /* Set first_len and then account for possible bundles on first frag */ first_len = max_data; - /* Check to see if we have a pending SACK and try to let it be bundled * with this message. Do this if we don't have any data queued already. * To check that, look at out_qlen and retransmit list. diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 51c4887695909d171285b98ce1be779a3adedbab..3baede99a06d17b3f7a0826df4874c9c5af77617 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -423,6 +423,38 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist, rcu_read_unlock(); } +/* Copy over any ip options */ +static void sctp_v6_copy_ip_options(struct sock *sk, struct sock *newsk) +{ + struct ipv6_pinfo *newnp, *np = inet6_sk(sk); + struct ipv6_txoptions *opt; + + newnp = inet6_sk(newsk); + + rcu_read_lock(); + opt = rcu_dereference(np->opt); + if (opt) + opt = ipv6_dup_options(newsk, opt); + RCU_INIT_POINTER(newnp->opt, opt); + rcu_read_unlock(); +} + +/* Account for the IP options */ +static int sctp_v6_ip_options_len(struct sock *sk) +{ + struct ipv6_pinfo *np = inet6_sk(sk); + struct ipv6_txoptions *opt; + int len = 0; + + rcu_read_lock(); + opt = rcu_dereference(np->opt); + if (opt) + len = opt->opt_flen + opt->opt_nflen; + + rcu_read_unlock(); + return len; +} + /* Initialize a sockaddr_storage from in incoming skb. */ static void sctp_v6_from_skb(union sctp_addr *addr, struct sk_buff *skb, int is_saddr) @@ -662,7 +694,6 @@ static struct sock *sctp_v6_create_accept_sk(struct sock *sk, struct sock *newsk; struct ipv6_pinfo *newnp, *np = inet6_sk(sk); struct sctp6_sock *newsctp6sk; - struct ipv6_txoptions *opt; newsk = sk_alloc(sock_net(sk), PF_INET6, GFP_KERNEL, sk->sk_prot, kern); if (!newsk) @@ -685,12 +716,7 @@ static struct sock *sctp_v6_create_accept_sk(struct sock *sk, newnp->ipv6_ac_list = NULL; newnp->ipv6_fl_list = NULL; - rcu_read_lock(); - opt = rcu_dereference(np->opt); - if (opt) - opt = ipv6_dup_options(newsk, opt); - RCU_INIT_POINTER(newnp->opt, opt); - rcu_read_unlock(); + sctp_v6_copy_ip_options(sk, newsk); /* Initialize sk's sport, dport, rcv_saddr and daddr for getsockname() * and getpeername(). @@ -1033,6 +1059,7 @@ static struct sctp_af sctp_af_inet6 = { .ecn_capable = sctp_v6_ecn_capable, .net_header_len = sizeof(struct ipv6hdr), .sockaddr_len = sizeof(struct sockaddr_in6), + .ip_options_len = sctp_v6_ip_options_len, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_ipv6_setsockopt, .compat_getsockopt = compat_ipv6_getsockopt, @@ -1051,6 +1078,7 @@ static struct sctp_pf sctp_pf_inet6 = { .addr_to_user = sctp_v6_addr_to_user, .to_sk_saddr = sctp_v6_to_sk_saddr, .to_sk_daddr = sctp_v6_to_sk_daddr, + .copy_ip_options = sctp_v6_copy_ip_options, .af = &sctp_af_inet6, }; diff --git a/net/sctp/output.c b/net/sctp/output.c index 4a865cd06d76cd5b2aa417de618da3203f7b53e4..2b39c704e1e5b99597a2cfdd35f75c78288d943b 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -151,7 +151,10 @@ void sctp_packet_init(struct sctp_packet *packet, INIT_LIST_HEAD(&packet->chunk_list); if (asoc) { struct sctp_sock *sp = sctp_sk(asoc->base.sk); - overhead = sp->pf->af->net_header_len; + struct sctp_af *af = sp->pf->af; + + overhead = af->net_header_len + + af->ip_options_len(asoc->base.sk); } else { overhead = sizeof(struct ipv6hdr); } diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index fcd80feb293f61bd734988f037aa8f210880fb1d..cde051a2ed84b4085447b30af5809e2507a69277 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -237,6 +237,38 @@ int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp, return error; } +/* Copy over any ip options */ +static void sctp_v4_copy_ip_options(struct sock *sk, struct sock *newsk) +{ + struct inet_sock *newinet, *inet = inet_sk(sk); + struct ip_options_rcu *inet_opt, *newopt = NULL; + + newinet = inet_sk(newsk); + + rcu_read_lock(); + inet_opt = rcu_dereference(inet->inet_opt); + if (inet_opt) { + newopt = sock_kmalloc(newsk, sizeof(*inet_opt) + + inet_opt->opt.optlen, GFP_ATOMIC); + if (newopt) + memcpy(newopt, inet_opt, sizeof(*inet_opt) + + inet_opt->opt.optlen); + } + RCU_INIT_POINTER(newinet->inet_opt, newopt); + rcu_read_unlock(); +} + +/* Account for the IP options */ +static int sctp_v4_ip_options_len(struct sock *sk) +{ + struct inet_sock *inet = inet_sk(sk); + + if (inet->inet_opt) + return inet->inet_opt->opt.optlen; + else + return 0; +} + /* Initialize a sctp_addr from in incoming skb. */ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb, int is_saddr) @@ -590,6 +622,8 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk, sctp_copy_sock(newsk, sk, asoc); sock_reset_flag(newsk, SOCK_ZAPPED); + sctp_v4_copy_ip_options(sk, newsk); + newinet = inet_sk(newsk); newinet->inet_daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr; @@ -1008,6 +1042,7 @@ static struct sctp_pf sctp_pf_inet = { .addr_to_user = sctp_v4_addr_to_user, .to_sk_saddr = sctp_v4_to_sk_saddr, .to_sk_daddr = sctp_v4_to_sk_daddr, + .copy_ip_options = sctp_v4_copy_ip_options, .af = &sctp_af_inet }; @@ -1092,6 +1127,7 @@ static struct sctp_af sctp_af_inet = { .ecn_capable = sctp_v4_ecn_capable, .net_header_len = sizeof(struct iphdr), .sockaddr_len = sizeof(struct sockaddr_in), + .ip_options_len = sctp_v4_ip_options_len, #ifdef CONFIG_COMPAT .compat_setsockopt = compat_ip_setsockopt, .compat_getsockopt = compat_ip_getsockopt, diff --git a/net/sctp/socket.c b/net/sctp/socket.c index d4730ada7f3233367be7a0e3bb10e286a25602c8..274082cf49a8380fda06866c631cdc22dc4f157b 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -3125,8 +3125,11 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned if (asoc) { if (val == 0) { + struct sctp_af *af = sp->pf->af; + val = asoc->pathmtu; - val -= sp->pf->af->net_header_len; + val -= af->ip_options_len(asoc->base.sk); + val -= af->net_header_len; val -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk); } @@ -4929,9 +4932,11 @@ int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) sctp_copy_sock(sock->sk, sk, asoc); /* Make peeled-off sockets more like 1-1 accepted sockets. - * Set the daddr and initialize id to something more random + * Set the daddr and initialize id to something more random and also + * copy over any ip options. */ sp->pf->to_sk_daddr(&asoc->peer.primary_addr, sk); + sp->pf->copy_ip_options(sk, sock->sk); /* Populate the fields of the newsk from the oldsk and migrate the * asoc to the newsk.