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=-5.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_NEOMUTT 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 1D46AC4321A for ; Tue, 11 Jun 2019 17:45:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 048F420866 for ; Tue, 11 Jun 2019 17:45:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405802AbfFKRo5 (ORCPT ); Tue, 11 Jun 2019 13:44:57 -0400 Received: from foss.arm.com ([217.140.110.172]:39078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405488AbfFKRo5 (ORCPT ); Tue, 11 Jun 2019 13:44:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EFAB0337; Tue, 11 Jun 2019 10:44:55 -0700 (PDT) Received: from mbp (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CF5C63F73C; Tue, 11 Jun 2019 10:44:50 -0700 (PDT) Date: Tue, 11 Jun 2019 18:44:48 +0100 From: Catalin Marinas To: Andrey Konovalov Cc: Linux ARM , Linux Memory Management List , LKML , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, kvm@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" , Vincenzo Frascino , Will Deacon , Mark Rutland , Andrew Morton , Greg Kroah-Hartman , Kees Cook , Yishai Hadas , Felix Kuehling , Alexander Deucher , Christian Koenig , Mauro Carvalho Chehab , Jens Wiklander , Alex Williamson , Leon Romanovsky , Luc Van Oostenryck , Dave Martin , Khalid Aziz , enh , Jason Gunthorpe , Christoph Hellwig , Dmitry Vyukov , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Robin Murphy , Kevin Brodsky , Szabolcs Nagy Subject: Re: [PATCH v16 05/16] arm64: untag user pointers passed to memory syscalls Message-ID: <20190611174448.exg2zycfqf4a2vea@mbp> References: <045a94326401693e015bf80c444a4d946a5c68ed.1559580831.git.andreyknvl@google.com> <20190610142824.GB10165@c02tf0j2hf1t.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Tue, Jun 11, 2019 at 05:35:31PM +0200, Andrey Konovalov wrote: > On Mon, Jun 10, 2019 at 4:28 PM Catalin Marinas wrote: > > On Mon, Jun 03, 2019 at 06:55:07PM +0200, Andrey Konovalov wrote: > > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > > pass tagged user pointers (with the top byte set to something else other > > > than 0x00) as syscall arguments. > > > > > > This patch allows tagged pointers to be passed to the following memory > > > syscalls: get_mempolicy, madvise, mbind, mincore, mlock, mlock2, mprotect, > > > mremap, msync, munlock. > > > > > > Signed-off-by: Andrey Konovalov > > > > I would add in the commit log (and possibly in the code with a comment) > > that mremap() and mmap() do not currently accept tagged hint addresses. > > Architectures may interpret the hint tag as a background colour for the > > corresponding vma. With this: > > I'll change the commit log. Where do you you think I should put this > comment? Before mmap and mremap definitions in mm/? On arm64 we use our own sys_mmap(). I'd say just add a comment on the generic mremap() just before the untagged_addr() along the lines that new_address is not untagged for preserving similar behaviour to mmap(). -- Catalin