Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932549AbcLMMwO (ORCPT ); Tue, 13 Dec 2016 07:52:14 -0500 Received: from mail-db5eur01on0104.outbound.protection.outlook.com ([104.47.2.104]:51223 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752056AbcLMMwK (ORCPT ); Tue, 13 Dec 2016 07:52:10 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Subject: Re: [PATCH v2] kasan: Support for r/w instrumentation control To: Dmitry Vyukov , Maninder Singh References: <1481608665-26941-1-git-send-email-maninder1.s@samsung.com> CC: Alexander Potapenko , Jonathan Corbet , Michal Marek , Andrew Morton , kasan-dev , , LKML , "open list:KERNEL BUILD + fi..." , PANKAJ MISHRA , "Ajeet Kumar Yadav" , Vaneet narang From: Andrey Ryabinin Message-ID: <6cc0eadc-5204-ce36-f5e8-88ba76bb6826@virtuozzo.com> Date: Tue, 13 Dec 2016 12:20:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: HE1PR01CA0061.eurprd01.prod.exchangelabs.com (10.165.170.157) To AM5PR0801MB2049.eurprd08.prod.outlook.com (10.168.158.139) X-MS-Office365-Filtering-Correlation-Id: 80547358-c3c4-400f-0b21-08d423393d4c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:AM5PR0801MB2049; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB2049;3:cQ4l55b74UxbMPefm7MEdpjTPtjQKn3bv8TkqRRJJoPEQ521G//n0Zpwq946WKoj5iKwKY+Olak1wYvvMDRoyt6wTiYXJ7QQ8vw4L5wuwOl39jzGLBGFPFViWg9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zlX5Gl34MzkF9nx+iB5hUqt5hjZ/hbvqE20ChMPt2qJKqzd4zEpBZluF6cyJy9hezvhHocQaM9gNCG2H/YUv9b185BD8WEnONDhHEAcv5AMAyQb1A69Srpa//1D47ze1kx+kgnpBYFBKWfhfAPZ5sTkTBI6s704AMqrYDgPxSXk5sSx8R3Qe/IJ/YVfbsvd2tX+0c7EfepbbBGytjzuPKlIi4ntHoHA8NUFqeF9QH4PvwwiCsryk2/7fu9hJfqbotg==;20:H/lII/FU/+y7X+FoeSi0UgXkRUHsS88KTcw8KfzAZE3RWdS3DSn0oDXV6xZ4GmeSRaW10f7zrffXINoi4UzBXsolbiSnS6ibDAuC1mZ8XXlJj+XcWUIWbB0t1Db+SeBe0f6gO1ZoSnYUEX24zP8QayFxTl+GP5ZADmaSa1ie2AEISe5RJDo/XndtYEhu1Vl0eeLQOhkz0L+/XQ7v59RH+lRxTXcukFBYwdFRBVkhWpFr47kPvDzF25lkeBScP2HY X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148);SRVR:AM5PR0801MB2049;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0801MB2049; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB2049;4:J4gp3GmzUzF3Np+mtsSPHYUItIg3UU/jYN3VmpHNx+n3bkE16jA1Z/c1LlhYj35Otx/FhLf3DYc6bc37PG+JUIBOhbm4zSrktXOWzXGNM6oG4oVq6hYZm3ScmgHjvqlWE38BzPlJXfI0EDoX0TT+gENj8Vge0Q2uukwmEAJcIm0N/1kF2kG1S/nddg7TZoEy3QV6gPoxEGH27krm9/XJ7xP9k1cBHvK/FVwgJVHpiSFRPKkDpWRU934/YP5ffy+JxU7dpFNcoG/6XhJtwUJSLYNsBC0FQpqaLlSoS2Hs7ilkQcjXlb+0bKqp/EfvtjRUGoMxh1JSCjMGLAM7Q1xqcTdD3e467rs/6QY0F2OOGERQt4BPjS0b8fcnRQrghAeNbgJB8rNHeyzYm6rJRV804q96saP6gMdkz+04GyVlwyqRtGK+TtBNfrkMN3l4fe6Ct1cp0EXYgyrwOZi9Uw2UaO4KmzHRGwxpuWX4UHoQWPHqNKCnhGDB4LVwAsNxmeWo3Ynnhjl+ameqmwTznhsObq5qUcQJAABy6f9xKAZEbq15AmKZfKyBEHSKhSjZ0+/VDxo9GHOC8igIiWtsAgSrFzgxz7azfbkJnNM6C7oaN8G4DyKRw7hJ56ou24KlWuKI X-Forefront-PRVS: 01559F388D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(7916002)(39450400003)(199003)(189002)(24454002)(377454003)(101416001)(54356999)(92566002)(81156014)(50466002)(81166006)(229853002)(38730400001)(305945005)(90366009)(77096006)(64126003)(6486002)(7736002)(4326007)(6666003)(76176999)(65956001)(50986999)(7416002)(65806001)(66066001)(2906002)(2950100002)(47776003)(33646002)(5660300001)(65826007)(23676002)(36756003)(3846002)(6116002)(230700001)(68736007)(86362001)(106356001)(4001350100001)(31686004)(5001770100001)(42186005)(31696002)(189998001)(97736004)(105586002)(83506001)(8676002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0801MB2049;H:[10.30.19.223];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjA4MDFNQjIwNDk7MjM6c0tlSFNFZWp6RHFHYUlON250SnlZYkpa?= =?utf-8?B?aUFWL2w5bW9xSSttMklzYkZzR1dkdnRMcmNrVW5DQ1lpZEJLdEhTdUVuME5N?= =?utf-8?B?Wk9FUExMNE42b2trb3BsYlpkVXFYOCtONVdzWnhmRlZnZkRjbE5ERk1zYy9Z?= =?utf-8?B?WGVHZU9HY1krS0dVTjNEQ0ZVcW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9lAmsmSJDRhg==;20:BBM41O05o6IdqwV+fG8moGd8FHfVvzsMRGEibTTFXjbTvcw5cihdpTjVefBR885qwQ5/LIAWxe0bessrONrFpiXVtwQV4nj40w5rRbEHX2hcjEsonX8C4QD1FrwGQ0mso+vumOBCvDAbpS9nODcXtyO+ichMvjNz4fM/0DrDT0w= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2016 09:20:09.8711 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2049 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 946 Lines: 25 On 12/13/2016 11:58 AM, Dmitry Vyukov wrote: > --- a/Documentation/dev-tools/kasan.rst > +++ b/Documentation/dev-tools/kasan.rst > @@ -40,6 +40,14 @@ similar to the following to the respective kernel Makefile: > > KASAN_SANITIZE := n > > +Sometimes it may be useful to disable instrumentation of reads, or writes > +or both for the entire kernel. For example, if binary size is a concern, > +it may be useful to disable instrumentation of reads to reduce binary size but > +still catch more harmful bugs on writes. Or, if one is interested only in > +sanitization of a particular module and performance is a concern, she can > +disable instrumentation of both reads and writes for kernel code. > +Instrumentation can be disabled with CONFIG_KASAN_READS and > CONFIG_KASAN_WRITES. > + I don't understand this. How this can be related to modules? Configs are global. You can't just disable/enable config per module. > Error reports >