Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1157155rwd; Tue, 13 Jun 2023 05:47:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4rG1zGYIGHBa/DHwBf3A/xxhVT7lizUb3XKKBSxGW3DPYK4E8/TMaROtaxb/r4DhAxhxU3 X-Received: by 2002:a05:6a20:6a26:b0:10b:60c1:2999 with SMTP id p38-20020a056a206a2600b0010b60c12999mr15662248pzk.22.1686660451259; Tue, 13 Jun 2023 05:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686660451; cv=none; d=google.com; s=arc-20160816; b=sQkqFIfqLtzzBPU1rYYsi9wXYS6MZjXk1cK2GZzhR+eLCsHNmDmS0fK2hxnBVXy64E y0BwlPCBTMcFEDNYoMU0Y1J/j9zL8CSrUdDZ7H/9lR1zM+zPnknoltkV9iEP/Honye9K p/Nb6QGFlM8ljx7/gEY+eMhWHSTwpWw+7C84gsxIfTjom88+XfhgnYx55QnxbbxAAjH3 YTP+kWXbpFnxikWLVVWRQmDfV0gLo8DxjqaTeqV/rSSmGOTpySdF3SdhzsYMWkMXeqfw NSguNc/mGwFQAxhj53Ym5KDLyFjW2mODswOG50TTii6mmmzVjdWPNMc39UWbOD64wgQP 1ZSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=+b1T4bP+M0GcWXoHUW/q06urYQjMJ7X0Y1cHVDwah1s=; b=dEWEuk8ZNQObmBvDKjBf9FHAI/pIiKK5Hk+MwzRRXvflOxAtXIG3jr7blNqNRi3LDB y4UMbtPiXobIGxChTjE9P2T4fsyrGAIZn2rz4RVzHQ4keo/ubFM3Jj0pyzfthpf6H+UH SDa8JYCot4/VxkeIxaSZVz228Igf6HpuESHwOP/e1g0ensUOYH7TyiHterwvAuShlgvy KTj1Q2MHTvQJ18agdI0Hwq7rfYtgwLXdgNPDX9N+pORPUY/8UGEN7isG61sB8zLoo27y NOIvzPO2ftOTsfak384ehey0OL8bJp9JOntMjU9Yh+5LeZcHxeqVEMn/P2vPnPckv8a9 e11A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gpUUxddf; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c145-20020a624e97000000b0063b731e3938si8488684pfb.2.2023.06.13.05.46.57; Tue, 13 Jun 2023 05:47:31 -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=@redhat.com header.s=mimecast20190719 header.b=gpUUxddf; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242206AbjFMMiX (ORCPT + 99 others); Tue, 13 Jun 2023 08:38:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232792AbjFMMiV (ORCPT ); Tue, 13 Jun 2023 08:38:21 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11C1812A for ; Tue, 13 Jun 2023 05:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686659858; 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=+b1T4bP+M0GcWXoHUW/q06urYQjMJ7X0Y1cHVDwah1s=; b=gpUUxddf2NnZn0IZyrcfulF45IEm/BIWhnBMXIODulcJvmVN8G5G3g2e4SRmxuQXoORZQq YirEXd2dH34gnenBsVbS36Y0McjAOLtKf/2kpRClMGIIxqS74516CLzfC2X9Bidx+wj/vI 1ldWj0XEpL5IwGD5ijT5rYRnym92Gts= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-505-NQoKV6qBNHuOgzR9uwg-rw-1; Tue, 13 Jun 2023 08:37:31 -0400 X-MC-Unique: NQoKV6qBNHuOgzR9uwg-rw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A8B3185A5BA; Tue, 13 Jun 2023 12:37:27 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 652C41121315; Tue, 13 Jun 2023 12:37:20 +0000 (UTC) From: Florian Weimer To: Mark Brown 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 , 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 , Weijiang Yang , "Kirill A . Shutemov" , John Allen , kcc@google.com, eranian@google.com, rppt@kernel.org, jamorris@linux.microsoft.com, dethoma@microsoft.com, akpm@linux-foundation.org, Andrew.Cooper3@citrix.com, christina.schimpe@intel.com, david@redhat.com, debug@rivosinc.com, szabolcs.nagy@arm.com, torvalds@linux-foundation.org, Yu-cheng Yu , Pengfei Xu Subject: Re: [PATCH v9 23/42] Documentation/x86: Add CET shadow stack description References: <20230613001108.3040476-1-rick.p.edgecombe@intel.com> <20230613001108.3040476-24-rick.p.edgecombe@intel.com> <0b7cae2a-ae5b-40d8-9ae7-10aea5a57fd6@sirena.org.uk> Date: Tue, 13 Jun 2023 14:37:18 +0200 In-Reply-To: <0b7cae2a-ae5b-40d8-9ae7-10aea5a57fd6@sirena.org.uk> (Mark Brown's message of "Tue, 13 Jun 2023 12:55:48 +0100") Message-ID: <87y1knh729.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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_NONE,T_SCC_BODY_TEXT_LINE 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 * Mark Brown: > On Mon, Jun 12, 2023 at 05:10:49PM -0700, Rick Edgecombe wrote: > >> +Enabling arch_prctl()'s >> +======================= >> + >> +Elf features should be enabled by the loader using the below arch_prctl's. They >> +are only supported in 64 bit user applications. These operate on the features >> +on a per-thread basis. The enablement status is inherited on clone, so if the >> +feature is enabled on the first thread, it will propagate to all the thread's >> +in an app. > > I appreciate it's very late in the development of this series but given > that there are very similar features on both arm64 and riscv would it > make sense to make these just regular prctl()s, arch_prctl() isn't used > on other architectures and it'd reduce the amount of arch specific work > that userspace needs to do if the interface is shared. Has the Arm feature been fully disclosed? I would expect the integration with stack switching and unwinding differs between architectures even if the core mechanism is similar. It's probably tempting to handle shadow stack placement differently, too. Thanks, Florian