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: 10623637 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 33C4514BD for ; Tue, 2 Oct 2018 13:13:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 276E828900 for ; Tue, 2 Oct 2018 13:13:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B0AD28908; Tue, 2 Oct 2018 13:13:11 +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=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D8E9288FC for ; Tue, 2 Oct 2018 13:13:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728020AbeJBT4P (ORCPT ); Tue, 2 Oct 2018 15:56:15 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37479 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727974AbeJBT4O (ORCPT ); Tue, 2 Oct 2018 15:56:14 -0400 Received: by mail-wr1-f68.google.com with SMTP id u12-v6so2173399wrr.4 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=ApxVT6WQ1crhzCC/RTyIT++kA8mFGQmn0UpUyy6QqUKx+gcSwlYmA+v6ig00tryLwp mH2qnlzF0JhKQXcJ291Io3CNwUz7gKIP9ov4SocXUITDNGhQtcHqdtI21OgQ354Vtui9 VqY3nCw5JSYVNWJSKYtFyNMFOL6EruFq6moa+SsQ+yBtZfI9btaWki4RmrX4rvvLPHU6 0IZSqfVEr4sCDXmLAXHk/EFIX/AQNgojgZJ0oopx8Zy8q51Eb0wOQKIm2AsHIcjzF8eH CPeAopiW4kdnfxcDqLsryUT9oYVQbspQ2ju7U4jN/nMOOCKqHDco4e0LTj3u8CuCmFSH AAbQ== X-Gm-Message-State: ABuFfoilS66H5GJoysuFH4oOKXUh4akXW9DsFpBcn4DBYI1Fg5Xp+Uen Ap0KQw7powRMe036B2ScijeZHw== 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 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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