Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp852404ybi; Fri, 31 May 2019 09:47:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfWqKHDCqgDQ2X245rjSKRojr4TTgqubgKn4/xOnsMRSHvNFpMBASwHO9vOR4pUlPj2jra X-Received: by 2002:a62:a509:: with SMTP id v9mr9679819pfm.82.1559321263590; Fri, 31 May 2019 09:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559321263; cv=none; d=google.com; s=arc-20160816; b=S7Sc8YiT0GJ/okMPo6rbaIDBtHi7UJxUPdXDNxiVGVS4Cu3u2ksw+W+dr06CUEzn+/ Jghrk96rXSkcH4tO69AsDcNB13CNUYy742s98EXz0SSViDCP1qvZK6Q+0dnftoEWTAFV kXAIIMaoratMXGH7oHSrbIY6Bzh8Kw9g58kr+PrWndU7Q9p8uAYXyU19sFjP968x96lP 67PIXz7f0oO5uzyg2oUOiNlCDKKctaxfkvcxb5QGE56bPYOiQKv5zmwi+UT81hYWA+13 pevfWAIx6GxOvJSINZCLxgtVyhxhBts6iqJUB40xs/VAI4vYH7KgoynmUCjIrIqcnRhm W7lg== 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=aT2yKJPBijRfh3I8dT7YFwqukzizGgjs99pM6UcU/IQ=; b=QEMLAC6KGw08T1LFT+RtZNzLVApGIjJE3IxquMdkOTD03Dk5murVUTEDG9s3r8z4Sn RKWpOgiHJ5g/dwDesBJAG0VWUWo1eQJobR0DQcDoh7Rk9MlN8D8I/jWoviUJPSihrAjL ceHNiaoQ+7caruTB+4udvrox5CgHyrIziX4Nk9lNhhmV+KmjvkUxqGeTSBCXqJgr4qYQ hUm66sHopXpQPfqx14j5U7sDbXIYEuLhkjeUJ59Q6kMd/a1WxFNeLp7MLIQrTVv9cKwM +BeSZwZOX2y0Dz1pVGnuWWndm69jQToF+d0cieyASRq8qmS1ulW/RACrjKso11EYrY8C ZN4w== 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 6si7502147pld.293.2019.05.31.09.47.27; Fri, 31 May 2019 09:47:43 -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 S1727053AbfEaQqP (ORCPT + 99 others); Fri, 31 May 2019 12:46:15 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54506 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbfEaQqP (ORCPT ); Fri, 31 May 2019 12:46:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2DFE0A78; Fri, 31 May 2019 09:46:14 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 48A043F59C; Fri, 31 May 2019 09:46:08 -0700 (PDT) Date: Fri, 31 May 2019 17:46:05 +0100 From: Catalin Marinas To: Andrey Konovalov Cc: Kees Cook , Evgenii Stepanov , 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 , Yishai Hadas , Felix Kuehling , Alexander Deucher , Christian Koenig , Mauro Carvalho Chehab , Jens Wiklander , Alex Williamson , Leon Romanovsky , Dmitry Vyukov , Kostya Serebryany , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Robin Murphy , Luc Van Oostenryck , Dave Martin , Kevin Brodsky , Szabolcs Nagy , Elliott Hughes , Khalid Aziz Subject: Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel Message-ID: <20190531164605.GC3568@arrakis.emea.arm.com> References: <6049844a-65f5-f513-5b58-7141588fef2b@oracle.com> <20190523201105.oifkksus4rzcwqt4@mbp> <20190524101139.36yre4af22bkvatx@mbp> <20190530171540.GD35418@arrakis.emea.arm.com> <20190531161954.GA3568@arrakis.emea.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 31, 2019 at 06:24:06PM +0200, Andrey Konovalov wrote: > On Fri, May 31, 2019 at 6:20 PM Catalin Marinas wrote: > > On Fri, May 31, 2019 at 04:29:10PM +0200, Andrey Konovalov wrote: > > > On Thu, May 30, 2019 at 7:15 PM Catalin Marinas wrote: > > > > On Tue, May 28, 2019 at 04:14:45PM +0200, Andrey Konovalov wrote: > > > > > Thanks for a lot of valuable input! I've read through all the replies > > > > > and got somewhat lost. What are the changes I need to do to this > > > > > series? > > > > > > > > > > 1. Should I move untagging for memory syscalls back to the generic > > > > > code so other arches would make use of it as well, or should I keep > > > > > the arm64 specific memory syscalls wrappers and address the comments > > > > > on that patch? > > > > > > > > Keep them generic again but make sure we get agreement with Khalid on > > > > the actual ABI implications for sparc. > > > > > > OK, will do. I find it hard to understand what the ABI implications > > > are. I'll post the next version without untagging in brk, mmap, > > > munmap, mremap (for new_address), mmap_pgoff, remap_file_pages, shmat > > > and shmdt. > > > > It's more about not relaxing the ABI to accept non-zero top-byte unless > > we have a use-case for it. For mmap() etc., I don't think that's needed > > but if you think otherwise, please raise it. > > > > > > > 2. Should I make untagging opt-in and controlled by a command line argument? > > > > > > > > Opt-in, yes, but per task rather than kernel command line option. > > > > prctl() is a possibility of opting in. > > > > > > OK. Should I store a flag somewhere in task_struct? Should it be > > > inheritable on clone? > > > > A TIF flag would do but I'd say leave it out for now (default opted in) > > until we figure out the best way to do this (can be a patch on top of > > this series). > > You mean leave the whole opt-in/prctl part out? So the only change > would be to move untagging for memory syscalls into generic code? Yes (or just wait until next week to see if the discussion settles down). -- Catalin