Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3071908yba; Mon, 22 Apr 2019 19:14:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyITJQ5WS7a5qunITU+jOXnqbnPLAvr0Meq6fctw5e35l532iU9KdT0HZkis/RgzQmByQ1Y X-Received: by 2002:a17:902:e70c:: with SMTP id co12mr23564686plb.339.1555985691415; Mon, 22 Apr 2019 19:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555985691; cv=none; d=google.com; s=arc-20160816; b=iI28Wp0QL7OTk4cCGTNRJmDYIP74jS6TixApzAHSPpFBF5RstlUNnmsVuwry1lvqAK 3MGpqHgXBeeskRQtGiuOH6LKLfT4x6Ot4cjeFj/am4O0KfbS6rbH0xV4Z4xus22PdAnz vv4kyORdqqpPZgkLoYwjJtzSeulUqhxttvI3e6HdfgQd1t6E2UueJAidWBXsTauL1SGV yioKaAOiC2fAjDL9d6KmPvnwD3HrE4wYeRgq4VJRXRF1BMR/EuwJtF/Abe7zZ/f3iEPK /PNd/1Lg/cl1sXV7qmSbGcTiQk7BJns2qUOKwBUvEj71bqVkgb24oTjSe0GrF5dV653r F7FQ== 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=UQRJVezOw5NyrjRq0B+wygXZgAlIYifoXcYtYJvWroY=; b=AaoshqgvQzzsXJ+nrFiKJrfMtt+HYMkYur0WIVbZVRq31LZjS69If94pfQDw1KIruQ IUNFMoAP4hvLN07zujbkiamk5if06DCfvXieWQsvrxiwnbdhwev23VmadldCdP1CFEjI Ew0nx7Hvik8HL940wrDa9UDR6YMV61FNpJD83mKiAxC/fwGmrpemFz0sCh5T9z2284hi dorhRZRcF/Taq3f8mmKdBrXc1avPSunSH+87CmikTrq+ArKETuYMZ2lED6Nqm6sac4cd GZuaTO4MC2KPaALEPG6kvKssmNX5+xSplDSi/JiQcDI42sHqXE8IF0cxQFYoWcGdmH1C I+jA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z23si14893603plo.40.2019.04.22.19.14.32; Mon, 22 Apr 2019 19:14:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731617AbfDVT4Q (ORCPT + 99 others); Mon, 22 Apr 2019 15:56:16 -0400 Received: from verein.lst.de ([213.95.11.211]:41760 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731024AbfDVT4M (ORCPT ); Mon, 22 Apr 2019 15:56:12 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 7ABF068AFE; Mon, 22 Apr 2019 21:55:57 +0200 (CEST) Date: Mon, 22 Apr 2019 21:55:56 +0200 From: Christoph Hellwig To: Kees Cook Cc: Alex Ghiti , Andrew Morton , Christoph Hellwig , Russell King , Catalin Marinas , Will Deacon , Ralf Baechle , Paul Burton , James Hogan , Palmer Dabbelt , Albert Ou , Alexander Viro , Luis Chamberlain , LKML , linux-arm-kernel , linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, "linux-fsdevel@vger.kernel.org" , Linux-MM , Christoph Hellwig Subject: Re: [PATCH v3 04/11] arm64, mm: Move generic mmap layout functions to mm Message-ID: <20190422195556.GD2224@lst.de> References: <20190417052247.17809-1-alex@ghiti.fr> <20190417052247.17809-5-alex@ghiti.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu, Apr 18, 2019 at 09:19:18AM -0500, Kees Cook wrote: > On Thu, Apr 18, 2019 at 12:55 AM Alex Ghiti wrote: > > Regarding the help text, I agree that it does not seem to be frequent to > > place > > comment above config like that, I'll let Christoph and you decide what's > > best. And I'll > > add the possibility for the arch to define its own STACK_RND_MASK. > > Yeah, I think it's very helpful to spell out the requirements for new > architectures with these kinds of features in the help text (see > SECCOMP_FILTER for example). Spelling out the requirements sounds useful. Abusing the help text for an option for which no help text can be displayed it pointless. Just make it a comment as Alex did in this patch, which makes whole lot more sense. > > Actually, I had to add those ifdefs for mmap_rnd_compat_bits, not > > is_compat_task. > > Oh! In that case, use CONFIG_HAVE_ARCH_MMAP_RND_BITS. :) Actually, > what would be maybe cleaner would be to add mmap_rnd_bits_min/max > consts set to 0 for the non-CONFIG_HAVE_ARCH_MMAP_RND_BITS case at the > top of mm/mmap.c. Lets do that in a second step. The current series is already big enough and a major improvement, even if there is much more to clean up in this area still left.