From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f72.google.com (mail-oi0-f72.google.com [209.85.218.72]) by kanga.kvack.org (Postfix) with ESMTP id A2DDB6B025F for ; Mon, 7 Aug 2017 15:42:43 -0400 (EDT) Received: by mail-oi0-f72.google.com with SMTP id b184so1061233oih.9 for ; Mon, 07 Aug 2017 12:42:43 -0700 (PDT) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com. [2607:f8b0:4001:c06::229]) by mx.google.com with ESMTPS id h76si5559093oic.33.2017.08.07.12.42.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Aug 2017 12:42:42 -0700 (PDT) Received: by mail-io0-x229.google.com with SMTP id c74so6240015iod.4 for ; Mon, 07 Aug 2017 12:42:42 -0700 (PDT) Message-ID: <1502134960.1803.15.camel@gmail.com> Subject: Re: binfmt_elf: use ELF_ET_DYN_BASE only for PIE breaks asan From: Daniel Micay Date: Mon, 07 Aug 2017 15:42:40 -0400 In-Reply-To: References: <1502131739.1803.12.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Kostya Serebryany , Kees Cook Cc: Dmitry Vyukov , Michal Hocko , Andrew Morton , "linux-mm@kvack.org" , Rik van Riel , Reid Kleckner , Peter Collingbourne , Evgeniy Stepanov On Mon, 2017-08-07 at 12:40 -0700, Kostya Serebryany wrote: > > > On Mon, Aug 7, 2017 at 12:34 PM, Kees Cook > wrote: > > (To be clear, this subthread is for dealing with _future_ changes; > > I'm > > already preparing the revert, which is in the other subthread.) > > > > On Mon, Aug 7, 2017 at 12:26 PM, Kostya Serebryany > > wrote: > > > Oh, a launcher (e.g. just using setarch) would be a huge pain to > > deploy. > > > > Would loading the executable into the mmap region work? > > This is beyond my knowledge. :( > Could you explain? > > If we can do this w/o a launcher (and w/o re-executing), we should > try. If you launch a program with /usr/lib/ld-2.25.so /usr/bin/foo right now, that probably already works because it disables the separate base. There's probably a way to get ASan linked executables to disable the separate PIE base automatically, making the exe get mapped with other mmap allocations / libraries. I think that's the best approach. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org