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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 18896C28CC2 for ; Fri, 31 May 2019 05:05:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E5564263E6 for ; Fri, 31 May 2019 05:05:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbfEaFFR (ORCPT ); Fri, 31 May 2019 01:05:17 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:33523 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfEaFFQ (ORCPT ); Fri, 31 May 2019 01:05:16 -0400 X-Originating-IP: 79.86.19.127 Received: from [192.168.0.12] (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alex@ghiti.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 6BA8020002; Fri, 31 May 2019 05:04:56 +0000 (UTC) Subject: Re: [PATCH v4 00/14] Provide generic top-down mmap layout functions To: Kees Cook 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 References: <20190526134746.9315-1-alex@ghiti.fr> <201905291313.1E6BD2DFB@keescook> From: Alex Ghiti Message-ID: Date: Fri, 31 May 2019 01:04:55 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <201905291313.1E6BD2DFB@keescook> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: sv-FI Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/29/19 4:16 PM, Kees Cook wrote: > 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...) Thanks :) >> - 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.) Each architecture has its own way of finding that out, it might be interesting if there are other places in generic code to propose something in that sense. I will search for such places if they exist and come back with something. Thanks Kees for your time, Alex > > -Kees >