Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp1497347imp; Fri, 22 Feb 2019 04:54:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IanYH32MjysYPhwqJ8blu36K6B9Puz0+39wISKXEVkr0KgPacYv/b9Mapq6UV7CF/pb9ihb X-Received: by 2002:a65:46cf:: with SMTP id n15mr3896551pgr.187.1550840092156; Fri, 22 Feb 2019 04:54:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550840092; cv=none; d=google.com; s=arc-20160816; b=lMAKJ8r5a7/u/I3a9rRKZPr5dU+cwcu546evMnwtEx7UfgDnyg+GgG1+W81ggaMt8c XDQex5BMtmzXEFHsy87PPJDLYwgH4oGLg+0yvLDxu8lEntw+9CXAs4+gScHPTq5OouZ6 68B+f+LYFeLtaIHWrpmFijWhyBo4hS4iG2a2J2b0z3o3Y0DdgDqmD7xaRkOZZr5A+b0G CwKsGm0CDbpUBZkT55IhaXQylcq0F3BXgLnZjPOneZVn1uxPD4jUTgq7m1N8G+Fzoo8z +u96ldXJT3j8LRR1tDyodBuCyX3abu2BbySNPFZo8rhtFL/VhUsVUg4ASsZS/ERawBvG dhvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QBwzVVFrwl/lt9+IMfY2XIzbrADnd5gfL2MVdMoEoBA=; b=gjTy5bQoGi+Xdwki5YKcDsTV9fPk1bV/TTPc2rba2CQz22y6rzjRtPHod8bwWJY2YH 7SRBY7WfsKxoDNsB533tJTUO+vyZvIfpUteNuUfeGTz6DE7voraqrBvk/2dhl/zo8umv B+imewMxhcMAmh/pWgVzK/lwPHMwGgF+aTMWQIMJarz9633/sElIgddFlmehAm9ikNLf 3uYGCBW0AwLYb5JH8OvVNkTJMu8Nfx4jYtQ96siwE141dE/397mAdkWm2PYfmwu1Vde8 H+qrT1F2GBJEVAkrJ6BRmrNrykDxNQ43hGzSZKdqRdQgEqLVOn7bwOYEfynUVEdQsoMQ 3jAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SP+p1d8f; 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 20si1343340pfs.165.2019.02.22.04.54.37; Fri, 22 Feb 2019 04:54:52 -0800 (PST) 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=SP+p1d8f; 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 S1727393AbfBVMyC (ORCPT + 99 others); Fri, 22 Feb 2019 07:54:02 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40139 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727249AbfBVMxx (ORCPT ); Fri, 22 Feb 2019 07:53:53 -0500 Received: by mail-wr1-f66.google.com with SMTP id q1so2250376wrp.7 for ; Fri, 22 Feb 2019 04:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QBwzVVFrwl/lt9+IMfY2XIzbrADnd5gfL2MVdMoEoBA=; b=SP+p1d8f0BVnFGmwpzP5ObmgqSe7l5anq9SYK3Z0/3NQEWTdLTfJgPvtmksh4rCpqp IfRqUp24iOQF92rOfMBXwE8SN4Qg9+J3Ff0nPtSyfwTEqbyNm+DeeN5PWzbyT11CnE2+ NiNjrCubovAK/wbw8TnBd9rAdhYi2JGQm/9ZBjiURbGSLjfWJPtszQ5Wp43UoL05Tluv TlBFrRQljeAOUxOv3LCaFgOpw7HH2il9JHvSEnJIjNEhD/hw3TxMJV0heNgWZ4hyYnqc k67G6tBgxNf5nw4KsRQIR60AgXHPgBerP6BueL5DUb/aboLZYnGfKfMCtobiEEHXKnw+ xU8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QBwzVVFrwl/lt9+IMfY2XIzbrADnd5gfL2MVdMoEoBA=; b=oigfOm4RT4gKp2a1OS5p956H4ZzoeKzOQsiFnUtlsLZU7va3y5DU03cx7XOfuXcs7z WGbntsDues0xxfzZHHgsFw2E5vV6Uua3yCvOHITyXHEAi7un8FHG/SJhB9/soQS1ACyI 0SeSrZC0p0u1JQgCOFwYMWaE0ygdf5MCnwAWGL8Ys79i3jq6NnIrknIS2U3sbteF8XmK gz+XY/XlAcppY1yjPTpg1vbWbVbJ9jtnRM2ipWH+ozG/YDJU9iuYWwd2PeeGzF67GH+x DN/24MF+cyMFr1PbEPhWLKSLLzuvVY412bMvK5mX3+5b2cVCAup8Ruoq5jFu6gz++IZG p0dw== X-Gm-Message-State: AHQUAubvkWPX7uBnH+9ieCcqmAu3xB8lfqZcy5ocC35nMBc8LXJ5IO7w XyWYj0NbzK8udgAkexDm3NYsGQ== X-Received: by 2002:adf:efc8:: with SMTP id i8mr3073265wrp.164.1550840031452; Fri, 22 Feb 2019 04:53:51 -0800 (PST) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:13:8ce:d7fa:9f4c:492]) by smtp.gmail.com with ESMTPSA id o14sm808209wrp.34.2019.02.22.04.53.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Feb 2019 04:53:50 -0800 (PST) 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 , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@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 Subject: [PATCH v10 11/12] arm64: update Documentation/arm64/tagged-pointers.txt Date: Fri, 22 Feb 2019 13:53:23 +0100 Message-Id: X-Mailer: git-send-email 2.21.0.rc0.258.g878e2cd30e-goog In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Document the changes in Documentation/arm64/tagged-pointers.txt. Signed-off-by: Andrey Konovalov --- Documentation/arm64/tagged-pointers.txt | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Documentation/arm64/tagged-pointers.txt b/Documentation/arm64/tagged-pointers.txt index a25a99e82bb1..f4cf1f5cf362 100644 --- a/Documentation/arm64/tagged-pointers.txt +++ b/Documentation/arm64/tagged-pointers.txt @@ -17,13 +17,22 @@ 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) for a limited set of syscalls, the exceptions are: -This includes, but is not limited to, addresses found in: + - memory syscalls: brk, madvise, mbind, mincore, mlock, mlock2, move_pages, + mprotect, mremap, msync, munlock, munmap, pkey_mprotect, process_vm_readv, + process_vm_writev, remap_file_pages; - - pointer arguments to system calls, including pointers in structures - passed to system calls, + - ioctls that accept user pointers that describe virtual memory ranges; + + - TCP_ZEROCOPY_RECEIVE setsockopt. + +The kernel supports tags in user fault addresses. However the fault_address +field in the sigcontext struct will contain an untagged address. + +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 +42,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.rc0.258.g878e2cd30e-goog