From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_NEOMUTT 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 1AD27C282DD for ; Thu, 23 May 2019 17:00:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E29D42075B for ; Thu, 23 May 2019 17:00:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vCsN2qPP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E29D42075B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YSCWhceJ2Wmu8ID/GRvdacSGsDCwIYF8TDSCACsJTpw=; b=vCsN2qPPX8Ocva 8APkXdB0RaaazCtBECap2wfbu5juPam5WuIkr3P40iDrttm1ibYqShCFy+4rqwIosxHB7O6zrcE+N S/ssXVGHtpXGoQxNSG4sNMFr6oXnbEtbpnoKLgBovFWh0fC3pERmbOvlVUsdGWI3ljmb1KyqjrzCS 86O+qUCt+sWPpU/aCTRC/u6kNUdOTRW7ZRtECPZbQoqiqBiX8MnlW3yiXuIJ2CRQ0i0wFKNckIzh3 EWPCW6YsEwTdfB/krfUMtebdxgdvgsvoArabQm6XAUBhnGSymD+5Bseki9zWFSC+fyPAJEhzVwt1o 9LloLKTaItAOP3ASVdpA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTr56-0004bK-Su; Thu, 23 May 2019 17:00:40 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTr52-0004Zv-Ug for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2019 17:00:38 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3B21C374; Thu, 23 May 2019 10:00:36 -0700 (PDT) Received: from mbp (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DF1633F5AF; Thu, 23 May 2019 10:00:29 -0700 (PDT) Date: Thu, 23 May 2019 18:00:27 +0100 From: Catalin Marinas To: enh Subject: Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel Message-ID: <20190523170026.nso2me5qnrrjbrdr@mbp> References: <20190517144931.GA56186@arrakis.emea.arm.com> <20190521182932.sm4vxweuwo5ermyd@mbp> <201905211633.6C0BF0C2@keescook> <20190522101110.m2stmpaj7seezveq@mbp> <20190522163527.rnnc6t4tll7tk5zw@mbp> <201905221316.865581CF@keescook> <20190523144449.waam2mkyzhjpqpur@mbp> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190523_100037_000902_1AEFDF29 X-CRM114-Status: GOOD ( 20.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , kvm@vger.kernel.org, Szabolcs Nagy , Will Deacon , dri-devel@lists.freedesktop.org, Linux Memory Management List , Khalid Aziz , "open list:KERNEL SELFTEST FRAMEWORK" , Vincenzo Frascino , Jacob Bramley , Leon Romanovsky , linux-rdma@vger.kernel.org, amd-gfx@lists.freedesktop.org, Dmitry Vyukov , Dave Martin , Evgenii Stepanov , linux-media@vger.kernel.org, Kevin Brodsky , Kees Cook , Ruben Ayrapetyan , Andrey Konovalov , Ramana Radhakrishnan , Alex Williamson , Yishai Hadas , Mauro Carvalho Chehab , Linux ARM , Kostya Serebryany , Greg Kroah-Hartman , Felix Kuehling , LKML , Jens Wiklander , Lee Smith , Alexander Deucher , Andrew Morton , Robin Murphy , Christian Koenig , Luc Van Oostenryck Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 23, 2019 at 08:44:12AM -0700, enh wrote: > On Thu, May 23, 2019 at 7:45 AM Catalin Marinas wrote: > > On Wed, May 22, 2019 at 01:47:36PM -0700, Kees Cook wrote: > > > For userspace, how would a future binary choose TBI over MTE? If it's > > > a library issue, we can't use an ELF bit, since the choice may be > > > "late" after ELF load (this implies the need for a prctl().) If it's > > > binary-only ("built with HWKASan") then an ELF bit seems sufficient. > > > And without the marking, I'd expect the kernel to enforce MTE when > > > there are high bits. > > > > The current plan is that a future binary issues a prctl(), after > > checking the HWCAP_MTE bit (as I replied to Elliot, the MTE instructions > > are not in the current NOP space). I'd expect this to be done by the > > libc or dynamic loader under the assumption that the binaries it loads > > do _not_ use the top pointer byte for anything else. > > yeah, it sounds like to support hwasan and MTE, the dynamic linker > will need to not use either itself. > > > With hwasan compiled objects this gets more confusing (any ELF note > > to identify them?). > > no, at the moment code that wants to know checks for the presence of > __hwasan_init. (and bionic doesn't actually look at any ELF notes > right now.) but we can always add something if we need to. It's a userspace decision to make. In the kernel, we are proposing that bionic calls a prctl() to enable MTE explicitly. It could first check for the presence of __hwasan_init. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel