Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp560344ybj; Tue, 5 May 2020 03:52:13 -0700 (PDT) X-Google-Smtp-Source: APiQypI1pCjspEMX3ja+i7X/luJ3QFMYKh2FTpbfh216xQs0Ek4gLgrPP6jcU6iPfDqEBBk+I3DW X-Received: by 2002:aa7:ce17:: with SMTP id d23mr2004546edv.89.1588675933221; Tue, 05 May 2020 03:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588675933; cv=none; d=google.com; s=arc-20160816; b=dgsk8eIGTMdU/0hvNr4n4w56rvajNS5NF50D40sBEjM8k0apldKYsqjAju7umm8txt rMN298/wfuaNtkt4WBk7aBVYjHf3SSG/6M3s9UtaVg94G2PbZ31qNZc6Oux+aZP7CorU UNa9avOj6VzCtT7Tv9U85olpogBV7/+XrT0T80Y43JfuUpsLDUTbuYYpq6FSzQ4Itz4s Mn0UGW7jU8TnKp0MhdYDFJsIxSGISe9JPkKQ1HYPUpX6nU+XHmQchduqKnMWIvXp6tuT 9lGX6/+0Ugw9/J9QLCXP6/q/P9d+PLVKNWtbHeVBKQdmsvyvOx52I0YGFJU6aqGYPciK +C2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Dp7hwlxeQq5GEp1QfEDhVGyUxkj0HDdou6dlEjzfOrU=; b=TTg9BB5S1IRalhiMQdJx+D0Qatpglp3qSl5FNWTeX77vvI0j86IK07H+rRJ/FRBXCt zjr4sKUdpmGILkPCqE+3pECu2jxGTTtezAXD55Rz2+7+TYdjT/eF/IUtpdM4GJLKlfep eWEAOh6QfPazyhyWD6nk7bZBwX34SWrlJX+4ILgkevXtZCv8JvlkPHD9t5eEC0MYgSX1 rRMdtnzNUGM4PxwgPkijRo+InkYPniF359gJ5DxlbhjujYfXmgUnGm30GrXXuJHuu2q6 z/scQkEFE7Yqo4Op/uzQ0zAmw+XVafj8KW6EvTXvC2/nygS5uICRz34C/SpEXzyb0O81 6LlA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f24si956231edw.258.2020.05.05.03.51.49; Tue, 05 May 2020 03:52:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728720AbgEEKu1 (ORCPT + 99 others); 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.