Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2180105imm; Thu, 2 Aug 2018 07:28:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeHvHjtp1Qa81MRkc1lwV5njWj3uPPs2JY50fK2xlmXMbG+0/gRwrKoaWXdaEQa8mzcWFut X-Received: by 2002:a17:902:b28:: with SMTP id 37-v6mr2580526plq.337.1533220129688; Thu, 02 Aug 2018 07:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533220129; cv=none; d=google.com; s=arc-20160816; b=n3gHq6WY7r/Ja2Z7DnIP4Ve01whwEhgUZ337kO5uwcO4r99wXj9sdaEIyu+Gp3R+3H IzN5InkQdK3kymb9glVEUael5qLOAyVoyrVjo7/6lkJntFDgjxSAsehGPjtTSMhpZz89 uaQIyAK5jzQG15ufS1P+1KPMW57YXf4qMVagDXkC1nWA7RaelkhsOkRMCu7brjK0BN3n GFyLnlnVhz5Ke58PJRYCnPDZy5JmgxNDKqUwQOWd5KTCJfl1gTuFzGFPasb1wG0KMcF1 SPsdM40pRFW+LA4QaGKtLoUWBBnuHpHAGCJnMWWfFhhgxHvaOCKKxkZhRQx7mqs48p3n tOmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=jni2ThDJ1PFt1H7PNbjn01Jk/dhui+/6epVJ9rhIrM0=; b=YNpUpZcUNikOwuOGi3XX9SnD0XhUhkcsPVTQYQQqDMLAOGaUE2gD9EPa3WMR6LQ0Bs NVfPfJhEMlx8rLONi0HDxBHx5qUcvdDSr0ZQSBr7iCXD60jTElR4oxZj9J8eJcdcLHRA 1ah23rdXqf2s0G4cnv6JL3ZsWjaOwILGPlyV5xDF08oUKlA3RqB+8ys6HEjuCpP6wu1P RFdVYEGIfMkCOQ6J/V+aCc1wBuHvxxYZ7CI0iB2rPnks86p15CicEDYL8nj5kOOjPU0G e2wNnhHo7M2y0rvLAoavef8cTgZkFPSufDtyh1UviuELxo/9ftkH7hXyjtjvl4OVjGSA Yvdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=X4k2EHSs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k20-v6si2234182pgb.115.2018.08.02.07.28.35; Thu, 02 Aug 2018 07:28:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=X4k2EHSs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387524AbeHBQTD (ORCPT + 99 others); Thu, 2 Aug 2018 12:19:03 -0400 Received: from mail-eopbgr20137.outbound.protection.outlook.com ([40.107.2.137]:40800 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732202AbeHBQTC (ORCPT ); Thu, 2 Aug 2018 12:19:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jni2ThDJ1PFt1H7PNbjn01Jk/dhui+/6epVJ9rhIrM0=; b=X4k2EHSsrSSAeUao4DKdJNgzf+w3lN+rQ2hsT/ypFvBnPRJflYr4ab/k4TxPj+m36dFmRyM0EolhqgQM4MbuT8Gy95uqUkk+NungIgB6CQ68zNEBQf7OBUX6r8HGyh7FASz31YEF/Yuhhjo4CUxcbKEe1uKPGdb4MEaIFaxBECc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from [172.16.25.12] (185.231.240.5) by DB7PR08MB3258.eurprd08.prod.outlook.com (2603:10a6:5:1f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Thu, 2 Aug 2018 14:11:18 +0000 Subject: Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer To: Catalin Marinas , Dmitry Vyukov Cc: Mark Rutland , Kate Stewart , linux-doc@vger.kernel.org, "Kirill A . Shutemov" , Will Deacon , Paul Lawrence , Linux Memory Management List , Alexander Potapenko , Chintan Pandya , Christoph Lameter , Ingo Molnar , Jacob Bramley , Jann Horn , Mark Brand , kasan-dev , linux-sparse@vger.kernel.org, Geert Uytterhoeven , Dave Martin , Evgeniy Stepanov , Arnd Bergmann , Linux Kbuild mailing list , Marc Zyngier , Andrey Konovalov , Lee Smith , Mike Rapoport , Linux ARM , Kostya Serebryany , Greg Kroah-Hartman , Ard Biesheuvel , Nick Desaulniers , LKML , "Eric W . Biederman" , Ramana Radhakrishnan , Andrew Morton , Ruben Ayrapetyan References: <20180629110709.GA17859@arm.com> <20180703173608.GF27243@arm.com> <20180801163538.GA10800@arm.com> <20180802111031.yx3x6y5d5q6drq52@armageddon.cambridge.arm.com> <20180802135201.qjweapbskllthvhu@armageddon.cambridge.arm.com> From: Andrey Ryabinin Message-ID: Date: Thu, 2 Aug 2018 17:11:18 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180802135201.qjweapbskllthvhu@armageddon.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: AM5PR0701CA0004.eurprd07.prod.outlook.com (2603:10a6:203:51::14) To DB7PR08MB3258.eurprd08.prod.outlook.com (2603:10a6:5:1f::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: edfd0648-31a3-43d5-519b-08d5f881d30a X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR08MB3258; X-Microsoft-Exchange-Diagnostics: 1;DB7PR08MB3258;3:20FV5SLLeYOo4SCDjL3rYqUpWq8SuduyIGLp8uqYIoV53RwiZIn5STcxWF0bIBlmiKBbNb9mN56NPvQER+rMcRthIIIv76pZX331TFf3IhcTNM0SgKeOOip4t+KKCsh+1xHooyMsyrH7nGL2kbT3VPCzgUP9OzshIsVJwjHK3p3OFWYgLk6V7+6u+RV7YnYydtCTTSZebK6vBwoGcGfCeZr1mMGwb5+G4D23TfpN1B9Az1EDMkjKF1T4oM2kqwC/;25:83hck31u+QdpaUNn4LwF00M9Mx4bkBKO5fhyPLVmlNAPAYuUBq/JLKe0DSkwgRh9hqUv1V0++bSNqlyE8Q9dV2a/4JSyMLFVywNE0qUzICss1/Rabe02daBVwlk2ntcUtNNL3gJ82guvhq//Mi3CXp1sP4BSsHRHa+CuIojsnvJAIC3Lqe1Z2V9L2kE+c06/HpBHriZatolDrDsdk8IATeKEeit9jxgTw0WgTNXqeEjtotaraC+gY9nCUjGXDoPgCgHsY+WHUwTo4Lx6aTuySSPJv5efyaDLbU40JyaPgr6yw4ub6N+8YM1Cgeio56osQ8+4lj2y/E7bmzNXmWmnNg==;31:d1Ts6neheD1gRWuO3frptSGzLbg8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-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016);SRVR:DB7PR08MB3258;BCL:0;PCL:0;RULEID:;SRVR:DB7PR08MB3258; X-Forefront-PRVS: 07521929C1 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(396003)(39840400004)(346002)(366004)(136003)(376002)(189003)(199004)(956004)(4326008)(8676002)(81156014)(86362001)(93886005)(230700001)(47776003)(77096007)(81166006)(53546011)(386003)(53936002)(64126003)(7416002)(5660300001)(486006)(186003)(7406005)(16526019)(478600001)(2616005)(31696002)(6116002)(476003)(2906002)(65826007)(26005)(3846002)(52116002)(31686004)(50466002)(23676004)(2486003)(11346002)(68736007)(97736004)(16576012)(36756003)(76176011)(52146003)(446003)(7736002)(65956001)(66066001)(305945005)(106356001)(229853002)(6486002)(25786009)(6246003)(14444005)(65806001)(316002)(110136005)(8936002)(105586002)(58126008)(54906003);DIR:OUT;SFP:1102;SCL:1;SRVR:DB7PR08MB3258;H:[172.16.25.12];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjdQUjA4TUIzMjU4OzIzOnd5QlZFZUxSRm0xZWJBRHo1U1JVOW9RQ1J1?= =?utf-8?B?NDJwRGNpemZYU084Zkt6TW9aSXpqTVdPclNSV1UvbUxFOGlGeG1kaGYxSWc0?= =?utf-8?B?RFdnZVphRVBpRnQ4elNJaFcyUWw1eCt3OEdWakh3ZkFnRkhSblExSmQrVTMv?= =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EJB2dSOCp0asXRBX6HcMezhMFeodHL5goARk8SgYlJNdgmgon//3VNuXZu+WWjww4WoSPAbUsGWK+sm/MEIE=;7:7DqHOChcwQRX3Hx4Z0S75SO2rNSv/It46LEBTHhAaF6LURS25iv+D8k79PrtvKHMBuuYt7dU0wnZcXLs9JFiJFjxPQWn68dQW8V7jA4ARSjBEm/ugST1byaYazY5ZZja0gvQxAmTPmFLryXfCJWzBeQsc22LVexvIRFJR/kTNTgsUIBO6qbNmMtVF+E5uY/T9gnSq1ZqSDUz8wonOMs2nE8CeQvMRAnwMxJ4HEDULwEAeoDQAgj84Tb7OEcE9ErT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB7PR08MB3258;20:f6nncq8DBn3pW1oczRteaNxbBQR8Hn21z2u14/b2yF4JQ9SZuLjOgro1pJk5d5JqoMllJKEZNZitEeXhbWNx0QqPvvuGK2S5IBxPBKCZHs5owcDVdQycCLDZultUB1Yg3YqYWug53wOMh5oEZ4OYoRPS7ot3335/dkpmPEPRp9I= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2018 14:11:18.0705 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: edfd0648-31a3-43d5-519b-08d5f881d30a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3258 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/2018 04:52 PM, Catalin Marinas wrote: > >> If somebody has a practical idea how to detect these statically, let's >> do it. Otherwise let's go with the traditional solution to this -- >> dynamic testing. The patch series show that the problem is not a >> disaster and we won't need to change just every line of kernel code. > > It's indeed not a disaster but we had to do this exercise to find out > whether there are better ways of detecting where untagging is necessary. > > If you want to enable khwasan in "production" and since enabling it > could potentially change the behaviour of existing code paths, the > run-time validation space doubles as we'd need to get the same code > coverage with and without the feature being enabled. I wouldn't say it's > a blocker for khwasan, more like something to be aware of. > > The awareness is a bit of a problem as the normal programmer would have > to pay more attention to conversions between pointer and long. Given > that this is an arm64-only feature, we have a risk of khwasan-triggered > bugs being introduced in generic code in the future (hence the > suggestion of some static checker, if possible). I don't see how we can implement such checker. There is no simple rule which defines when we need to remove the tag and when we can leave it in place. The cast to long have nothing to do with the need to remove the tag. If pointers compared for sorting objects, or lock ordering, than having tags is fine and it doesn't matter whether pointers compared as 'unsigned long' or as 'void *'. If developer needs to check whether the pointer is in linear mapping, than tag has to be removed. But again, it doesn't matter if pointer is 'unsigned long' or 'void *'. Either way, the tag has to go away.