Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752681AbdLEQeH (ORCPT ); Tue, 5 Dec 2017 11:34:07 -0500 Received: from mail-he1eur01on0132.outbound.protection.outlook.com ([104.47.0.132]:36202 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751325AbdLEQeD (ORCPT ); Tue, 5 Dec 2017 11:34:03 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Subject: Re: [PATCH v4 5/5] kasan: added functions for unpoisoning stack variables To: Paul Lawrence , Alexander Potapenko , Dmitry Vyukov , Masahiro Yamada Cc: linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kbuild@vger.kernel.org, Matthias Kaehlcke , Michael Davidson , Greg Hackmann References: <20171204191735.132544-1-paullawrence@google.com> <20171204191735.132544-6-paullawrence@google.com> From: Andrey Ryabinin Message-ID: Date: Tue, 5 Dec 2017 19:37:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171204191735.132544-6-paullawrence@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1P189CA0006.EURP189.PROD.OUTLOOK.COM (2603:10a6:7:53::19) To DB6PR08MB2824.eurprd08.prod.outlook.com (2603:10a6:6:1d::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b829e1af-7b9a-4068-7395-08d53bfdfd34 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603286);SRVR:DB6PR08MB2824; X-Microsoft-Exchange-Diagnostics: 1;DB6PR08MB2824;3:jHbOfU7F9YUYD8lIbLh+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CCsqvK2sLpcJyTqT3Aos49cs92+uKmRBSoa8Qjc+D6yXlCwug3bODcQs6QnxrDjBdWgitno7Yb1s4YWan8VOvHyJQspFHOc50fDOdzKoqpU88mDDtrNpQu+/O551WotB1xxkvrJvj4qbLW5aobD5T4jzPnl+rlQG9gpAnk15eSqAnByA5j4SVNJvkqNCo/jJOPsSwv4JD7/8kdYBSZToTlDFK/F2pcAfbYuIdi6KsX1oDplmQLtM=;4:rP7W2qufRUYDbypMWvC8IX7haD5daC0zqwavzRtzp3kHvVMd6UtfAzIxCyMgl9ZDBWY08kJl1R8nj6TWDSXAKYrsOm9+IL4BjEllB0Uh0ReX2yeaFcxAX3rj2bj6/1dYsn0eas44DllSVyOb5JpVz0C9I3zYJRe0nQbatNgL2GIpM0EFgd8fPCrhhO3lRoPXaR+L+6b8M1PqGLK5C0gOZgCsTR4sY8Z+akzdrNjCV/I7Rli8E33QeXzWDYThjXtJe7on3ywdpegyHzRhZssHBlO73WyNNL/cURvlh+YM6S/mioqpPWp7qI2v4VgAftFxQ/Qp7iZQ/X9rKD/Jdg091J9WowU6b+Vp2bXDO9eum8E= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(211936372134217)(153496737603132); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(5005006)(8121501046)(10201501046)(3231022)(920507027)(3002001)(93006095)(93001095)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DB6PR08MB2824;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DB6PR08MB2824; X-Forefront-PRVS: 0512CC5201 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(979002)(6049001)(376002)(346002)(366004)(24454002)(97736004)(2950100002)(50466002)(7736002)(6246003)(4326008)(305945005)(6666003)(34040400001)(81166006)(33646002)(8676002)(47776003)(229853002)(16526018)(81156014)(65826007)(25786009)(230700001)(16576012)(76176011)(77096006)(6486002)(316002)(54906003)(53936002)(52146003)(23676004)(2486003)(58126008)(86362001)(64126003)(5660300001)(65956001)(110136005)(66066001)(31696002)(65806001)(53546010)(55236003)(106356001)(6116002)(3846002)(105586002)(8936002)(31686004)(83506002)(68736007)(101416001)(52116002)(478600001)(36756003)(7416002)(2906002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB6PR08MB2824;H:[172.16.25.12];FPR:;SPF:None;PTR:InfoNoRecords;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjA4TUIyODI0OzIzOk8vZEswbEFyL0Y5cEY0VjhMeVc4cjRoWG95?= =?utf-8?B?aHd1cXFPUmpSM0JNLzJLdWhSbUpwcG1rbzlha1F3bXZabVNrZ2FGUEFkUnRt?= =?utf-8?B?Q1VoYmhlN2c4T0RHdmJDUlBCaHRIZFdyM2owZG1qMjJ0ZE9BZlQ4Qmgxc1Bv?= =?utf-8?B?QWV4Qml2d211enZWL3Z4czNtRjRjY05qSWZaSG81WjhtdUtnNDNTa1pnRXY2?= =?utf-8?B?YmdPQzdZSmVLMGxoY0ltNFVmODZ5N2pMa1ZwR0h4SHEwTVNxZHZiLzA2MkNy?= =?utf-8?B?ckVUejBpbXNUYkEwZmh0SldtcE90Qkc2YTN2cmRmZFZwVDEyeUZWMlk5a3ZJ?= =?utf-8?B?UmMvZnIxVjYwQ3VkU0pUQTk1Wnh2Ynp4Z0FBMnVzRUVOM2RZSzVNZTZZMm1C?= =?utf-8?B?ZnVRVFJab05TTUUvK1hGZXAzM05NU1dsVXo4MDdxRzlHY1B1QXJ3QmdkQkpn?= =?utf-8?B?UjRUcnBhaFdsRDk2ZEgxWlQzYUlvZjMrL2lFN2pybEZINHo2MWttbnpXcGFD?= =?utf-8?B?UUZQWFhGa28rUTdKd0pIQ3RHbW9uc2JVd09rR3ZDclVmOVlrWnpFeVN2djNk?= =?utf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JlrTvptGdIK6h5ESRbK8x4V4/xvOAwlo9b7JYdoekRNcSVnFmBBsHN59+lroOgeZSfZ+OkvAPTrjwY3BA3og5K/68NRru2hekyS3REnIre275spJ4cBPHfV6kXQ=;24:ENNb0hfjwmD+msW0/ZEdSHn9kW7Xu8oiUR1g1xO4JoYdsMcwFGGFz6226LfLWb9yITOPlT/rFL3Vg2aintqwdl5d+h+PLyRuH0tCqBASQBk=;7:V2ul7LYEcfeursLXIqQK9UWlIyJp8qJTpIZ5XkW9XTRBznxfO9LWLft+AgZKksF824mX2ZvHqdzce1TTeP4Y575ZNqMQARCGy49w2ljRe+JzhQ6K+ZAFUUaILp2w1ETUCeS6La7Q1Arv6KwcuvBdFFzlWvx36by5vAgC8+HSd0xngj3CJwV9V3TQcBCD0uLz1dTuX8I6iOYE32vdfPEOH8f8RpTIYYkUIlEshK798qOY/ndA9lhcu9kw0H6KZcTA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB6PR08MB2824;20:WP8fxA/PpZ4zqUi+e7RCA8T+xND2Zv6V2PFx/1sXLj/fAKxDUBxZC3oMgeFOIQ1RcJ/DQg9wUcMmUcsvAe02zww3pVzWHOqEIfb4krWLrCUU8w8erttWoHXVHGjN98SUT3mACsUy/0sPp2MIta0We1ZZMR8e8UV5wGw+Pzy5J28= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2017 16:33:59.4099 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b829e1af-7b9a-4068-7395-08d53bfdfd34 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2824 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 711 Lines: 20 On 12/04/2017 10:17 PM, Paul Lawrence wrote: > From: Alexander Potapenko > > As a code-size optimization, LLVM builds since r279383 may > bulk-manipulate the shadow region when (un)poisoning large memory > blocks. This requires new callbacks that simply do an uninstrumented > memset(). > > This fixes linking the Clang-built kernel when using KASAN. > > Signed-off-by: Alexander Potapenko > [ghackmann@google.com: fix memset() parameters, and tweak > commit message to describe new callbacks] > Signed-off-by: Greg Hackmann > Signed-off-by: Paul Lawrence > --- Acked-by: Andrey Ryabinin