Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp606181ybj; Tue, 5 May 2020 04:45:09 -0700 (PDT) X-Google-Smtp-Source: APiQypIPyTEon0MMezO0nO8dbNcT7qBAL3ScnGnVijoLd57KIug3KKOTMDOCrt0kIspx3rFM8ppz X-Received: by 2002:a05:6402:221b:: with SMTP id cq27mr2249471edb.65.1588679109195; Tue, 05 May 2020 04:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588679109; cv=none; d=google.com; s=arc-20160816; b=DOQjHSS3xMUa2A7qaM4h66G5HOHij6kOTtBBIe8MRWuwqAvyZ9FHGFZaiqJoC7YB2c golr/lfrZJlX1vlyXzobEbACbeeVoSaNP2UoQrzopDsWozDu9HjE7jr60qDQN7q5rN2h 7AtXciIOfJjQ/pJgKjaI6QeCJh9oNagxASpXo/jNK15CNyUlu2VTiehOHJnpSHtbD3Ya PlP2E3wgA7znfcoF/Y5Rr24x6sTZHfCTv8haKNo7uU9U73ovu2FWN5qLJ3gdOQ0Xp86i 5C9yVyP42BWVe9hCdOf01D9SPAT3wlJpS/yBi0qNehRXCMU4Jx8C0WK6dSU+LgKJh8Q/ oIaQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=ikKwSi47RkdUncF8ZIue6G09Cc3O7H+FG1YBZJHLO1c=; b=I5e+wIwbKR2vH/2ojRJ/rbTcmpvcyLW8pPM/79ruIVbZ9OqEwqtewNUR9x7opJ8rAU W89J8ag+cgqdvWlwsWf1YQrnSwd0yQXyNTRHEuSrjlTXX//GTu5/BhFKfBhEh988I/A3 j572XgIT/BfctxwMpi5hs8pIhqXmpUg34xia5zID0gy0Q1kUNpq6blG8P7qTMCWK3n1T spWRn6c/4BTwFZZO0k5aCTVL3CfYczBs+Uex7tyATAAI57E5gOkiJTKgxEPaTG7MMvPI +hWd+HQSFDBi+lrFUnhVyebmkXGoqDDQN0jBu3KjClGQg+ROg8mBuvsGeyHs8iiUho0E +5ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=PZPHz2sf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id gv6si941819ejb.388.2020.05.05.04.44.46; Tue, 05 May 2020 04:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=PZPHz2sf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728848AbgEELml (ORCPT + 99 others); Tue, 5 May 2020 07:42:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728422AbgEELml (ORCPT ); Tue, 5 May 2020 07:42:41 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4CD7C061A10 for ; Tue, 5 May 2020 04:42:40 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id a21so1236019ljj.11 for ; Tue, 05 May 2020 04:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ikKwSi47RkdUncF8ZIue6G09Cc3O7H+FG1YBZJHLO1c=; b=PZPHz2sf+Y8/7voSUCVwWYQDTFp6jwT4eccln+h2V5t1fLtEiuMZ5ce3f8GLrLB5/+ Lv1kPL8izEzV+2IdG5SUTSb1GcCNzzZfyx/zyH1vNX1EgrQil8bLC2Jc+9mBLhAhHXe7 lOi78W5ciY1Ra0aIWnH4lpyflE7/EEEyKc94UjlHjcZQTnCuGIhy7/dnoqU7UVdaxjRC Rdy8T9f0YhG4rZRuZD9UxnGFLdby4z/l2sf/CrEw82JtjLZcoH91Y9xfMaRapGwaeY1W cCq9z7jHxn2gQYCZgaN9WotoV7g5/hfB1w9fLaw30A+XNiJTmnTXn2BktrD8y/mxhzoX nxVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ikKwSi47RkdUncF8ZIue6G09Cc3O7H+FG1YBZJHLO1c=; b=Mlm2xC+ohTzXSZd18ogUqA/Si+3VnTb08Se2StVky+mIOUbLYTdATd2Uzt57oOXsYh ii60c5N1pPU6ajUoHZIb883ZlapFoTJqZj+NeKO+ds+GczvtKqUQkkciDH09Do6CPLFU xHv8ACI12HUuXnaAEfRXXP91BDeiyhWlkqgrNB9+AR4fvQP2iIx4gSGAtKlfeXZuYQ+1 xYb9GfLujDn472U0zDqvwMIe9P1kI7SWSfZZjzZApnU50eLcQ6Pv92xD0jhQwU1ZWMeV 7dpvYt6V8mT4w0seGQ5kc+4sLXvD1ZP0BfD82M0/31qqaSP0ojSRBPkSrKJLeGeYzimo sMOQ== X-Gm-Message-State: AGi0PuYBcMGxZEYoL1UgU7uOJo/B0S40HRK81bQUTWwCQad5mb5fJkl/ dmqPymvqspZVdDBjaNwb5KCktaU3wt89LYGsKBgVto8qsnU= X-Received: by 2002:a2e:b249:: with SMTP id n9mr1613232ljm.221.1588678959039; Tue, 05 May 2020 04:42:39 -0700 (PDT) MIME-Version: 1.0 References: <20200429214954.44866-1-jannh@google.com> <20200429214954.44866-2-jannh@google.com> <20200505104805.GA17400@lst.de> In-Reply-To: <20200505104805.GA17400@lst.de> From: Jann Horn Date: Tue, 5 May 2020 13:42:12 +0200 Message-ID: Subject: Re: [PATCH v2 1/5] binfmt_elf_fdpic: Stop using dump_emit() on user pointers on !MMU To: Christoph Hellwig Cc: Andrew Morton , Linus Torvalds , kernel list , Linux-MM , linux-fsdevel , Alexander Viro , "Eric W . Biederman" , Oleg Nesterov , Russell King , Linux ARM , Mark Salter , Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Rich Felker , Linux-sh list 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 Tue, May 5, 2020 at 12:48 PM Christoph Hellwig wrote: > On Wed, Apr 29, 2020 at 11:49:50PM +0200, Jann Horn wrote: > > dump_emit() is for kernel pointers, and VMAs describe userspace memory. > > Let's be tidy here and avoid accessing userspace pointers under KERNEL_DS, > > even if it probably doesn't matter much on !MMU systems - especially given > > that it looks like we can just use the same get_dump_page() as on MMU if > > we move it out of the CONFIG_MMU block. > > Looks sensible. Did you get a chance to test this with a nommu setup? Nope. Do you happen to have a recommendation for a convenient environment I can use with QEMU, or something like that? I'm guessing that just running a standard armel Debian userspace with a !mmu ARM kernel wouldn't work so well?