Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp649436pxb; Tue, 1 Feb 2022 07:40:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8kUB/b7evWaOXB4ViCPP7A25TW/Ad9nvOhyy4tOC71hJDMNYCp8y8BspOwHTNSOZjVmaI X-Received: by 2002:a05:6402:1c95:: with SMTP id cy21mr25896903edb.170.1643730038040; Tue, 01 Feb 2022 07:40:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643730038; cv=none; d=google.com; s=arc-20160816; b=c8xVWK9WpobgiBW9ou6VhiYoxVwyrT8paWGeJuHAw19JDVTpNiBjckWIl4wT86VSJQ Dn7GFMt/nwSBdYamoHmChiXrmGvqpYOmhiEtdp+B5E5spNwENZQ9QVC49W936JezhXgx EgdhJwsPMKtdLIUI/cXmI3TgWRfP0bL5UgdB57goSThpmPYyyU373slg4uim5gvGeB4T MbVrpyPLJRmuP4yQ3oM2TWydwDZF3UsLZB9J6JKOQdqjq8/6MlhhAp89ttjCZugFMXp8 7T3ox0V4Ph97oLdLezIS0ClrkGaJwC4Lg0xAzEzy49SZ5/70cACG5VCJzAiztXJ63bEA C95g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=UKRrxpA5zhfSZiQGv/yx2cUoAnXjZEXW1GA6k9oFz4w=; b=0X/vi2J8Bqj+XSCiPSFTyIVX62/VvvM/ucP/5U0e7Q1r8VyeK8TQgHourbBSr/Ny1B FvBT1wVV8dkXlXIzlTLkg0okSbre8r+3ygC7wmH0oUKwHz3bwiMkEqN1TNIyVWQeP5ZK JdYpt+kAhRyRF8HJZ5d6mMIelSkhFrvRob2YuTeRu1DKXFk2y6h7x+dzgz7gaWngzU9T 0nIJZt8UkwWoJPnw2mroRjR6C+5ttu7MDKPTXM16iT75wO+hbjixkHgP1qCUe1PNeaLv mdfkTIEyweL8sm9KkG5nnr5Nap8q5poFmZuCqgj9ijJPM4W0+e2Q5TdjkFujzh8f5cVY B1/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B6+oBc48; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb22si10360650ejc.439.2022.02.01.07.40.12; Tue, 01 Feb 2022 07:40:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B6+oBc48; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238456AbiAaH5T (ORCPT + 99 others); Mon, 31 Jan 2022 02:57:19 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:33319 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240146AbiAaH5R (ORCPT ); Mon, 31 Jan 2022 02:57:17 -0500 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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