From patchwork Tue Oct 2 13:12:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 10623641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E399814BD for ; Tue, 2 Oct 2018 13:13:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D83922846C for ; Tue, 2 Oct 2018 13:13:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC29D28908; Tue, 2 Oct 2018 13:13:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AEBC288D2 for ; Tue, 2 Oct 2018 13:13:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A9F9E6B026A; Tue, 2 Oct 2018 09:12:58 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A29DD6B026B; Tue, 2 Oct 2018 09:12:58 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 85AA06B026C; Tue, 2 Oct 2018 09:12:58 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by kanga.kvack.org (Postfix) with ESMTP id 16D356B026A for ; Tue, 2 Oct 2018 09:12:58 -0400 (EDT) Received: by mail-wr1-f72.google.com with SMTP id d16-v6so1543289wrr.17 for ; Tue, 02 Oct 2018 06:12:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=hNEOFJA3qECaqXrpJm2EBhk28wiALQ2kw33CEUTdhdg=; b=FrQzGeZreEDcNpGiRY4uyncpIeY8Kz9Oy6Jxcdwuk3/LpELrkIsOzQgFikHzl2h0P0 ot2KeYCiLflru8E2bEEJyJ9EHrOxK6ru/KK/R20o5fUrQ6E556YXgfZ/FrrmjIJGQLoE wRIDCnBNXQehUOFLPBFsyI6OGj2BlRFxT8TUnrUKLTIWeGchRW1UDGZ329Xvts7bAjWg j59xzgR5LgQk/1z9aCi1IPJYEfaZSrU32/Uh+pRNKmWSNhPCVIrrfcUlTaysIg7J2lFi XbiS/exdkVJDZoNL4dmyZMCvww3C9Ngxko3w0d7ihV7NKh3+MJI17rSpfIkFYZFcyzaK fRjw== X-Gm-Message-State: ABuFfoh7fc6jY3+eitjnEAiHwGol5g6yoFe3eOUGSiT2eZoioAo92kgG 2Mxd8akO3TE99VivT1z6HKXFXAvu8fNtEx1NptiPl8DGZ4b8ySwQCe3IBSc2V5EracMKevwVwsx nnRp6u4iCphCo1yfb62umO4LtrVV1uplP8/1SY6h/j4Jpt+aUp72ModocP79zSv5pM/ShaPuS4n BoOOJwb9CvOS9rySd+BGU4vZ+c37n1wnk8myFkRUxqwYqOHcPfw/FPjbzBQhV1u6AIdQbIihw9o 1D6RvDZkGsGFBro9Ue7rY5elXeHLMVKnC29BdOcOVQ9sXdAl7oDs/f0kXK2bHrZHYRBkY+lZF4J 3PJFTdpw5BC78RpXnzmfo1XTu2LbnP83hIxdfT7vlbazPYlunFP9cq/2QVQQQS6cEuTd6A1VfES k X-Received: by 2002:adf:81b5:: with SMTP id 50-v6mr9809011wra.10.1538485977531; Tue, 02 Oct 2018 06:12:57 -0700 (PDT) X-Received: by 2002:adf:81b5:: with SMTP id 50-v6mr9808959wra.10.1538485976663; Tue, 02 Oct 2018 06:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538485976; cv=none; d=google.com; s=arc-20160816; b=gRtOq+5OeHEVLwmgcksPitPAEwfPj2rqrfUlIytCh8efWc/uF2dWVj5UDGU/dltmCG XfXT1LqkGWEyxa6O2fjOgLf5u/Ty/UVmEwF+HP4bbZzlM0VK9Wl+LPnDpWP/SbGyP2vS DTCl9sGVLP43cvphd6cW13DVO3e7+AS+VG/wNmCwPCtwsgTv3IkIiaUiP3nGcHebTJBl 4N1I6rSV79fK4nBPe0YEwsgNqCgUEI700hwNOsCQPJQxWHtFspfDQF7Hc91rhtCUaQfX uI2GQiDwAJLqy/HpkwfvRXJt6BQEq0zbAGAbrDHipZiv0rFYQL/rNtXHk3Uv3Wke1ywc g1Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hNEOFJA3qECaqXrpJm2EBhk28wiALQ2kw33CEUTdhdg=; b=g+8zx/txbRP6Na/WXEKMo3gjZMX01YXi72+dTqSq1RxNsuOKP7M2tpb5EGeszwikb1 S5Md2Z9h3qSZAG3U12ic7t7vPPz8c6jm7Eja7pzN/a0JbWOO4rc9wVt/HkQaX9PkupYu kQV8vKaAgGMOQSBSxGFt9tmav657Al/suTTlgRJHXNugT75ln6dT3r7gFJguadHBIdUA SGZaPqmLdf8siIkgGivompeRHC00ITypWYIUAIrMiyxEcPR+iUwY25LWbYBZbb+3GXsG 0cv3ZmUIy3sruCIWP8GaiMuXX2xeD0ToTR5Y65QPanCtMdxluj+MPXL9nS41A0yazeB/ kbXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nNXdbbDg; spf=pass (google.com: domain of andreyknvl@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=andreyknvl@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id v12-v6sor10599692wrc.47.2018.10.02.06.12.56 for (Google Transport Security); Tue, 02 Oct 2018 06:12:56 -0700 (PDT) Received-SPF: pass (google.com: domain of andreyknvl@google.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nNXdbbDg; spf=pass (google.com: domain of andreyknvl@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=andreyknvl@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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-Smtp-Source: ACcGV62jbjfhc53LoCFPGDSIPFzkIzlh2/mWrosWETT93RgqVUF8Im7cl/cWkkH9GjoPBnJtS3XIfQ== 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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