Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6592836imm; Wed, 27 Jun 2018 10:00:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdqO1kCQ4MsXamjax9stIozwz2Cu97QX5lbGUkbNuS8mwW82lgk0GR2gjCkSgoDNkJeOqGQ X-Received: by 2002:a62:6882:: with SMTP id d124-v6mr6695050pfc.122.1530118818914; Wed, 27 Jun 2018 10:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530118818; cv=none; d=google.com; s=arc-20160816; b=XBEE73nl/qHQHWDckFnDPaiFKPs6nvImqBNa+2anU5V/qC9NzFjc/9vJA3fzYJHJ2y 1nkQNtPnFB2bpCRK4/IL3+yjYbDWnh0OVoouu41jiPoWryW17+ESEhVIyg4iV300pNis ogEtdy7w+JA1ObWAfBwUgWduRguniTTC74/xGyv9yVJveLq9nJlvzXNzDQyfVU9PH1sC QZm2IxMG+AD5uVVU44TsAc3MaH9lBn8c2A7Be7Uf/NTAWL44MhTmpBS26Xy/Vhdu09xi +WdgTz1VBwnYsmx5/1D4jzdQ/1wGlla1osTdlLPZWOirx8DGFehBxpKiJs9mVWnrbv7R cInw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=TePJl1h2RCmQRgrewmfbWlz5NvEyMQff5xprdx8Rzxc=; b=J8oBxfHVKVuKpGYDzfCeDMrb//aTySr79ZWCvMvwS71vs0vPydwVyFn2yqgyETfxRw 8Zxlhrdjo4tsFiCkPGX7YH+lj9zRG8WihRJNOB0IOZMRB71lVWwyml8oB7EtXD2d7Djk ScDfO4d9wuWv60oO5FDhKgivz7i2NGeKwt8ouing/OpjO7ZsKuGqGFBZDslBLN5X5rED 0pGMoOaqY+CzBL2od/YxRS+kHphBmQfu1F660Iw0Bp03ASny8lo3db0CngaZo3L9Ckxr XmakBIVzUeaHKi10KYLdMfrBhUYK0UHIrIzDbYmu5JXF36zCqesOG5V6BpEZ1evkZ8Sf H/+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=f4rtUxPU; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h66-v6si4539063pfa.238.2018.06.27.10.00.04; Wed, 27 Jun 2018 10:00:18 -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=@google.com header.s=20161025 header.b=f4rtUxPU; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965583AbeF0PGB (ORCPT + 99 others); Wed, 27 Jun 2018 11:06:01 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:46987 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965391AbeF0PF6 (ORCPT ); Wed, 27 Jun 2018 11:05:58 -0400 Received: by mail-io0-f196.google.com with SMTP id u23-v6so2197008ioc.13 for ; Wed, 27 Jun 2018 08:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TePJl1h2RCmQRgrewmfbWlz5NvEyMQff5xprdx8Rzxc=; b=f4rtUxPUdJTLqH2GN3ZocuEELaGtPnagDEqgWZzZYD7fGEMTtpV3JCjEkiNXT8Sp1u 11BRrVbkZqFSb9Rt8LJ7AgBUYHSEpUa/RsmzGZd6BqqmA03Li0dkTxjj4TSM/RGhxbF7 guvsQfT3+cYUTrveCPgSfHA+SlZR8LjmWwXbFBFyvdDxa1k1ZS6O/0JdJH/SpBNqj7q6 FbMW4SqazCWUkOVDbSSecPbZ9hhBHRrYqrFOoerynwB8s0yw9di0Gf2XCTTTa/aScRt4 Kidkn+MZvyuJ2W6VNcBTmN7CXe03doy5Je/dy4jB6Fg0w/GFAq2oDVr5L1gQ1ocTXXl0 9F1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TePJl1h2RCmQRgrewmfbWlz5NvEyMQff5xprdx8Rzxc=; b=J52LG7HA4Zefz6seNF1qXCw63nmtXOXvxDvdGkeWC6RVyldJcP4zBd3iqrhwwRkqag xvBR+Sham5oJBQva7TKQ8gUxVWooCTLEUk7qx3iO/BumgqXGbw0bMAKAL89r7uhslYH9 GVf5Lls99CMlzkmyGyf7L0ZzdeASfoXsh8dgErTUHl3mac5OhNxwdh461yP4UYJAOM4N nOmOmartVnRHXhc2qnYWZZjp+H2CNRFmSU2cmOnQpvync/0yOzye30kLZbXiQeuEAfSX moqT2o2mKJcW/ehkgueWuBGMmsUIziUUCdEqghoO0u0AY1nics4qpBNxQ95D79phDSpk uzHA== X-Gm-Message-State: APt69E3uvHcCABH7p4uHTz918w9c+bbbKp/2nY/w+/yFFyfaxhI4Yk4F ARplV2Mjfp75To4Tj++AjaHGFUuN5ru7ubAnMeVZoA== X-Received: by 2002:a6b:8495:: with SMTP id o21-v6mr5159519ioi.119.1530111957761; Wed, 27 Jun 2018 08:05:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:9082:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 08:05:57 -0700 (PDT) In-Reply-To: <20180626172900.ufclp2pfrhwkxjco@armageddon.cambridge.arm.com> References: <20180626172900.ufclp2pfrhwkxjco@armageddon.cambridge.arm.com> From: Andrey Konovalov Date: Wed, 27 Jun 2018 17:05:57 +0200 Message-ID: Subject: Re: [PATCH v4 0/7] arm64: untag user pointers passed to the kernel To: Catalin Marinas 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 26, 2018 at 7:29 PM, Catalin Marinas wrote: > 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? OK, got it, I'll try to figure out a way to find these conversions. Thanks!