From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by kanga.kvack.org (Postfix) with ESMTP id DB53C6B0007 for ; Fri, 29 Jun 2018 07:26:18 -0400 (EDT) Received: by mail-ed1-f72.google.com with SMTP id l23-v6so2899684edr.1 for ; Fri, 29 Jun 2018 04:26:18 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id d1-v6sor3702087edp.7.2018.06.29.04.26.17 for (Google Transport Security); Fri, 29 Jun 2018 04:26:17 -0700 (PDT) Date: Fri, 29 Jun 2018 13:26:14 +0200 From: Luc Van Oostenryck Subject: Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer Message-ID: <20180629112613.7i4xesjyxolc63gu@ltop.local> References: <20180628105057.GA26019@e103592.cambridge.arm.com> <20180629110419.GC26019@e103592.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180629110419.GC26019@e103592.cambridge.arm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Dave Martin Cc: 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, Dan Carpenter 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). -- Luc Van Oostenryck