Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5937423ybi; Wed, 12 Jun 2019 11:01:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxRLfJwIfEm/zODs3VMqeyMLVLw180ONGLRNv1JN5fym/7kcLlVa5imyGFh72DO3BPl3dT X-Received: by 2002:a63:a044:: with SMTP id u4mr25259233pgn.316.1560362518253; Wed, 12 Jun 2019 11:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362518; cv=none; d=google.com; s=arc-20160816; b=COJILF161SXfeWINOEcfG0NFFkyTSObVJa+vkHS/UExPrtAkK3q1D67n48f3HucaSt YIQrAP1CJTTTlSTDz0QJvrXyOOi4700v+G4utTkE2O4a8iGNFmGIJ14qgs8WrT1JJcXU h/KRYQxDHFPO+wfv5hfCZDmpnC/YbLLiu/gBUfIKY60WAUmGiV+W15WZMQgZ+KzCJ0q6 DRx12ZnjP6WMBNGhWKgK9mcqobVtDGBd6nqOuNqf+43PnvECSYPcuekBFv08RgVexkQd gIl9CSix+FdanoGCrOI8gZSScqGBNX9rzcrvXrGViuaeiO8VWw+90YrNpAoPBtVrzllJ 3CWg== 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; bh=tQFkzsOty+X8TGYi9xgy4TjcwpTRqaHm7A8KtqJjorU=; b=N2mnMyn2EHmwl/z7fRe0wR1N0FCx5Vf19BTZkEF/2qSxHwUXVbKrw44cl0aKldvxqv IZK+CjaTDlF946r+1LwEG5TJ7Q+S4sR6bkrHEQInTxBxpWiHfzug+NjW7A+Z4Wyqad0k FpsnT0ohK8U3KU0NSeObcrOnG+VA4P/dq0zbyc4b8kxGvZb5vpG3NxSNV/5q6ZL4YsIK ge3zZea3nv4kxtfgQzeJk+b/6EiA99fxs/mk3KBX51DS/jMetMiPbrnCxGBsSRFzlQ3q K6CCeVIbhnXhhZMpQNPoG2R5y8AGg0p1Sp03+qEUi55+RXMOBOYz1OIThKf6faQ1J9W+ uOrA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11si400735pfn.188.2019.06.12.11.01.43; Wed, 12 Jun 2019 11:01:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409279AbfFLOV1 (ORCPT + 99 others); Wed, 12 Jun 2019 10:21:27 -0400 Received: from foss.arm.com ([217.140.110.172]:53910 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409269AbfFLOV0 (ORCPT ); Wed, 12 Jun 2019 10:21:26 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D86152B; Wed, 12 Jun 2019 07:21:25 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D4B33F557; Wed, 12 Jun 2019 07:21:24 -0700 (PDT) From: Vincenzo Frascino To: 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: Catalin Marinas , Will Deacon , Andrey Konovalov , Alexander Viro Subject: [PATCH v4 0/2] arm64 relaxed ABI Date: Wed, 12 Jun 2019 15:21:09 +0100 Message-Id: <20190612142111.28161-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.21.0 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 On arm64 the TCR_EL1.TBI0 bit has been always enabled on the arm64 kernel, hence the userspace (EL0) is allowed to set a non-zero value in the top byte but the resulting pointers are not allowed at the user-kernel syscall ABI boundary. This patchset proposes a relaxation of the ABI with which it is possible to pass tagged tagged pointers to the syscalls, when these pointers are in memory ranges obtained as described in tagged-address-abi.txt contained in this patch series. Since it is not desirable to relax the ABI to allow tagged user addresses into the kernel indiscriminately, this patchset documents a new sysctl interface (/proc/sys/abi/tagged_addr) that is used to prevent the applications from enabling the relaxed ABI and a new prctl() interface that can be used to enable or disable the relaxed ABI. This patchset should be merged together with [1]. [1] https://patchwork.kernel.org/cover/10674351/ Cc: Catalin Marinas Cc: Will Deacon CC: Andrey Konovalov CC: Alexander Viro Signed-off-by: Vincenzo Frascino Vincenzo Frascino (2): arm64: Define Documentation/arm64/tagged-address-abi.txt arm64: Relax Documentation/arm64/tagged-pointers.txt Documentation/arm64/tagged-address-abi.txt | 111 +++++++++++++++++++++ Documentation/arm64/tagged-pointers.txt | 23 +++-- 2 files changed, 127 insertions(+), 7 deletions(-) create mode 100644 Documentation/arm64/tagged-address-abi.txt -- 2.21.0