From patchwork Fri Apr 23 17:51:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 12221201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 547A8C433B4 for ; Fri, 23 Apr 2021 17:53:40 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EFDB561445 for ; Fri, 23 Apr 2021 17:53:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFDB561445 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=GVISkxpcoXnJkzFlkQylYzjrxFDXEPHifnoKpwVLU2M=; b=VvOmeP1DqFZwvF6cgMLgM2zzKN lmQwIDnqR6+KNXPtWp9pX2d9cZJCgmI4VtUWowVZJ8LfTZvjKoDUVPIJb9D/VN0BjUlI4ABw2B5rR hrpKFcAefCb4Xaeque6JztScndzI70H/WUGValac/bJ2prLg3p7UzFTLBiCWVZlcb1ZhHMat6809A fwLHfnbtokJrKS+Y1TtgiHLvPdPwGGhA92qVNPgeBtkZTt+m/oAGag6F6hU5yykS9ztRWJ92Pg/k3 bDCxEFCspd5RpbXBl3L1g8mxiOUzvKGlKxubJ+3fvMiOMy+sic3ohSeNfr/gjjH4oothIYfqZsN5u hEzflNug==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZzy7-0023rU-A2; Fri, 23 Apr 2021 17:51:55 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZzy2-0023qr-Hm for linux-arm-kernel@desiato.infradead.org; Fri, 23 Apr 2021 17:51:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=pRMUxuRmz7SANkbuSDbhdSjO5hY0wOip9+SiJvfCpTs=; b=b9n9g/LzT6PGmwuv7WQJQF4dmm WiohiF4GyknSHaFXAarFAfxIHOyPdz66q+jmuL0pG9CUY+5CbfPhh72IA2DbzcwdXdcaXj+UgKRM3 YEDQ/3Rj5rXHE1vV1FQe6aR0w+hE5nHQ/gjfBHo32MengUcJJyLdBlkPLPFuaTL2/gKGDcxEDAUTE 0OF+j1dHIDIgcbqV5egH5B7XqEvI7tnEIQzvgw//QHHe1KU5dAUkVljJ0aZQs+9RV0vFW4XBb/r6S Ihl5K6LJd8oLpgZDg9qeYrkY5EPrzCTXlaZ+XIFpVvpRZYRcdKiLArJBSaqBFgNBVBRhwFHoYgrdk tH4HL0ug==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZzxz-00EbRD-4S for linux-arm-kernel@lists.infradead.org; Fri, 23 Apr 2021 17:51:48 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id ADF1E611CD; Fri, 23 Apr 2021 17:51:45 +0000 (UTC) From: Catalin Marinas To: linux-arm-kernel@lists.infradead.org Cc: Peter Maydell , Will Deacon , Vincenzo Frascino Subject: [PATCH] arm64: doc: Add brk/mmap/mremap() to the Tagged Address ABI Exceptions Date: Fri, 23 Apr 2021 18:51:34 +0100 Message-Id: <20210423175134.14838-1-catalin.marinas@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210423_105147_225236_D7FDD3DB X-CRM114-Status: UNSURE ( 8.58 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Prior to commit dcde237319e6 ("mm: Avoid creating virtual address aliases in brk()/mmap()/mremap()"), the kernel allowed tagged addresses to be passed to the brk/mmap/mremap() syscalls. This relaxation was tightened in 5.6 (backported to stable 5.4) but the tagged-address-abi.rst document was only partially updated. Signed-off-by: Catalin Marinas Fixes: dcde237319e6 ("mm: Avoid creating virtual address aliases in brk()/mmap()/mremap()") Reported-by: Peter Maydell Cc: Will Deacon Cc: Vincenzo Frascino --- Documentation/arm64/tagged-address-abi.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/arm64/tagged-address-abi.rst b/Documentation/arm64/tagged-address-abi.rst index cbc4d4500241..459e6b66ff68 100644 --- a/Documentation/arm64/tagged-address-abi.rst +++ b/Documentation/arm64/tagged-address-abi.rst @@ -113,6 +113,12 @@ ABI relaxation: - ``shmat()`` and ``shmdt()``. +- ``brk()`` (since kernel v5.6). + +- ``mmap()`` (since kernel v5.6). + +- ``mremap()``, the ``new_address`` argument (since kernel v5.6). + Any attempt to use non-zero tagged pointers may result in an error code being returned, a (fatal) signal being raised, or other modes of failure.