Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6794666ybi; Wed, 29 May 2019 13:18:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1s9350UW7fJpH1jyOk12frFA6FEH+Kr92/MkM6papbicbPCBwvJ9srERLC45Chk3QeRYK X-Received: by 2002:a63:ee0b:: with SMTP id e11mr89560069pgi.453.1559161104776; Wed, 29 May 2019 13:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559161104; cv=none; d=google.com; s=arc-20160816; b=OvWrNG+J13e7colr0CpO3EdsNPiQTQ81QVxo/DC0G21MHLKa1qOiLvMC2s533mF+Xl TMBhgTfwsYN3/JMMqjvWrCIs38XX5EqqL7k2orUVv1+5EuOrXy4TtAlTqyJ9vAzffbH4 CvtbjoXjpdKZUBE0yJ/V4duvWUWgBZsW7oUW7mY9QuMmA4Hykc6euss24HzUFxDe9plp pCKHvHg5zYeiDMZQn3D/pakNJA/wwW7j4MoXy4RWfkuvHFaCzq8jjLsq2oz39qFx27CP P6L7Qd8U2EgpaWUh9MjjnSBrSovoKKXjV4GFLUMqkmvgLPFP4TzTflRRooHaXEerF9hp HCog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=byH71jcEnWiZocWjFrPDlTMOE7pd8EPRHoYGyukaY04=; b=OogN7FFWT2798KHB1vf0ruxcbNpBHHgTB96lP8PUXBIiOAfWn7yq05nkSXlqF/Q1ea ZSArtqoXJyoMFvcwEUyuP1+rqvL4SB0kmHRI+0LMaj0c68RS1ELes8gWa08bBLyltH9b 1k/buzTXWX05lvf+0KRkLdXYfv+S6AFSYr/T988IvUlCnLVRYeq7hNI1WrxdVhF0O+l3 zbMxv7CsElk3J1lrMt4NpwSxyCJvE7D/I43XKrGFlXcx1l3r8odHSkzCi8HVkm5+cve2 QsivTkR9Dr8l5oDIRPnKtlq2S9bOrf8H9yUCJlg0jyGSnHKCEpAritvP/VxV8MD+h/49 X/jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bwKrSUcA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4si668114plp.404.2019.05.29.13.18.08; Wed, 29 May 2019 13:18:24 -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; dkim=pass header.i=@chromium.org header.s=google header.b=bwKrSUcA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726418AbfE2UQO (ORCPT + 99 others); Wed, 29 May 2019 16:16:14 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45113 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfE2UQM (ORCPT ); Wed, 29 May 2019 16:16:12 -0400 Received: by mail-pf1-f193.google.com with SMTP id s11so2329709pfm.12 for ; Wed, 29 May 2019 13:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=byH71jcEnWiZocWjFrPDlTMOE7pd8EPRHoYGyukaY04=; b=bwKrSUcAFY5li8JHROxevBRkVdZvfftmbN2jvX4D8l/n4Q/b0ePv+zprqpG2KluSLn rSYJBFUhtygfnfgM4xMNPYR/Vp/NGpVKFovwEIHmtk8emThGP6iRNZH+rg7exn2dW3QV qTeu7YoFimL+W4CSITeRLNxas0G8YpYTWwbHw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=byH71jcEnWiZocWjFrPDlTMOE7pd8EPRHoYGyukaY04=; b=hmO1eGF+GBZ4A2YQ9h9mztb59dnFtwA+3+S9mSPp/Ky1Ud1Oqyg7iwxWc7ijt22TCW KhhdJS+ksjRCGUc3dnaZIJWwaAGSr9j/GNnlNiwbI51IKoP6p2BFSsB7pze05FARIv+q e0dJEBHm//hDfKAPe+6fmKn0s05+noIBXdOGD4Nzra8qatw+gRFgda44IfOoPc6OxVTO xsSu5uGxWBTPytbWqpo2lUvEJEJSQ4URyOoUI8NEYGwWJnRbiW5Gt41YblNRqC2NzOIH cbF5HsdYIAE51RTE4Q7ItONlwTfioxB0B6jX1k72WpZeBMxdqcFUkTwP3cPVHmtP0Q7O GvWA== X-Gm-Message-State: APjAAAW8O++xu9TAxBsx1yXqbVLqHUAUFHeeXUGOax4RhUqp2S7BRJ7t M/K5rnY77VRqq8AqXl2VniDplw== X-Received: by 2002:a63:f44b:: with SMTP id p11mr139393871pgk.225.1559160971649; Wed, 29 May 2019 13:16:11 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id u6sm227693pgm.22.2019.05.29.13.16.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2019 13:16:10 -0700 (PDT) Date: Wed, 29 May 2019 13:16:09 -0700 From: Kees Cook To: Alexandre Ghiti Cc: Andrew Morton , Christoph Hellwig , Russell King , Catalin Marinas , Will Deacon , Ralf Baechle , Paul Burton , James Hogan , Palmer Dabbelt , Albert Ou , Alexander Viro , Luis Chamberlain , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v4 00/14] Provide generic top-down mmap layout functions Message-ID: <201905291313.1E6BD2DFB@keescook> References: <20190526134746.9315-1-alex@ghiti.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190526134746.9315-1-alex@ghiti.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 26, 2019 at 09:47:32AM -0400, Alexandre Ghiti wrote: > This series introduces generic functions to make top-down mmap layout > easily accessible to architectures, in particular riscv which was > the initial goal of this series. > The generic implementation was taken from arm64 and used successively > by arm, mips and finally riscv. As I've mentioned before, I think this is really great. Making this common has long been on my TODO list. Thank you for the work! (I've sent separate review emails for individual patches where my ack wasn't already present...) > - There is no common API to determine if a process is 32b, so I came up with > !IS_ENABLED(CONFIG_64BIT) || is_compat_task() in [PATCH v4 12/14]. Do we need a common helper for this idiom? (Note that I don't think it's worth blocking the series for this.) -Kees -- Kees Cook