Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1302535imm; Tue, 2 Oct 2018 06:13:55 -0700 (PDT) X-Google-Smtp-Source: ACcGV61SRHAYla2eRd/0IFuQgRLUzImYb1mumv12uP3vew8L2Ub8nFLFbmTsj31vXgSoPArvbVcZ X-Received: by 2002:a17:902:62:: with SMTP id 89-v6mr16869799pla.298.1538486035932; Tue, 02 Oct 2018 06:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538486035; cv=none; d=google.com; s=arc-20160816; b=myx+mgA26YEhwb7O/6QGDnqu11AOfsNy2o4NP9QSZ2DO2xb9i7VKESocj6BppprMPA mK33yKZvkNnfdOIsnL9A49wIMCvOz+vQO13ST6miojNgC4c5iHcuH8+2CTn8NxE7GYeb nO68xe5rxaH30WJmp89Sff2dVG+YD3oCfBR7BteVWEJV/yh91r5FH3XjIXcwy9HiYNv0 eH79Cv/HsXzPSy/RTzW/5zLmbuIZYdT6KMEmHa54gsYmrg0NKiqqi5hKSo8S56N+OIFD PNZp4tBdx5EWMsYwjXkqvFh14Z8KchVZnTULFMBH4hQSeuVAK0ZljYFrWnKOzWDjJil9 L+LQ== 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=hNEOFJA3qECaqXrpJm2EBhk28wiALQ2kw33CEUTdhdg=; b=pVwbZKlvTctBlkp8lz8ODIOGKe2KMhyvNVDjQufJ4QQ2AuvOCYQdzVIHI47b1W9kiM ieiMXXVoLQmhBvUnH5Dzkja4F1m7YjqYwH/gQz9QCXr1J0Jg2AL0KB5aRWrbRms6VwE5 OXaxr8zTmWF5QAmwaMWPgjMC4w9OaZuRWPbVRIU2ZiGGDeoyn49Y5WeSDepbSwSptFRd UvSQs+YkbwiU77XwhwY/bOYwEtalfVncjWDyU8yuvKyVPv3m7hkUXVIoCHxLdFTieGov yfL0Pay4/31Cea46jzmrQ4GBVF0E3hDlffsYSoa8MntS+ORzSSKXtK6awtgTszlxpgjx ZTAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nNXdbbDg; 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 f5-v6si5509508pgm.440.2018.10.02.06.13.40; Tue, 02 Oct 2018 06:13:55 -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=nNXdbbDg; 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 S1728197AbeJBT41 (ORCPT + 99 others); Tue, 2 Oct 2018 15:56:27 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35721 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728109AbeJBT4P (ORCPT ); Tue, 2 Oct 2018 15:56:15 -0400 Received: by mail-wr1-f67.google.com with SMTP id w5-v6so2183356wrt.2 for ; Tue, 02 Oct 2018 06:12:57 -0700 (PDT) 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=hNEOFJA3qECaqXrpJm2EBhk28wiALQ2kw33CEUTdhdg=; b=nNXdbbDg2VNy5SHxXbN+Ptyr1KLwmnSsBGGhJxCoeFHxmaR8fTh5dfCJuPuP2R7XcN 027ftARciHcerS2ELQQ0Z978f0Ec52kSHFCKqN2p00S/HUmL+4/+FNQ+Ee04V1jiecR8 HhckI+hYniaDUvRkL6ovrPKMPRzVpN0yqJRFIQYoJAbvkk98v1trRnIA9bACjz2T0htl sjhh3se+0ylvvlL4j4oFlIEkdCL/ALFEN07VsuQFmvaytb4hkV7XgiiEkG2pDFVbjLFm LQf987ZWYE7Z3lM2zVMpcuPdTXS7FNh6OcL7SSEDcP9l9TyEXua3IFp0e1iBvQrZGJ4M iEJw== 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=hNEOFJA3qECaqXrpJm2EBhk28wiALQ2kw33CEUTdhdg=; b=BU7ookjCaTt+2QFUNYNrirthO/qSJBPRpGhGc0BEjhMKCQQz8YuAYjrguGlDk+GoB5 6ZUO0xGKGjBGarPbVcJj3IQjEhfCtN99RkjyufVAZli9yvBZTWQfQHbJ1WjJIlDBRCS+ UnV0Q5YRJOcR44m8jut6W/8HjH1htW0GAYIGXePKrG7fmvwGXYxOR+Q2hvTeEEUJ9DT4 91+8HrLK9Vru9wm+RxF3NdG9YARmKY3oPJ8hxdFxSH9dmc3JgaO0kqrIDQbC00hs/FF7 86pfFQ3/ggfFWzuta/pFlSvOOaEJgVg3yLwQAfZdffw66nw01XNTaY+hY11zaWy4+L/d jHWA== X-Gm-Message-State: ABuFfoig2LREefn9WRB8hXmNY38vOkKgkpPaBgyusid4EWorAmKEfOzI JK/+SqtRvkBdcOkH7FK99J7m7Q== X-Received: by 2002:adf:9792:: with SMTP id s18-v6mr11253044wrb.283.1538485976256; Tue, 02 Oct 2018 06:12:56 -0700 (PDT) Received: from andreyknvl0.muc.corp.google.com ([2a00:79e0:15:10:84be:a42a:826d:c530]) by smtp.gmail.com with ESMTPSA id v10-v6sm17458681wrp.0.2018.10.02.06.12.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 06:12:55 -0700 (PDT) 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 , 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 , Andrey Konovalov Subject: [PATCH v7 7/8] arm64: update Documentation/arm64/tagged-pointers.txt Date: Tue, 2 Oct 2018 15:12:42 +0200 Message-Id: <47a464307d4df3c0cb65f88d1fe83f9a741dd74b.1538485901.git.andreyknvl@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-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 | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Documentation/arm64/tagged-pointers.txt b/Documentation/arm64/tagged-pointers.txt index a25a99e82bb1..ae877d185fdb 100644 --- a/Documentation/arm64/tagged-pointers.txt +++ b/Documentation/arm64/tagged-pointers.txt @@ -17,13 +17,21 @@ 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. +Some initial work for supporting non-zero address tags passed to the +kernel has been done. As of now, the kernel supports tags in: -This includes, but is not limited to, addresses found in: + - user fault addresses - - 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 + +All other interpretations of userspace memory addresses by the kernel +assume an address tag of 0x00. This includes, but is not limited to, +addresses found in: + + - pointer arguments (including pointers in structures), which describe + virtual memory ranges, passed to memory system calls (mmap, mprotect, + etc.) - the stack pointer (sp), e.g. when interpreting it to deliver a signal, @@ -33,11 +41,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.19.0.605.g01d371f741-goog