Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp855466imm; Fri, 29 Jun 2018 07:30:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJiqTZOWdMtlv2AQpK+8jQ+uhr7ov0InzPHmg3TzgFakjJKOfc1hcSjp47eKcdjwimgWIw+ X-Received: by 2002:a17:902:b60b:: with SMTP id b11-v6mr15410152pls.330.1530282612080; Fri, 29 Jun 2018 07:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530282612; cv=none; d=google.com; s=arc-20160816; b=WWbjU7vthD2fbyUrlHfmPIs/TmdGW8BYWUTLDXTaLzpjrULAvOREo8yeUMdxw0h0/H MZiLn2wusnWB+vIltZD39xrMJq+DFZT8j2Ztis6EoZtMYebSYTil7+iZJSgpve99xwBt iZCh4wmuUzFO/+Rqar+p1BCcZi+m5vN5IoDm17MWMoln/WGNw81LMnU46cIRx3PUzJdE SdwDIMdKgaF3AJC1aeoBRcQwxSEpr02Rv333FcqRLYAv9kB4RXkAUDwzkhrN0CJ0yd1J hKkqOfhaFMbqRNkmkNZYKGsOElOvNY8wUwQy9bui4hQtxcnBs9rBUOx2Bsb9JSLuYCvZ Xe0A== 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:dkim-signature:arc-authentication-results; bh=IYnfXID1scputwOuPyQwoT7N16OKsKGAjw0dZIx9kKk=; b=COzwxvq05YCBR6zONg8O3nVx/Rf1ht8CyriTwUZOpZIujWrFL8qjmKEmXNkOHh/11X MfgjytiDvx4Su83fBegfOagZrOHwyKb2CnmGVRivy/pLfQJ0ykMdtvGnAJTrWt8jLdNp MMbObqHhAkYpRdF63buFU0ZbTzKGqVZEsyZftqgoe8Way4nqGnlHF+7zH8rVNp3cwzdS M9v3a8mfNrFgpc2CfHsDHpTNz95rg8Tnq3mw65ANcnEKBkLdmTrgx1FpbMYWNXr6Xqac Ve0E5ljHm1noEjsVsDVcARne+tOLipaRUtiJXffqnatoi9gCIrjleB5zJvuz8cENpfRu QuCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=SXjzkGpl; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c15-v6si8043526pgv.62.2018.06.29.07.29.57; Fri, 29 Jun 2018 07:30:12 -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=@oracle.com header.s=corp-2017-10-26 header.b=SXjzkGpl; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965987AbeF2NpN (ORCPT + 99 others); Fri, 29 Jun 2018 09:45:13 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:49522 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965409AbeF2NpK (ORCPT ); Fri, 29 Jun 2018 09:45:10 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5TDcgMA105643; Fri, 29 Jun 2018 13:43:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=IYnfXID1scputwOuPyQwoT7N16OKsKGAjw0dZIx9kKk=; b=SXjzkGplFiSMl2Deo9Q1oHPovy+vsI2ybWnFVg/S7TaKU9o15C8fepenZ69PW6aBQh8U +0HeSaOHgWiteM1ySKp+TFvZ1DReRKhIHrexsvQd1odAWaP9Npu/Z9CLptVgAvWltNl0 atbTd9Qr3MTPnJEtPQLMg3+Ufus1LW1+cEkPYtEEvoAhZzXf2FW3vNUZ3k67k+GxlKgJ wTBHmEowWLvoh8BsFW1RR5yxyZdERpm7u/YMOmoPkbZxt0d4KiGC4f1564jQnN4Sp9JZ 8p0F+l79Vvuon2hAicTN4qpZvPRZbP8eKk6EfwLEitKChMJSuZA2MuSKs4m1U6nohSS7 GA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2jukmu6n9b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Jun 2018 13:43:27 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5TDhQqj013812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Jun 2018 13:43:26 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5TDhNvV004644; Fri, 29 Jun 2018 13:43:23 GMT Received: from mwanda (/197.157.0.49) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 29 Jun 2018 06:43:22 -0700 Date: Fri, 29 Jun 2018 16:42:57 +0300 From: Dan Carpenter To: Luc Van Oostenryck Cc: Dave Martin , Andrey Konovalov , Mark Rutland , Kate Stewart , linux-doc@vger.kernel.org, Catalin Marinas , 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 , Linux ARM , Andrey Ryabinin , Evgeniy Stepanov , Arnd Bergmann , Linux Kbuild mailing list , Marc Zyngier , Ramana Radhakrishnan , Ruben Ayrapetyan , Mike Rapoport , Dmitry Vyukov , Kostya Serebryany , Ard Biesheuvel , Greg Kroah-Hartman , Nick Desaulniers , LKML , "Eric W . Biederman" , Lee Smith , Andrew Morton , "Kirill A . Shutemov" , smatch@vger.kernel.org Subject: Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer Message-ID: <20180629134257.ci5ninozkh2ni6wd@mwanda> References: <20180628105057.GA26019@e103592.cambridge.arm.com> <20180629110419.GC26019@e103592.cambridge.arm.com> <20180629112613.7i4xesjyxolc63gu@ltop.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180629112613.7i4xesjyxolc63gu@ltop.local> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8938 signatures=668703 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=601 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806290147 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 29, 2018 at 01:26:14PM +0200, Luc Van Oostenryck wrote: > On Fri, Jun 29, 2018 at 12:04:22PM +0100, Dave Martin wrote: > > > > Can sparse be hacked to identify pointer subtractions where the pointers > > are cannot be statically proved to point into the same allocation? > > sparse only see the (deatils of) the function it analyses and all > visible declarations, nothing more. > > It would be more a job for smatch which do global analysis. > But to identify such subtractions yu must already have a (good) > pointer alias analysis which I don't think smatch do (but I can > be wrong, Dan & smatch's ml added in CC). That would be hard to manage. Maybe in a year from now... Pointer math errors tend to get caught pretty quick because they're on the success path so I don't imagine there are huge numbers of bugs. regards, dan carpenter