Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7064636ybi; Thu, 13 Jun 2019 08:59:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxE601wOWHNIm0w1fKdzAvOiksHxByK1fIBvQJjyHi7O0OAp5rrLEQeLAnKNfFC73jgpLB3 X-Received: by 2002:a63:205b:: with SMTP id r27mr31919069pgm.330.1560441585986; Thu, 13 Jun 2019 08:59:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560441585; cv=none; d=google.com; s=arc-20160816; b=CpXIVgjUsAk1woI4BlJ6XmLiXAZzQED/M7ZLczpchyYnzPWPxS22aJbtGl1IsEX6/y /xcZWrZu4OrWwrIIszduCW8FPZll3NCPKLnzVYgvgEzldhbFdlELyrCx0RJc+F8DojKh pF8gBCUurMHKhFLDauf2L6bFFfpim8Q98PPVhXX3JnftVuMhvGvwZjwDkPTb4o6+OpPe xGaIFa+9HE20izBOqD35IUmxnrEKUYMYt+OOVAWFlol5FALId4SlwUy033Yfu6SQEtAJ ob04aTVK+IdDhry3WKINqGJygIF/03sxTMhmO85YdbCbGec1Cy4Gvwmu+eF9ObE1eujI UpIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NXBR0B0iHgm6Np4eWn/Jhll+jNj1X5ZiicVLyMgmV94=; b=hymWTHmIdghIKPKGSad9saMOz/ihNQADPLv57A3RSvnOWQD0Rg9Jig2nJ3KI5T1Pd3 M6+q0LE+nSPPEp1L73cI7TEo8ZUZ8muWiV0xsF5TfoGv4TmNzDr07+1LqMwoT4uhaxlA 69XlePAWEoi7WIU74hGtn+7RAdjcdKPvxVKL11XZqjSs0eG1tXZ8MyhYFV9/DiYysGvY qWjeg9HeQDdYFJ8xCBAE5tq42nESggh40oJJC6cHfNksNpJ2g6698xOZoG0pbb5xz7t5 Ja6z9QuENJ0/6mimlW2flrtnO2C9mPyZJO6s/C0cWSIzaSjZLqU+Y3pJ3Hk6R4WdH5BV /JxQ== 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 28si101657pgw.188.2019.06.13.08.59.31; Thu, 13 Jun 2019 08:59:45 -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 S2390619AbfFMP60 (ORCPT + 99 others); Thu, 13 Jun 2019 11:58:26 -0400 Received: from foss.arm.com ([217.140.110.172]:44214 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390594AbfFMP6X (ORCPT ); Thu, 13 Jun 2019 11:58:23 -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 D2C10367; Thu, 13 Jun 2019 08:58:22 -0700 (PDT) Received: from C02TF0J2HF1T.local (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 825ED3F246; Thu, 13 Jun 2019 08:58:02 -0700 (PDT) Date: Thu, 13 Jun 2019 16:57:55 +0100 From: Catalin Marinas To: Vincenzo Frascino Cc: Dave Martin , Andrey Konovalov , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, Mark Rutland , Szabolcs Nagy , Will Deacon , Kostya Serebryany , Khalid Aziz , Felix Kuehling , Jacob Bramley , Leon Romanovsky , Christoph Hellwig , Jason Gunthorpe , Evgeniy Stepanov , Kevin Brodsky , Kees Cook , Ruben Ayrapetyan , Ramana Radhakrishnan , Alex Williamson , Mauro Carvalho Chehab , Dmitry Vyukov , Greg Kroah-Hartman , Yishai Hadas , Jens Wiklander , Lee Smith , Alexander Deucher , Andrew Morton , enh , Robin Murphy , Christian Koenig , Luc Van Oostenryck Subject: Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI Message-ID: <20190613155754.GX28951@C02TF0J2HF1T.local> References: <20190613111659.GX28398@e103592.cambridge.arm.com> <20190613153505.GU28951@C02TF0J2HF1T.local> <99cc257d-5e99-922a-fbe7-3bbaf3621e38@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99cc257d-5e99-922a-fbe7-3bbaf3621e38@arm.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 13, 2019 at 04:45:54PM +0100, Vincenzo Frascino wrote: > On 13/06/2019 16:35, Catalin Marinas wrote: > > On Thu, Jun 13, 2019 at 12:16:59PM +0100, Dave P Martin wrote: > >> On Wed, Jun 12, 2019 at 01:43:20PM +0200, Andrey Konovalov wrote: > >>> + > >>> +/* > >>> + * Control the relaxed ABI allowing tagged user addresses into the kernel. > >>> + */ > >>> +static unsigned int tagged_addr_prctl_allowed = 1; > >>> + > >>> +long set_tagged_addr_ctrl(unsigned long arg) > >>> +{ > >>> + if (!tagged_addr_prctl_allowed) > >>> + return -EINVAL; > >> > >> So, tagging can actually be locked on by having a process enable it and > >> then some possibly unrelated process clearing tagged_addr_prctl_allowed. > >> That feels a bit weird. > > > > The problem is that if you disable the ABI globally, lots of > > applications would crash. This sysctl is meant as a way to disable the > > opt-in to the TBI ABI. Another option would be a kernel command line > > option (I'm not keen on a Kconfig option). > > Why you are not keen on a Kconfig option? Because I don't want to rebuild the kernel/reboot just to be able to test how user space handles the ABI opt-in. I'm ok with a Kconfig option to disable this globally in addition to a run-time option (if actually needed, I'm not sure). -- Catalin