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.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 7F0CDC282CE for ; Wed, 10 Apr 2019 06:59:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50168217D6 for ; Wed, 10 Apr 2019 06:59:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZJVAv4Ef" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50168217D6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5HctroDPdImucCWd/HdhgXMaxNC9SCvgc91sOgRFNHU=; b=ZJVAv4EfaYTltT GRALWQ1p8GOAipl6B+TtRLK1u1QGXl2yI+A/DJKAhbpGp/q18aTMUKV013KcCIC36cpf4BfCTv6rA 2GBhyTwRltgDAq95eyk5alM3vvi1EINEd8fTE+xktfjF1e1WNaMGUu5MVIfKvoO4c/EnZJbcEz1n4 tIO4KSx25h9yyCAXF8A5SZHQN4k617U+gNDGuHwMzmzeOXiDDeNH7jUIYDF6Bt79vSq/0TcmQT5gp PofpUfIRD33w/BrH2GdGtqlh4JUpO7i05vh4rcnnTqbcatJLWCfQ98FbMD9W6GCMbgZp7OnX3tgFT PHYgJ3DrurS40SXq0nDg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hE7CS-0003SK-Ok; Wed, 10 Apr 2019 06:59:12 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hE7CO-0003NH-8Q; Wed, 10 Apr 2019 06:59:08 +0000 Date: Tue, 9 Apr 2019 23:59:08 -0700 From: Christoph Hellwig To: Alexandre Ghiti Subject: Re: [PATCH v2 2/5] arm64, mm: Move generic mmap layout functions to mm Message-ID: <20190410065908.GC2942@infradead.org> References: <20190404055128.24330-1-alex@ghiti.fr> <20190404055128.24330-3-alex@ghiti.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190404055128.24330-3-alex@ghiti.fr> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Albert Ou , Kees Cook , Catalin Marinas , Palmer Dabbelt , Will Deacon , Russell King , Ralf Baechle , linux-kernel@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, Paul Burton , Alexander Viro , James Hogan , linux-fsdevel@vger.kernel.org, Andrew Morton , linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Luis Chamberlain Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 04, 2019 at 01:51:25AM -0400, Alexandre Ghiti wrote: > - fix the case where stack randomization should not be taken into > account. Hmm. This sounds a bit vague. It might be better if something considered a fix is split out to a separate patch with a good description. > +config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT > + bool > + help > + This allows to use a set of generic functions to determine mmap base > + address by giving priority to top-down scheme only if the process > + is not in legacy mode (compat task, unlimited stack size or > + sysctl_legacy_va_layout). Given that this is an option that is just selected by other Kconfig options the help text won't ever be shown. I'd just move it into a comment bove the definition. > +#ifdef CONFIG_MMU > +#ifdef CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT I don't think we need the #ifdef CONFIG_MMU here, CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT should only be selected if the MMU is enabled to start with. > +#ifdef CONFIG_ARCH_HAS_ELF_RANDOMIZE > +unsigned long arch_mmap_rnd(void) Now that a bunch of architectures use a version in common code the arch_ prefix is a bit mislead. Probably not worth changing here, but some time in the future it could use a new name. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel