Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932217AbcLGNYH (ORCPT ); Wed, 7 Dec 2016 08:24:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50458 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372AbcLGNYE (ORCPT ); Wed, 7 Dec 2016 08:24:04 -0500 Subject: Re: [Question] New mmap64 syscall? To: Yury Norov , libc-alpha@sourceware.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org References: <20161206185440.GA4654@yury-N73SV> Cc: Catalin Marinas , szabolcs.nagy@arm.com, heiko.carstens@de.ibm.com, cmetcalf@ezchip.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, zhouchengming1@huawei.com, Prasun.Kapoor@caviumnetworks.com, agraf@suse.de, geert@linux-m68k.org, kilobyte@angband.pl, manuel.montezelo@gmail.com, arnd@arndb.de, pinskia@gmail.com, linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, bamvor.zhangjian@huawei.com, linux-arm-kernel@lists.infradead.org, maxim.kuvyrkov@linaro.org, Nathan_Lynch@mentor.com, schwidefsky@de.ibm.com, davem@davemloft.net, christoph.muellner@theobroma-systems.com From: Florian Weimer Message-ID: Date: Wed, 7 Dec 2016 14:23:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161206185440.GA4654@yury-N73SV> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 07 Dec 2016 13:24:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 575 Lines: 13 On 12/06/2016 07:54 PM, Yury Norov wrote: > 3. Introduce new mmap64() syscall like this: > sys_mmap64(void *addr, size_t len, int prot, int flags, int fd, struct off_pair *off); > (The pointer here because otherwise we have 7 args, if simply pass off_hi and > off_lo in registers.) I would prefer a batched mmap/munmap/mremap/mprotect/madvise interface, so that VM changes can be coalesced and the output reduced. This interface could then be used to implement mmap on 32-bit architectures as well because the offset restrictions would not apply there. Thanks, Florian