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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC96BC43334 for ; Fri, 10 Jun 2022 18:04:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347503AbiFJSEu (ORCPT ); Fri, 10 Jun 2022 14:04:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347141AbiFJSEr (ORCPT ); Fri, 10 Jun 2022 14:04:47 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65E81DF5E for ; Fri, 10 Jun 2022 11:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654884286; x=1686420286; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=8eNvZWqD4YWYW659R4S17U2jKOE9xtXav0016+fJ7Ug=; b=U5QF+Hi9EIFZ1uPrSCZmNb/MLvGQGNknviN+ZzxT0/0m3YcrLy59UaYC q0j1UPE5S0111YWwfdlrAmrOTCWoOorFs/Us+q1g9ZXv7Neo9cakgVEZz 4+Li2uhhPPqVjqSlRqeBT7Gx6dXuuKmhp/PELtGoWmOf3xzPercCmaYgc hfqEK8JNmT0FbJHBdiRad2wwavrOur7/0MWWbTZxkercssgw1CgoB5+5j ufq4I1TTpGZkW5scKuZ2PwMHJBx1I2fYyKG1BU/nmH2ZWujG4dAq1kY9w whRuH2ctNy342qxmnbpizNtaxFTk+YTSg+fkG/9xqFUuqhlVDltY63WaQ Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10374"; a="275231581" X-IronPort-AV: E=Sophos;i="5.91,291,1647327600"; d="scan'208";a="275231581" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 11:04:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,291,1647327600"; d="scan'208";a="760612018" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 10 Jun 2022 11:04:42 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id E1A0AF8; Fri, 10 Jun 2022 21:04:45 +0300 (EEST) Date: Fri, 10 Jun 2022 21:04:45 +0300 From: "Kirill A. Shutemov" To: "Edgecombe, Rick P" Cc: "peterz@infradead.org" , "Lutomirski, Andy" , "dave.hansen@linux.intel.com" , "linux-kernel@vger.kernel.org" , "hjl.tools@gmail.com" , "linux-mm@kvack.org" , "kcc@google.com" , "andreyknvl@gmail.com" , "ak@linux.intel.com" , "dvyukov@google.com" , "x86@kernel.org" , "ryabinin.a.a@gmail.com" , "glider@google.com" Subject: Re: [PATCHv3 6/8] x86/mm: Provide ARCH_GET_UNTAG_MASK and ARCH_ENABLE_TAGGED_ADDR Message-ID: <20220610180445.fmzgrobscwrblxud@black.fi.intel.com> References: <20220610143527.22974-1-kirill.shutemov@linux.intel.com> <20220610143527.22974-7-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 10, 2022 at 03:25:02PM +0000, Edgecombe, Rick P wrote: > On Fri, 2022-06-10 at 17:35 +0300, Kirill A. Shutemov wrote: > > +static int prctl_enable_tagged_addr(unsigned long nr_bits) > > +{ > > + struct mm_struct *mm = current->mm; > > do_arch_prctl_64() can be called via ptrace. I think you need to > operate on the mm of 'task', or just block the operation if task != > current. Hm. True. Let's see if the interface in general good enough. Ouch. I just noticied that I missed check for LAM feature :/ -- Kirill A. Shutemov