Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1265403rdb; Wed, 6 Dec 2023 13:27:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtIpHsFIdFe0p6+FE0WcoDkEIo447oFBMSx85cac7Ss33IVIOTRAPquHV34hih1DEbjcN8 X-Received: by 2002:a17:902:ee44:b0:1d0:700b:3f6a with SMTP id 4-20020a170902ee4400b001d0700b3f6amr4178546plo.36.1701898071903; Wed, 06 Dec 2023 13:27:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701898071; cv=none; d=google.com; s=arc-20160816; b=VxoW2vfeBEEoKou0v6wCNryMAiTY9Nyrx7NfFVFUW3w7p/IDGBQA1MN46oHAaV3Jdf E9CmyQRgq3ImvnxvtRAncfxMerllAg7kbgvjNdVTI+F7zIVuX5sAs0Ihg7p67MFk6nho OBpJPeDBF1MxAYKtumrminW4tnt0owH2CdEWmlPk1CIuZD2Y/7s6SyfVPW/4/ulRCTYi +wOx7EKDO+gdW0dfgnQaOQ1U8+CLxvjXOCAWndMdW2tegsiHD8miHpBvJ1cTr8pTCBCs w8BI79VxDFjxlx2aBAlAtygw9ceYzalWATCiSaTvlhDwmSvve/NDSkZn1TE5qBnP5uMb xesA== 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:in-reply-to:subject :cc:to:from:user-agent:references:dkim-signature; bh=mbZzH+s3JDxV/sloks5umdqEjeI9fKLBWt3znOcMhGI=; fh=2nPFT/KTslTQ686WgFSojEEZau7G7tqoQ5Zr2uSyW1U=; b=KEF1/2t/58oXI329ijxP/VJSzgqz6LAqLa9TTAvxtjZu9X1gr9OBaC5zjBo4o6U3eG umLxpZBc1Iro/4QLBHeIJOPsTYMMcNuYE3lSAmvdzt9ViXcRARuGwcj4lEHFunqHHnYT FVW34KY1q4IYM8ssio5zK8DLRp0IE2AW0B53DqcGdZz/3pVEsXds4IpGkLzu+DUktWf4 s0Sj0Fkh364I0sDlHHpzUY3gYa5ztJWx0d73GGzDU54AgejdPz2FCsbvqsE+xfnjty9I VDzlnVnuf19u/ErgpjvOoiy/Wj6NEeGjgarz7Txq15xueZFGY//PiCjWjSfnDlxIkIUD gX2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KfkCRa9f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id e11-20020a170902b78b00b001d0bf633564si390311pls.243.2023.12.06.13.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 13:27:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KfkCRa9f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E837180C92FB; Wed, 6 Dec 2023 13:27:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379747AbjLFV1a (ORCPT + 99 others); Wed, 6 Dec 2023 16:27:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379769AbjLFV11 (ORCPT ); Wed, 6 Dec 2023 16:27:27 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 299FA10D0 for ; Wed, 6 Dec 2023 13:27:28 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1d075392ff6so2092465ad.1 for ; Wed, 06 Dec 2023 13:27:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701898047; x=1702502847; darn=vger.kernel.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=mbZzH+s3JDxV/sloks5umdqEjeI9fKLBWt3znOcMhGI=; b=KfkCRa9fM4NEjcL7Gb6xjuKXyCWeOKdTkvxTnIU2vfyNQLIfT+bqLIf95FhcEs4ds8 euAWcJSfqGg0++Cx3B1VK5K+aDVcjAENud+a3jBW8mQwIKhzC3pqP/6mlh6/ViYg6RNI TfoNWfLLnygj5WeFkf8OAdZkElskLMAG8ZIoOb+QDB2k80pgg1xWWs5JF+/jfpsS7ngj T9xzop2Sgq6RpYEmMhk/u/+uvYB96343esMMFdKGxQxW32dz70VcRHJWJM5tCZ3Ylbxx n4XG7YWO6HBNEU1x6DnB4NHSMOXJ0zXf7dNjvuVlNvXMcFVAMVY0Lp8qoxPUV4iGWHIq gceQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701898047; x=1702502847; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mbZzH+s3JDxV/sloks5umdqEjeI9fKLBWt3znOcMhGI=; b=sE1/GXsZ5tWvuEsAowXJ9X2YYIlNgkA7tAAInvOFH5wG2rlOJ/t+kLpM/ogUrkrdUL yD3d6W20nnzI0goMtHb8WRH8M29nV7LgYVJWmDxM2vzEmhpaQ5+zS3ChJ+5KYEuAXLqa MokpZPYk/4r08Rn1anjRsIAuiTmqqWxTpJ2szCzBmHLvbkJRbI1ByAOLrQDXo6aooIzn WUW1Vk5x8OIolbvIuFChFj7li9Nn65qsYt+lZDfJGR+wW9XuqtN+S954qQHKpu9rxbOD n4ig3cEBOSZpi2NBT7wrgqetfDRbTfnJ5Up8IAVXMLX6q5SiiWx5c4TA5fO+gtrHluno mDNg== X-Gm-Message-State: AOJu0YyAgrNBE0jrkzSOzSjUII464cW4YB7OeRrOKrZDB5Mqw1UtWqD+ H/mt1gpLdlBe5CBgGd8exQWdIA== X-Received: by 2002:a17:902:e80f:b0:1d0:6cfd:d3c4 with SMTP id u15-20020a170902e80f00b001d06cfdd3c4mr2193857plg.17.1701898047545; Wed, 06 Dec 2023 13:27:27 -0800 (PST) Received: from localhost ([2804:14d:7e22:803e:f0e2:3ff1:8acc:a2d5]) by smtp.gmail.com with ESMTPSA id jj12-20020a170903048c00b001cf6453b237sm259379plb.236.2023.12.06.13.27.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 13:27:27 -0800 (PST) References: <20231122-arm64-gcs-v7-0-201c483bd775@kernel.org> <20231122-arm64-gcs-v7-22-201c483bd775@kernel.org> User-agent: mu4e 1.10.8; emacs 29.1 From: Thiago Jung Bauermann To: Mark Brown Cc: Catalin Marinas , Will Deacon , Jonathan Corbet , Andrew Morton , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Arnd Bergmann , Oleg Nesterov , Eric Biederman , Kees Cook , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy , "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v7 22/39] arm64/gcs: Implement shadow stack prctl() interface In-reply-to: <20231122-arm64-gcs-v7-22-201c483bd775@kernel.org> Date: Wed, 06 Dec 2023 18:27:25 -0300 Message-ID: <87edfzhvia.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 06 Dec 2023 13:27:49 -0800 (PST) Mark Brown writes: > Implement the architecture neutral prtctl() interface for setting the > shadow stack status, this supports setting and reading the current GCS > configuration for the current thread. > > Userspace can enable basic GCS functionality and additionally also > support for GCS pushes and arbatrary GCS stores. It is expected that s/arbatrary/arbitrary/ > this prctl() will be called very early in application startup, for > example by the dynamic linker, and not subsequently adjusted during > normal operation. Users should carefully note that after enabling GCS > for a thread GCS will become active with no call stack so it is not > normally possible to return from the function that invoked the prctl(). -- Thiago