[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAeHK+zXzTEo_DJ5a7KaVDQa06Gx98Oj2O3jMFJo_tNgkq822g@mail.gmail.com>
Date: Fri, 29 Jun 2018 15:18:31 +0200
From: Andrey Konovalov <andreyknvl@...gle.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: Dave Martin <Dave.Martin@....com>,
Mark Rutland <mark.rutland@....com>,
Kate Stewart <kstewart@...uxfoundation.org>,
linux-doc@...r.kernel.org,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Paul Lawrence <paullawrence@...gle.com>,
Linux Memory Management List <linux-mm@...ck.org>,
Alexander Potapenko <glider@...gle.com>,
Chintan Pandya <cpandya@...eaurora.org>,
Christoph Lameter <cl@...ux.com>,
Ingo Molnar <mingo@...nel.org>,
Jacob Bramley <Jacob.Bramley@....com>,
Jann Horn <jannh@...gle.com>,
Mark Brand <markbrand@...gle.com>,
kasan-dev <kasan-dev@...glegroups.com>,
linux-sparse@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Evgeniy Stepanov <eugenis@...gle.com>,
Arnd Bergmann <arnd@...db.de>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Marc Zyngier <marc.zyngier@....com>,
Ramana Radhakrishnan <Ramana.Radhakrishnan@....com>,
Ruben Ayrapetyan <Ruben.Ayrapetyan@....com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Kostya Serebryany <kcc@...gle.com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
Lee Smith <Lee.Smith@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
smatch@...r.kernel.org, Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer
On Fri, Jun 29, 2018 at 1:26 PM, Luc Van Oostenryck
<luc.vanoostenryck@...il.com> 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?
Re all the comments about finding all the places where we do pointer
subtraction/comparison:
I might be wrong, but I doubt you can easily do that with static analysis.
What we could do is to try to detect all such subtractions/comparisons
dynamically. The idea is to instrument all pointer/ulong
subtraction/comparison instructions and try to detect tags mismatch.
And then run some workload (e.g. syzkaller) to trigger more kernel
code. The question is how much false positives we would get, since I
imagine there would be a number of cases when we compare some random
ulongs.
Powered by blists - more mailing lists