Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp331768imm; Thu, 28 Jun 2018 21:27:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe8SSnoAwDy/Ho1ss9cytZJSjtT4VZn94/8MHghQSL5/28fcD7AzEl9uhO8ZZvGML9H5kgL X-Received: by 2002:a62:ae08:: with SMTP id q8-v6mr12182901pff.126.1530246464459; Thu, 28 Jun 2018 21:27:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530246464; cv=none; d=google.com; s=arc-20160816; b=yw/duQR9t9nsLQQEwL/QzZzoYPfgWUDUbkq/d0didqHLoxwSciBBdqQrR/sLLyiLXY Qel1U2VkhtGvYBbMK+8AQJapa14wii3Oe072U2n8A47neEBSuONBbJkR0mNa5cxdLJ6d ZxHLnjUmQz+9EJLKoj+dSIAq1PFU8uSVNAfe+NrAUMWEhpauWg+FFDuo7LpZkqQaj0Mi 0wzoUnVNPcux3I9FzlDGMSGMNQFHBBDy4ukOwUaauLPYS4+NbMAgwd5x1k9uvYNzUp5V EhpSprNUYC3pzIELsyMWfhJyTyApso1hVh9JKVahgrh852OPqcdIGuaN5Nob0iuZB2zm x9gw== 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=XfV0YwIao1ZThy48M/rzfQwaFP3aXW3fGxtnhPWGtws=; b=nini2oY9F8Reg0kLf4vxmvtYxAaozRxHxGwB8B36hFA7Ai0OGHsJ57WYuARwLQ+3Z5 yDOq9fQ+IiJUUjppqrLULt3cgKr0norW9Q9TXKmGosWU9ArOq3Stco2cyW+4du0DhW7H NwmZXMc9ymX76f+zn6YxERKQz1XTk7W8QCnqQM+GPBWjK0JeTY626ZvaY+7eVCBzFGl2 m+7JeZuezSUSIHEme3b2ko5Lchf586LHlsv4LI5qKlS0iiPnab4cjbHiDTYbJulDJs+Z sQUC4257zyMyGq7qsxcQf+AH904hP5Y32yQ1JxjHjeH+Mpj/b1DPSajCYVbxJL9zL7Je LYLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=V7TnwCZS; 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 t10-v6si1349429pgu.533.2018.06.28.21.27.30; Thu, 28 Jun 2018 21:27:44 -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=V7TnwCZS; 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 S1754694AbeF1TaU (ORCPT + 99 others); Thu, 28 Jun 2018 15:30:20 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:35576 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754456AbeF1TaR (ORCPT ); Thu, 28 Jun 2018 15:30:17 -0400 Received: by mail-it0-f66.google.com with SMTP id l16-v6so13467950ita.0 for ; Thu, 28 Jun 2018 12:30:17 -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=XfV0YwIao1ZThy48M/rzfQwaFP3aXW3fGxtnhPWGtws=; b=V7TnwCZS3G9n5jIXFCypNlSF9O9FsGCezRgOsnjku8hdMyFfrgDneB+KarFl+m+JPE mkWSsPUu2966xHsADYVpkYloYvHn+nKF83yvgexB5XlDv7hPpBYf7/9v2LeAvQRvmGJm FdDOxPgfJzyNP0OZ1VzNihnR1MnQEsnfWuWn0ECeYGPSJV2oYiAa54w0/Xkk1RcLn152 b68wFzfOqQ3vq66MBUsR/ECIVz9dBow7jUA6WgFgxskjkpR5y3cqk7I8fx1HWAyAxCXZ vcIE3LOGtcguN0Z7JwtAvLJfP1DoohKd3RwnlibhpLcF9ykLZDM8IL4ZcJh+V2hgz18r tPEw== 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=XfV0YwIao1ZThy48M/rzfQwaFP3aXW3fGxtnhPWGtws=; b=HF72rSi1WYwFCBzms6kDJtqJRL+O22QqHiFHbCNTYjGTOoAYHkuJZm49A1oEFupmjj 7kioDYtuT8Y//lnzrIvuqmXW+LpOJwX1OIFjXBonNDHe8+WqOvkkMp7cpLLrANqWQ760 GjBY4lF13Q3WY2hXugL9iC6oinF7X/rWkTCnFnPr39f8in32Db6qD2TTOnpt5aBAU8PT 8f4q/VBYcg71rAley97WZN1AN3olKib6tqOx1FincmAn8PfQRpoXva125db5Lm0BlV6w CsJgfu7KVhRsd6J3HmoR6bHk0RMsG3V3icu0wAht2yz2Y7Bda4bjk/jesxu1AGORvwoz pSmg== X-Gm-Message-State: APt69E2ypwQP79+KwiX/2zqm76TZlDmtjz2sStLOUxec2NcyzVAsgR/e StQ1SA91fNZhAdF+wIwwoTl1z+Ig7qhplpje1BDRgQ== X-Received: by 2002:a24:b046:: with SMTP id b6-v6mr10289685itj.48.1530214216643; Thu, 28 Jun 2018 12:30:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:9082:0:0:0:0:0 with HTTP; Thu, 28 Jun 2018 12:30:16 -0700 (PDT) In-Reply-To: References: <20180626172900.ufclp2pfrhwkxjco@armageddon.cambridge.arm.com> From: Andrey Konovalov Date: Thu, 28 Jun 2018 21:30:16 +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 Wed, Jun 27, 2018 at 5:05 PM, Andrey Konovalov wrote: > On Tue, Jun 26, 2018 at 7:29 PM, Catalin Marinas > wrote: >> 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. I've prototyped a checker on top of clang static analyzer (initially looked at sparse, but couldn't find any documentation or examples). The results are here [1], search for "warning: user pointer cast". Sharing in case anybody wants to take a look, will look at them myself tomorrow. [1] https://gist.github.com/xairy/433edd5c86456a64026247cb2fef2115