Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2198404imm; Thu, 18 Oct 2018 10:32:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV60vcF0a3jsjg+5MOPS7XtuXdAH4bWJ8wyEbIWd0jqUMLJwuxiWnYYCnVxjlUd+ENJqwqxsx X-Received: by 2002:a17:902:8202:: with SMTP id x2-v6mr30804011pln.192.1539883940854; Thu, 18 Oct 2018 10:32:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539883940; cv=none; d=google.com; s=arc-20160816; b=BQYfHdSQga4lrlbtSyXT23SjY31bG4BpRdMxz6NhIVRYVRiWiQoz8XUdTLAu1NNcwR E4iQy8zcFLS22IFaXJx0S6eHJaYvBqkX6mPbQsa4T7rRnIUWLkx0NGb3JjVij1i0b5Q7 ZJFJ+gloD111J0RS3tVwnDgrhvmxy1SC8kcRkAYcj36p8us5tRXRsltlGhGCkirC/+0r 8IyZ4RojPh1j4SxkLDNwFv/g4O89Qc0nJmzf6hmQ+W8Uqpd/OJXnHc/OQtuEqCoMPraa B8zSUKxkARCocnQ2yWIcywdj0ybXg2VnzfkQb7Ip0RCptZROP0ERn/MEqoDbg3tQnymJ uo3w== 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=Zg/e2AtIW4ZjaEwI17Ww60fnimeZQmF+JZwHPIYYFDU=; b=gLNK/ekM4TOj5TFwYyXAn8T6mkVi0yNY9ftLm26ip3PB82N10Ak9TkBH2cRsrI1j1w oFUKDMfvLf2+GTW5RICmSZbhydAmdD0l5monzISTdBXPaSCwVXUUXz9N428VOSnZm2kO G7yFUej/Qd3eZZwNqBDXvi6LD/3UxOYaIZ7AFfBXhzym+MeXHL7vqtbW5hiGf4of5kWd VbrzJdVfqO1sJBa+lrFq9AHg6F0thPPG+P7fix+y0weBP5f0ZcTvluZC1Odu3/h44HL4 DUi4gSVHYzi8P1u/4/y5bwTqebyOwfbWU+IMGXreQ6aVVNZalqyldXNUv2/HoFgRG5av p/2g== 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 z1-v6si20768447plo.59.2018.10.18.10.32.04; Thu, 18 Oct 2018 10:32:20 -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 S1727608AbeJSBdm (ORCPT + 99 others); Thu, 18 Oct 2018 21:33:42 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41514 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726444AbeJSBdm (ORCPT ); Thu, 18 Oct 2018 21:33:42 -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 C8D69341; Thu, 18 Oct 2018 10:31:42 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.80]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B000B3F5D3; Thu, 18 Oct 2018 10:31:38 -0700 (PDT) Date: Thu, 18 Oct 2018 18:31:36 +0100 From: Catalin Marinas To: Andrey Konovalov Cc: Mark Rutland , Kate Stewart , "open list:DOCUMENTATION" , Will Deacon , Kostya Serebryany , "open list:KERNEL SELFTEST FRAMEWORK" , Chintan Pandya , Shuah Khan , Ingo Molnar , linux-arch , Jacob Bramley , Dmitry Vyukov , Evgeniy Stepanov , Kees Cook , Ruben Ayrapetyan , Ramana Radhakrishnan , Linux ARM , Linux Memory Management List , Greg Kroah-Hartman , LKML , Luc Van Oostenryck , Lee Smith , Andrew Morton , Robin Murphy , "Kirill A . Shutemov" Subject: Re: [PATCH v7 7/8] arm64: update Documentation/arm64/tagged-pointers.txt Message-ID: <20181018173135.GF237391@arrakis.emea.arm.com> References: <47a464307d4df3c0cb65f88d1fe83f9a741dd74b.1538485901.git.andreyknvl@google.com> <20181003173256.GG12998@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 Wed, Oct 10, 2018 at 04:09:25PM +0200, Andrey Konovalov wrote: > On Wed, Oct 3, 2018 at 7:32 PM, Catalin Marinas wrote: > > On Tue, Oct 02, 2018 at 03:12:42PM +0200, Andrey Konovalov wrote: [...] > > Also, how is user space supposed to know that it can now pass tagged > > pointers into the kernel? An ABI change (or relaxation), needs to be > > advertised by the kernel, usually via a new HWCAP bit (e.g. HWCAP_TBI). > > Once we have a HWCAP bit in place, we need to be pretty clear about > > which syscalls can and cannot cope with tagged pointers. The "as of now" > > implies potential further relaxation which, again, would need to be > > advertised to user in some (additional) way. > > How exactly should I do that? Something like this [1]? Or is it only > for hardware specific things and for this patchset I need to do > something else? > > [1] https://github.com/torvalds/linux/commit/7206dc93a58fb76421c4411eefa3c003337bcb2d Thinking some more on this, we should probably keep the HWCAP_* bits for actual hardware features. Maybe someone else has a better idea (the linux-abi list?). An option would be to make use of AT_FLAGS auxv (currently 0) in Linux. I've seen some MIPS patches in the past but nothing upstream. Yet another option would be for the user to probe on some innocuous syscall currently returning -EFAULT on tagged pointer arguments but I don't particularly like this. > >> - - pointer arguments to system calls, including pointers in structures > >> - passed to system calls, > >> + - pointer arguments (including pointers in structures), which don't > >> + describe virtual memory ranges, passed to system calls > > > > I think we need to be more precise here... > > In what way? In the way of being explicit about which syscalls support tagged pointers, unless we find a good reason to support tagged pointers on all syscalls and avoid any lists. -- Catalin