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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE351C4332F for ; Mon, 31 Jan 2022 07:57:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 287B86B0074; Mon, 31 Jan 2022 02:57:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 237906B0075; Mon, 31 Jan 2022 02:57:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FFB96B0078; Mon, 31 Jan 2022 02:57:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id F18126B0074 for ; Mon, 31 Jan 2022 02:57:17 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id AA08492771 for ; Mon, 31 Jan 2022 07:57:17 +0000 (UTC) X-FDA: 79089826914.14.2C6F51D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf07.hostedemail.com (Postfix) with ESMTP id 2672940003 for ; Mon, 31 Jan 2022 07:57:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643615836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UKRrxpA5zhfSZiQGv/yx2cUoAnXjZEXW1GA6k9oFz4w=; b=B6+oBc4812BIE+foOlFAs2qiSso6ht4kFUpYJOG2/UjanQ43I0iHvGA41qkeIKnGY65QtG T5T34UBYLg5vJscMMwQUZWR0ujysPD53OQQGRTLUI2m3LhNf6By98mnVfK6clSpVPaYS87 Q8ZjMr2l3P2aWPgd8S5NvWylCbLZSr8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-216-gCx-9PGnMD2a71SWny4wNg-1; Mon, 31 Jan 2022 02:57:13 -0500 X-MC-Unique: gCx-9PGnMD2a71SWny4wNg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 25AD946863; Mon, 31 Jan 2022 07:57:09 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.205]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F63C5F936; Mon, 31 Jan 2022 07:56:47 +0000 (UTC) From: Florian Weimer To: Rick Edgecombe Cc: x86@kernel.org, "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , "H . J . Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V . Shankar" , Dave Martin , Weijiang Yang , "Kirill A . Shutemov" , joao.moreira@intel.com, John Allen , kcc@google.com, eranian@google.com Subject: Re: [PATCH 34/35] x86/cet/shstk: Support wrss for userspace In-Reply-To: <20220130211838.8382-35-rick.p.edgecombe@intel.com> (Rick Edgecombe's message of "Sun, 30 Jan 2022 13:18:37 -0800") References: <20220130211838.8382-1-rick.p.edgecombe@intel.com> <20220130211838.8382-35-rick.p.edgecombe@intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Date: Mon, 31 Jan 2022 08:56:45 +0100 Message-ID: <87wnig8hj6.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=B6+oBc48; spf=none (imf07.hostedemail.com: domain of fweimer@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=fweimer@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspam-User: nil X-Rspamd-Queue-Id: 2672940003 X-Stat-Signature: y5s6kgxfyu73a5z1ym47oknyan5mcrkf X-Rspamd-Server: rspam12 X-HE-Tag: 1643615837-490129 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: * Rick Edgecombe: > For the current shadow stack implementation, shadow stacks contents cannot > be arbitrarily provisioned with data. This property helps apps protect > themselves better, but also restricts any potential apps that may want to > do exotic things at the expense of a little security. > > The x86 shadow stack feature introduces a new instruction, wrss, which > can be enabled to write directly to shadow stack permissioned memory from > userspace. Allow it to get enabled via the prctl interface. Why can't this be turned on unconditionally? Thanks, Florian