Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp224360imm; Fri, 3 Aug 2018 02:24:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdW/7bqM4c0eu1mTskCsI9Rsd8dfb2b5VNATqhvogReGVwnQVVJmTgte1d+AzibunyTbSJt X-Received: by 2002:a17:902:7106:: with SMTP id a6-v6mr2889426pll.28.1533288287535; Fri, 03 Aug 2018 02:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533288287; cv=none; d=google.com; s=arc-20160816; b=dkl+1s3KclaVeV020AqYSjEDt2iB3F4NP1aJdv2UUpM31CaOomxCUuN64w4NsVlxER 8cNIosa8RHvGeLmIPcQ+spdIzksM5doOfSwByujgkYQY+cZta9O/HnTYHZY3yycwfX0D tVP9x0u1pQWE5DQA9CPHK1ECDQIl5NQcVA3s7/qb+nqOT002KIv1NYJ0+KS22O9esEkn Mgx0a2oCTPmHxtDDCqKDMvWP/UWzhMnxpXwsRnjMBghguQIyN0rhdzoz8tpRdufyDJF9 6Z5qZQgnODdljyOHk8EX4X0dynuDie8aihxF/VtIV/MaCCARzcA08KGR26b3UeGjH69Z Frqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=pSVr+vPNOslgFtxTt1V9MSFf3jCMKj7O9sRug7vjVP0=; b=L9l6PE1yNsk9oClBZCO4L/kho041W3Ilt4J8jMkAQJ+vK/9Ygabek9ZN9QXURAddM8 OQ7mR+5qhTQp3uPCaM/V6GfQM+gNDnkjG6BH6SKkPNC+Ii5K4t39IFN3SJz3jpvxcPSS ZIZsD289MrBJF5e2dZLqelBs5tj4FVQBwlTrLZHFVIzQrSZUgt/jD0P39NVvbEjtv4xX aw+esg7XY2dfc0bcJANt7YJ17KIOb98W2Wc3DP71BiNce1crqoO/qkzNUBV15BFxk1z7 df3ohpp8GEuI5Tdovw66HcGxYiY0KFer8LswZ3LhuIKvZeNOVxU2NEqhrHbA532QMIDK A8hQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11-v6si4533440pgk.468.2018.08.03.02.24.32; Fri, 03 Aug 2018 02:24:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732444AbeHCLSi (ORCPT + 99 others); Fri, 3 Aug 2018 07:18:38 -0400 Received: from foss.arm.com ([217.140.101.70]:40416 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728122AbeHCLSh (ORCPT ); Fri, 3 Aug 2018 07:18:37 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 46D7980D; Fri, 3 Aug 2018 02:23:11 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 143813F5BA; Fri, 3 Aug 2018 02:23:11 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id D1F171AE30FD; Fri, 3 Aug 2018 10:23:13 +0100 (BST) Date: Fri, 3 Aug 2018 10:23:13 +0100 From: Will Deacon To: Dmitry Vyukov Cc: Andrey Konovalov , Andrew Morton , Catalin Marinas , Dave Martin , Andrey Ryabinin , Alexander Potapenko , Christoph Lameter , Mark Rutland , Nick Desaulniers , Marc Zyngier , Ard Biesheuvel , "Eric W . Biederman" , Ingo Molnar , Paul Lawrence , Geert Uytterhoeven , Arnd Bergmann , "Kirill A . Shutemov" , Greg Kroah-Hartman , Kate Stewart , Mike Rapoport , kasan-dev , linux-doc@vger.kernel.org, LKML , Linux ARM , linux-sparse@vger.kernel.org, Linux Memory Management List , Linux Kbuild mailing list , Chintan Pandya , Jacob Bramley , Jann Horn , Ruben Ayrapetyan , Lee Smith , Kostya Serebryany , Mark Brand , Ramana Radhakrishnan , Evgeniy Stepanov Subject: Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer Message-ID: <20180803092312.GA17798@arm.com> References: <20180628105057.GA26019@e103592.cambridge.arm.com> <20180629110709.GA17859@arm.com> <20180703173608.GF27243@arm.com> <20180801163538.GA10800@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 01, 2018 at 06:52:09PM +0200, Dmitry Vyukov wrote: > On Wed, Aug 1, 2018 at 6:35 PM, Will Deacon wrote: > > Thanks for tracking these cases down and going through each of them. The > > obvious follow-up question is: how do we ensure that we keep on top of > > this in mainline? Are you going to repeat your experiment at every kernel > > release or every -rc or something else? I really can't see how we can > > maintain this in the long run, especially given that the coverage we have > > is only dynamic -- do you have an idea of how much coverage you're actually > > getting for, say, a defconfig+modules build? > > > > I'd really like to enable pointer tagging in the kernel, I'm just still > > failing to see how we can do it in a controlled manner where we can reason > > about the semantic changes using something other than a best-effort, > > case-by-case basis which is likely to be fragile and error-prone. > > Unfortunately, if that's all we have, then this gets relegated to a > > debug feature, which sort of defeats the point in my opinion. > > Well, in some cases there is no other way as resorting to dynamic testing. > How do we ensure that kernel does not dereference NULL pointers, does > not access objects after free or out of bounds? Nohow. And, yes, it's > constant maintenance burden resolved via dynamic testing. ... and the advantage of NULL pointer issues is that you're likely to see them as a synchronous exception at runtime, regardless of architecture and regardless of Kconfig options. With pointer tagging, that's certainly not the case, and so I don't think we can just treat issues there like we do for NULL pointers. Will