Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3753937rwb; Mon, 3 Oct 2022 21:47:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ArTAuwOQuLxNbfXUUSfS6sfShq1Sdy+8pBxTqtGgXZ0N5s5iulFW8c8CRyZBGnDsJiElF X-Received: by 2002:a17:906:846a:b0:78c:21c4:e94c with SMTP id hx10-20020a170906846a00b0078c21c4e94cmr4946321ejc.221.1664858847021; Mon, 03 Oct 2022 21:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664858847; cv=none; d=google.com; s=arc-20160816; b=XQxYeBO/aglw2Sdkf1haZDJlCtz7axRHkxK/zCx9HMQwXwS1sxG2/PMmnEypvTBGWg L3BgBaR706zHyUwzRBaAa2F/+RDTHrpkwRvZDfH1yRwqwXC5R5wA6KCBTdDZFt2/v6wo PfMuCSPZVIyB6LY1XYsnF4rS4kGX944Wn53m5DHUzalhvftdqzWLBx+I0aqcnz7CoPw7 pzQVruKvVJE9QCbSi7PsaWN1FHwerwWCjthV3bdpuGwOe6hUj9xUhVsEOyBfBvNZTisu Ts7zsY5W7Q5cg4JYlMESqrqkHSdh4G9xbvs1eyYhejw3okxWv/dMom44rM9gBQcH+SI0 YZ5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xlDrlQKwusKzG3w+2ZOP4CcXq+zZWkgG9x1cLqQziDo=; b=bIpe8a8dxP5vtSc1RQYuol/S7lNOYVK/o+JZ5Um190u22EGGH7LAHoRmZgziworRpb I62Zq/+LqbN7Z4kYPQrdnZhqTV7xeDwf/znz4a9OgzGYMALESKl6KXbDN/zcbD5UyNi5 ktg/HGCdPTcXCjooVFRLtWUQd+qAYJ3Eo8gvHWoPlmezW3eg/c25MqHaHB070gZPKVbH F28PD/aBRdUQWNUTtZEoHJLW8Oa0ekYdFm+bYI8zUuuaT0zzD6gyZHpLRDI+Vn/mH5Zm gIpFJylKnxmLiFXPSIuS14J0Th74jw9lPVZQ9Nj/u0qF0GNRYif8/pXvX513zFxBmyHG ds+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="odgDB/DE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s15-20020a056402520f00b00442785a4226si11710836edd.258.2022.10.03.21.46.44; Mon, 03 Oct 2022 21:47:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="odgDB/DE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229436AbiJDEhN (ORCPT + 99 others); Tue, 4 Oct 2022 00:37:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbiJDEhL (ORCPT ); Tue, 4 Oct 2022 00:37:11 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0BDD2F64C for ; Mon, 3 Oct 2022 21:37:08 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id e11-20020a17090a77cb00b00205edbfd646so17538558pjs.1 for ; Mon, 03 Oct 2022 21:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=xlDrlQKwusKzG3w+2ZOP4CcXq+zZWkgG9x1cLqQziDo=; b=odgDB/DEuXgA+WrZz6TjnUf48uHEz6xVUowwFk90ZSRmN0rDQA5zML6bpuOD7X7GF8 /KZHdaswo+8JuDe3Csmn4YdnRd9hgamqnyxLBtwUZ56B68ah76aL6kvE8q0HmB6tVB8W HxbwTxJamv43wu8rKK9RpxGA1mUjcURvDFA0U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=xlDrlQKwusKzG3w+2ZOP4CcXq+zZWkgG9x1cLqQziDo=; b=nyQXmPS4J7kBnM4bbELftdaszeQXu2AgIk2L/SQTbC59IQel/xuuVK7iKIcJpJRydU cczm+twwu3XP4FJFPhPNQH26bNHD8/G9fNv3gzzjIZDJcJUk0P9PKauy0a8xxuUxva9n XM/ENraaAGz0xgGa8z0qjLlVaZxAZpmeg0G6dQgURPznXUZFdULthDvszpmZ1W/iPHoc oHSIHmjz0OiSxHSOPM9kxlsa7xMwVRRaJYw40SYCGw1mDE2yAT4yZOYA5mwUVrVWIU5m SynYJpYk/kSkpl3ot5pq+HKhYlrz5dlubYqDCVloSZ/T9O2w0Ajb6CpQcsCTt0gTpmVG qLow== X-Gm-Message-State: ACrzQf00l0DQwywTyMr5jNzn+4JCSDmeHl0cDZf6S6bg++ZMp3BfLjHI RE6QzZIAxlhn2o30fpEicC3msg== X-Received: by 2002:a17:90b:4a50:b0:203:1204:5bc4 with SMTP id lb16-20020a17090b4a5000b0020312045bc4mr15770725pjb.79.1664858228262; Mon, 03 Oct 2022 21:37:08 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q5-20020a17090a4f8500b001fbb0f0b00fsm10907573pjh.35.2022.10.03.21.37.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 21:37:07 -0700 (PDT) Date: Mon, 3 Oct 2022 21:37:06 -0700 From: Kees Cook To: Andy Lutomirski Cc: Rick Edgecombe , 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 , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H . J . Lu" , Jann Horn , Jonathan Corbet , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V . Shankar" , Weijiang Yang , "Kirill A . Shutemov" , joao.moreira@intel.com, John Allen , kcc@google.com, eranian@google.com, rppt@kernel.org, jamorris@linux.microsoft.com, dethoma@microsoft.com Subject: Re: [PATCH v2 29/39] x86/cet/shstk: Support wrss for userspace Message-ID: <202210032129.44F6E027D@keescook> References: <20220929222936.14584-1-rick.p.edgecombe@intel.com> <20220929222936.14584-30-rick.p.edgecombe@intel.com> <202210031525.78F3FA8@keescook> <6ea0841f-5086-9569-028b-922ec01a9196@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ea0841f-5086-9569-028b-922ec01a9196@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 03, 2022 at 04:00:36PM -0700, Andy Lutomirski wrote: > On 10/3/22 15:28, Kees Cook wrote: > > On Thu, Sep 29, 2022 at 03:29:26PM -0700, Rick Edgecombe wrote: > > > For the current shadow stack implementation, shadow stacks contents easily > > > be arbitrarily provisioned with data. > > > > I can't parse this sentence. > > > > > 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. > > > > Is anything using this right now? Wouldn't thing be safer without WRSS? > > (Why can't we skip this patch?) > > > > So that people don't write programs that need either (shstk off) or (shstk > on and WRSS on) and crash or otherwise fail on kernels that support shstk > but don't support WRSS, perhaps? Right, yes. I meant more "what programs currently need WRSS to operate under shstk? (And what is it that they are doing that needs it?)" All is see currently is compiler self-tests and emulators using it? https://codesearch.debian.net/search?q=%5Cb%28wrss%7CWRSS%29%5Cb&literal=0&perpkg=1 -- Kees Cook