Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5464408imm; Tue, 26 Jun 2018 11:41:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKasS3rLu7e/8ugLqzi894PlxT+9qI0O4czLckguLDqSDbWeTW/t7CjqxCZDIhWysDrJAYb X-Received: by 2002:a65:6114:: with SMTP id z20-v6mr2398362pgu.312.1530038503235; Tue, 26 Jun 2018 11:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530038503; cv=none; d=google.com; s=arc-20160816; b=HfIrgxThQVJXGlW1Jl5w9gdRvZiG4ujG5AHX6aKroBBjzt96ksLI/126isWHaJK4xR taYIqz4ZLWms5K/e8niAqm4Om6L2ey3WILNLFkt355i4rlFKo0GGGsspL477vxTfit96 Y0N/Gytsi7+nwiHzKwLaYQ7UH6ddKOmpTg7mbg9kzk8uKJ02l+p6/NHHP3Eh6CAnffEg gc9CPNx9srvr2BGWVLF7NZ2yLXwtngqXQprHk8TibsWVOGxDsV14ueCor5Jzu8r/c2sX k9lYxfOjg8LyG3TSepkvLG3hlbV21rll1Uf/Gk2X7IU1tMttF++b1QYR7NwRrpqblFAw 56Ww== 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=NnnuXf5wVT1NStlFwv6rHkp1bimO/FyrD3cYJCpCwO4=; b=IMhe3w0UJNWT8DtbIIzL95UdWYmARXsB29t4JyprQYtxdHSAbXpLhOnPOiGzwIS2qJ mriaS6ty5zlQkTnTBkJnBBBwj8zhFQ2hTpUfRbjU9+FzURPIS+zKIlFu71qQymnHJdt+ kKsb/RbOlAkoMcJoPT8zt6TXInEbwLy93kya3j+BSMc/vpIXHZyKYOC8pegYTRjQ00Ss U2vRuFXM40sCc3KUDJtDy+IB1JQgFeVpqAQWgKvUWxIf7qj6pViZxtRuldYpyJrve5sv WjGKnmo6HHzeQVtTr4HkFyXILfGgYX7nCGy6YIz2vGfmh97CoIe+4/DqNyAIKXfxBYWa /6ow== 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 d7-v6si2192358pfl.122.2018.06.26.11.41.28; Tue, 26 Jun 2018 11:41:43 -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 S933627AbeFZR3K (ORCPT + 99 others); Tue, 26 Jun 2018 13:29:10 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50082 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932340AbeFZR3I (ORCPT ); Tue, 26 Jun 2018 13:29:08 -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 F1D727A9; Tue, 26 Jun 2018 10:29:07 -0700 (PDT) Received: from armageddon.cambridge.arm.com (armageddon.cambridge.arm.com [10.1.206.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DA7C73F5AD; Tue, 26 Jun 2018 10:29:03 -0700 (PDT) Date: Tue, 26 Jun 2018 18:29:01 +0100 From: Catalin Marinas To: Andrey Konovalov Cc: Will Deacon , Mark Rutland , Robin Murphy , Al Viro , Kees Cook , Kate Stewart , Greg Kroah-Hartman , Andrew Morton , Ingo Molnar , "Kirill A . Shutemov" , Shuah Khan , Linux ARM , linux-doc@vger.kernel.org, Linux Memory Management List , linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, LKML , Chintan Pandya , Jacob Bramley , Ruben Ayrapetyan , Lee Smith , Kostya Serebryany , Dmitry Vyukov , Ramana Radhakrishnan , Evgeniy Stepanov Subject: Re: [PATCH v4 0/7] arm64: untag user pointers passed to the kernel Message-ID: <20180626172900.ufclp2pfrhwkxjco@armageddon.cambridge.arm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrey, On Tue, Jun 26, 2018 at 02:47:50PM +0200, Andrey Konovalov wrote: > On Wed, Jun 20, 2018 at 5:24 PM, Andrey Konovalov wrote: > > arm64 has a feature called Top Byte Ignore, which allows to embed pointer > > tags into the top byte of each pointer. Userspace programs (such as > > HWASan, a memory debugging tool [1]) might use this feature and pass > > tagged user pointers to the kernel through syscalls or other interfaces. > > > > This patch makes a few of the kernel interfaces accept tagged user > > pointers. The kernel is already able to handle user faults with tagged > > pointers and has the untagged_addr macro, which this patchset reuses. > > > > We're not trying to cover all possible ways the kernel accepts user > > pointers in one patchset, so this one should be considered as a start. > > > > Thanks! > > > > [1] http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html > > Is there anything I should do to move forward with this? > > I've received zero replies to this patch set (v3 and v4) over the last > month. The patches in this series look fine but my concern is that they are not sufficient and we don't have (yet?) a way to identify where such annotations are required. You even say in patch 6 that this is "some initial work for supporting non-zero address tags passed to the kernel". Unfortunately, merging (or relaxing) an ABI without a clear picture is not really feasible. While I support this work, as a maintainer I'd like to understand whether we'd be in a continuous chase of ABI breaks with every kernel release or we have a better way to identify potential issues. Is there any way to statically analyse conversions from __user ptr to long for example? Or, could we get the compiler to do this for us? Thanks. -- Catalin