From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AB35C4725A for ; Tue, 5 May 2020 10:50:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 019DA206A5 for ; Tue, 5 May 2020 10:50:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728756AbgEEKu1 (ORCPT ); Tue, 5 May 2020 06:50:27 -0400 Received: from verein.lst.de ([213.95.11.211]:34662 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbgEEKu0 (ORCPT ); Tue, 5 May 2020 06:50:26 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 64EB968C4E; Tue, 5 May 2020 12:50:23 +0200 (CEST) Date: Tue, 5 May 2020 12:50:23 +0200 From: Christoph Hellwig To: Jann Horn Cc: Andrew Morton , Linus Torvalds , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Alexander Viro , "Eric W . Biederman" , Oleg Nesterov , Russell King , linux-arm-kernel@lists.infradead.org, Mark Salter , Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Subject: Re: [PATCH v2 3/5] coredump: Refactor page range dumping into common helper Message-ID: <20200505105023.GB17400@lst.de> References: <20200429214954.44866-1-jannh@google.com> <20200429214954.44866-4-jannh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200429214954.44866-4-jannh@google.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Otherwise this looks fine to me.