Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp732973ima; Fri, 15 Mar 2019 12:53:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyisYE80xqz/bXCjYdy//pSwEv4wlw76B3+Ld2foswKvnvcaMHr79kYZPHLAPPtnn9ClnQ/ X-Received: by 2002:a65:5286:: with SMTP id y6mr5162945pgp.310.1552679616582; Fri, 15 Mar 2019 12:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552679616; cv=none; d=google.com; s=arc-20160816; b=Gx+k67zHSYMj4f/cKNaHizk+HL+a0DqquF2UsF1dTzzfCo7ox7U7j03WnzytfKaAru AIAMUfus/XS3uGLZ+bQsJ9xzs41Xz+uQYgO/Rr2Q+ihv+EOUVFH9C3FmZqsX+iUL0Roa IXtz1Lr3YqLR1nQMv++14cag9DXBZCt6+/sOPqKjjoBBdzN5q7Leh2O0BCEJI31JDvro LsN2I47eFu3QkS/4ysBPnMDdkrv49sOSjC5UwRjx/qS7eHeHNaSTdGxTVbqtmv1VKXhy vKwuZVa38L+ATmh/brJCJuHNHBjjizC1wLKpv+fvfFWYIJxH3GOn1Ie1KWaUflFm4VDz VSEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=sAfWvHiPwt89rwowuJd122MWpb2hIcncHtjST15rjKY=; b=OX7/bIMRsRysrGPohOwizCV3oOSXaWsJjKpXESFZdqmHT3eysN8gaVHCOeHrSUDJoc rtW0i0Mw0JZVfeli1v5QhnG6szyekdakk0YLOkoSz3bt7VQZTLf963iWKfEaTD/gzwvA 8PmTTZSpdBP2rZHgGamB6EWEYkhQ7PIIIm/bmrOOMmB382HGI/0uuNMrbnqLgLgpcZQU zaRmmMCMdYvUWd1o5dVgiHgHJujTah7ObklC/jD7XYAFTDFcLJwlINclOJMqv2ArIYLU nBW3EvpnNZDbhof2ySM1CdECazktuutLiMnL+mkJzNyoy315kcvpfA83nKbMuIgrR+y9 Dl3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=m8TjLlxT; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a20si2485199pgw.64.2019.03.15.12.53.21; Fri, 15 Mar 2019 12:53:36 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=m8TjLlxT; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727590AbfCOTwb (ORCPT + 99 others); Fri, 15 Mar 2019 15:52:31 -0400 Received: from mail-yw1-f73.google.com ([209.85.161.73]:46421 "EHLO mail-yw1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727571AbfCOTw0 (ORCPT ); Fri, 15 Mar 2019 15:52:26 -0400 Received: by mail-yw1-f73.google.com with SMTP id g6so13142834ywa.13 for ; Fri, 15 Mar 2019 12:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=sAfWvHiPwt89rwowuJd122MWpb2hIcncHtjST15rjKY=; b=m8TjLlxTJg+rOoEWUReYdn8rdh11EMoghrFHbVAb9WAMjVa0U/T9FqdGOvqwTZpUfm vVbcFLqWrP3TVwdj34DrYszJNIoQ9EJXeAXrC/wvs/z5IYKQAqYP9RwBD+8emDJu5PVP Vo+huuqc6PHspT4+rXUR6NPieF9KLiWfhrJ7gi13d3MatbDKM4RF0bkO2DrrarQnmyYR 3h3NjRcSXCNOJ75ka4ui6zatbnk/g1PfEFqJlZRnqOTJFOnY1jqqoDx3fG9sQrGexBtX ZZ96/DuknTpKXEYqtVY62yQBCWP1T+ifr5PT3FJRXj7RVMG+M4Fgps93zJ4tkNbNYwin RjCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=sAfWvHiPwt89rwowuJd122MWpb2hIcncHtjST15rjKY=; b=NrWkNNPjQAs7u+LooYk3/zBHVvvJLzUGg+BAst5bXrJhbNv5tJoDlpXqgRmwGLOHGx EAeqi8SZ6EtYA3fgzjdm7sOlyh47nORFqvEMncC5i0dFdYrkyXKqfCZ2Y7kXXEqgfTl6 G40fk+ps6m0vy/KW30wzloVav09XmTKFvyizLgyBM0baXK13dWFS5pRRCdtFKQRUVKsy iLuX0yp/mqUclcOHhTcKgD1Num5a0XQ7fupplrVso6jEZlCXLGyZGtPdAMeGLYLn4GfO WZS9sVSHQ+m2Gk9LW9G/lRjCp1oAtd7Hk3baO6ukNd53OObhisNOEt+8sy+TRtuyFw2O YKJQ== X-Gm-Message-State: APjAAAWt7z788SK62deDTaitWUulgfViHTOnZlJWQdTnQZ+07G32NOfe 7Osue+tw2d6co4soab2ZWdN8a2AQud4/z8L7 X-Received: by 2002:a25:41c2:: with SMTP id o185mr2528725yba.96.1552679544923; Fri, 15 Mar 2019 12:52:24 -0700 (PDT) Date: Fri, 15 Mar 2019 20:51:37 +0100 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.21.0.360.g471c308f928-goog Subject: [PATCH v11 13/14] arm64: update Documentation/arm64/tagged-pointers.txt From: Andrey Konovalov To: Catalin Marinas , Will Deacon , Mark Rutland , Robin Murphy , Kees Cook , Kate Stewart , Greg Kroah-Hartman , Andrew Morton , Ingo Molnar , "Kirill A . Shutemov" , Shuah Khan , Vincenzo Frascino , Eric Dumazet , "David S. Miller" , Alexei Starovoitov , Daniel Borkmann , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Dmitry Vyukov , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Chintan Pandya , Luc Van Oostenryck , Dave Martin , Kevin Brodsky , Szabolcs Nagy , Andrey Konovalov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Document the ABI changes in Documentation/arm64/tagged-pointers.txt. Signed-off-by: Andrey Konovalov --- Documentation/arm64/tagged-pointers.txt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Documentation/arm64/tagged-pointers.txt b/Documentation/arm64/tagged-pointers.txt index a25a99e82bb1..07fdddeacad0 100644 --- a/Documentation/arm64/tagged-pointers.txt +++ b/Documentation/arm64/tagged-pointers.txt @@ -17,13 +17,15 @@ this byte for application use. Passing tagged addresses to the kernel -------------------------------------- -All interpretation of userspace memory addresses by the kernel assumes -an address tag of 0x00. +The kernel supports tags in pointer arguments (including pointers in +structures) of syscalls, however such pointers must point to memory ranges +obtained by anonymous mmap() or brk(). -This includes, but is not limited to, addresses found in: +The kernel supports tags in user fault addresses. However the fault_address +field in the sigcontext struct will contain an untagged address. - - pointer arguments to system calls, including pointers in structures - passed to system calls, +All other interpretations of userspace memory addresses by the kernel +assume an address tag of 0x00, in particular: - the stack pointer (sp), e.g. when interpreting it to deliver a signal, @@ -33,11 +35,7 @@ This includes, but is not limited to, addresses found in: Using non-zero address tags in any of these locations may result in an error code being returned, a (fatal) signal being raised, or other modes -of failure. - -For these reasons, passing non-zero address tags to the kernel via -system calls is forbidden, and using a non-zero address tag for sp is -strongly discouraged. +of failure. Using a non-zero address tag for sp is strongly discouraged. Programs maintaining a frame pointer and frame records that use non-zero address tags may suffer impaired or inaccurate debug and profiling -- 2.21.0.360.g471c308f928-goog