Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp609231ybj; Tue, 5 May 2020 04:48:57 -0700 (PDT) X-Google-Smtp-Source: APiQypIdiBJfF/liv/sk3gVpYbCftiu29mEM7OUK/EiP+3sPa47VpZmV1WFX16F4rLISz075Sk2w X-Received: by 2002:a05:6402:22ed:: with SMTP id dn13mr2159350edb.212.1588679337223; Tue, 05 May 2020 04:48:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588679337; cv=none; d=google.com; s=arc-20160816; b=zw+R5ZJIH+Un9Dne4kKWqNGCvXPsOVaKE6++tw9tsTOUyAMpqxfUSHQn101GwGTPNT UKQNY7pzGwJduQOfqsgFUhlM/jjcSUSvmqs9fyY416h3YIm5gdsFazu8NOOoPPvnx5tF uVwbQ5zmZWdgqAXmIXGqFuF840+ifU2BHzJ7G2yW+kNKN9F0pRiVwe9FrqbG8VYLhgUE idbZbGUt8x7pZ2042FTI4FjZ0VNh3S8/lqq1TtTr8RJapdt2v92KgxOeThuJk71NpiUh YKMf/5Ng1/nq9yn8mApgRo5NolvTTtK1YuNKCwzSeB2HZqY3QzpJTaEv9DOFa0fOgKbN 1OtA== 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=oIfWdRq9yyjwaPNLBB1WhcLPviYtpHs1y/6Em0UoQzc=; b=rEavOR8jJYsNtFpFyLLad60K30d6oygI0zT9jmqmlK+uoW5JyamiGMDgJDTQumQvZW jFr39DfdI81ikD7itda7i8auyh23CSI582G4D1ZvNoXiPDGH5n6y9DcB5dfRQiLRzQov ve0Gi1sFU3gSa6Jhkx4VYZHtvEWaTaAgQ7/T7DNYf7MOGYNe3M8ldz3K0bspJGNGdMsV wdNumdjm/P5NNOcHJ5Jl0/LALOi7vXZtJYMZhRntA6tH0V+9Cb020wOMKrTo8+VIuOnI wsXgsjsBRm5/H3ONhEQ/BZwaDKAfqnkrzESboAtCJ197RxwPQhCqErVjjdMukMCfZCEB j/2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=N4hxmyzj; 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 5si1044867edx.30.2020.05.05.04.48.34; Tue, 05 May 2020 04:48:57 -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=N4hxmyzj; 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 S1728819AbgEELpD (ORCPT + 99 others); Tue, 5 May 2020 07:45:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728608AbgEELpD (ORCPT ); Tue, 5 May 2020 07:45:03 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38392C061A10 for ; Tue, 5 May 2020 04:45:02 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id h4so1242762ljg.12 for ; Tue, 05 May 2020 04:45:02 -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=oIfWdRq9yyjwaPNLBB1WhcLPviYtpHs1y/6Em0UoQzc=; b=N4hxmyzj9lyf6o8bph0ivG/R3yiX7+7av0Z3hbRgE3G1P9nJfWcbLP48L+DmBUPdRL iS7tdHnci9lYc5jibCU27M9cIyiBouV3TGfHBxmomzZlTAA+K4jvmlfO+0PUY5gOJwWk INzBNV9RdyU4hz+KA3qMcbJKjE4Nef1pYkIpykiFiNhgkJ8IjX1SCD4/KaX9gsrjw7UM PqB5v5UISICWvKpUwJeHeWlT+kuUlYh2Fy7unW4FPr071vxBMvN/2bqL0KNaC/NHAxF/ T4cTLz3YQkpT0ozMLHkIMjfiTRUu5z91/BjdSvFzNbqdymSh9Jx5aHZO1PEyCLvLAOi3 ZMTQ== 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=oIfWdRq9yyjwaPNLBB1WhcLPviYtpHs1y/6Em0UoQzc=; b=kaUu1gw55tQgeXXHEoe9TslmonO+AFp/BteoI9+lup4BcpAKzezXC2wpl4P+uxs54I oGbqqHXalEly3HlPl1HdnuOUvIuv4bD+quuaYsGv/zN3aGKxaI9WEiUaxG3phlfn4IU7 pwDn8wDIrudtiEFvVNJ9guYNLq3a7bxyv5tgN+pGZyuBadqUS2ftfn2InqFGQHz6wNTo +xHewvE+4pXem62K4zOOkGapKim8yI3nuudlhqGY2CIrMlsuTiJ4AZyPUlwJhjufajef Jo0oAQqXg31+poA+2AVFsayzWk7PQDjJQkMrT4A6RPsI+ahuudfSFrjB4zuKgaXtTueA kryg== X-Gm-Message-State: AGi0PubMxXhfOUNFHOkXyboOGml7bbWo/pyQ0nJr1YZFDh8S3qOL2GIr 1ggCBndtZ/s3ttt2cdrVynaVbJDWBDpfz2ID3qhhlA== X-Received: by 2002:a2e:b17a:: with SMTP id a26mr1481524ljm.215.1588679100508; Tue, 05 May 2020 04:45:00 -0700 (PDT) MIME-Version: 1.0 References: <20200429214954.44866-1-jannh@google.com> <20200429214954.44866-4-jannh@google.com> <20200505105023.GB17400@lst.de> In-Reply-To: <20200505105023.GB17400@lst.de> From: Jann Horn Date: Tue, 5 May 2020 13:44:34 +0200 Message-ID: Subject: Re: [PATCH v2 3/5] coredump: Refactor page range dumping into common helper 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:50 PM Christoph Hellwig wrote: > On Wed, Apr 29, 2020 at 11:49:52PM +0200, Jann Horn wrote: > > Both fs/binfmt_elf.c and fs/binfmt_elf_fdpic.c need to dump ranges of pages > > into the coredump file. Extract that logic into a common helper. > > > > Any other binfmt that actually wants to create coredumps will probably need > > the same function; so stop making get_dump_page() depend on > > CONFIG_ELF_CORE. > > Why is the #ifdef CONFIG_ELF_CORE in gup.c removed when the only > remaining caller is under the same ifdef? Oh, whoops, good point - I should go put that back.