Received: by 2002:a05:7412:9090:b0:ff:203f:1a00 with SMTP id cf16csp782251rdb; Wed, 14 Feb 2024 10:44:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWAytJ6Uloky5xQJghm7zqAKvDnKUuJz6m+J2lVnqQ4bBRLfvmb5KHIQFNEGJ3278xK3gAftwCJoDi+gxPm+eCst3Gy7tDWIDOPlWqg5w== X-Google-Smtp-Source: AGHT+IF6pLureJQPT5LWLvxFvOcdKo15tZzgTwPquI8qX3UE/SwG+AHuIq0npUvQSWNtLCtrnPwS X-Received: by 2002:a17:90a:c38e:b0:297:966:8f4d with SMTP id h14-20020a17090ac38e00b0029709668f4dmr3289299pjt.46.1707936248952; Wed, 14 Feb 2024 10:44:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707936248; cv=pass; d=google.com; s=arc-20160816; b=wYPICP/wWixSo0rfWe6BPxv6vTHRJath+duc/uHddaRgCYp33KPU/twCuiA4BZnVRn qp1UIeq7rEdlcA5XDauUJskNRUqjcrSsbg78MWSR7+GZMrHQ4ttlbGTwWXlWDjUzm3m1 prqMaAnS/raKr8rUja/wMt478IFFQL5u0i65SE9zmu9NjKjPm7pgi4IiPay8VdcoUjfr uslV3GSLWBh8q0guCuOw0LMdxr4ZNfcLra1X7RPrmQgELk6GeN0wft0P2VC0PCMs7x7z wrrv9HcF9H9ieqd4cBhl0IWWyrEPutgHaGSqsWYwvp1P2vK/TocV6lf2ltfzYHfQGCk3 VOrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=IuK+eM/ruVmfucxOCVpJr4pgRfUXO86poVMtwruf07g=; fh=x06KKqIA5b1Zb3w0zTxo4pONdwMQw++DkdxmJYlGoaE=; b=uvtbd0X96e5vlcEJMyqHxF9uLhlGu8yuSUt/eOuCZs5a4/Su5/BJEFEzLseE5/n2Lt 5Snd97yDcekNh2IMDsStcWKNDbA3ffLRRt2WjprbkOfVbmnK1dS1+aJZ+gJba+3h8K8Z uMZOecIiPEBE7d1gIL0bTdCvIt1PXq5jY25EBufDA/h1c9hwoBnHHxH2OlvNp0DD/mbc aFgmSFiEBIsY1bPXZt8MhfRQIr8aEivPwEcvt2A1VBESF5l+Ciffa7gPCISSnzhruKq0 a6WXnfbT+N6TAlhMUUupXac1vvJ3p6SmKphHDoVH/dnijDPsVFXcGzL5bcc/8Vj6fW0v 6pvw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tesarici.cz header.s=mail header.b=dzKx4kuE; arc=pass (i=1 spf=pass spfdomain=tesarici.cz dkim=pass dkdomain=tesarici.cz dmarc=pass fromdomain=tesarici.cz); spf=pass (google.com: domain of linux-kernel+bounces-65815-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65815-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tesarici.cz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n63-20020a17090a2cc500b002971197755csi1546384pjd.169.2024.02.14.10.44.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 10:44:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65815-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tesarici.cz header.s=mail header.b=dzKx4kuE; arc=pass (i=1 spf=pass spfdomain=tesarici.cz dkim=pass dkdomain=tesarici.cz dmarc=pass fromdomain=tesarici.cz); spf=pass (google.com: domain of linux-kernel+bounces-65815-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65815-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tesarici.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6310F294813 for ; Wed, 14 Feb 2024 18:33:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B4D013A862; Wed, 14 Feb 2024 18:32:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tesarici.cz header.i=@tesarici.cz header.b="dzKx4kuE" Received: from bee.tesarici.cz (bee.tesarici.cz [77.93.223.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6051513A860; Wed, 14 Feb 2024 18:32:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=77.93.223.253 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707935568; cv=none; b=JBuyslHFJtUsyUAonuA2o09AtA2TYvZknzDLwmEbbJWGb4X9XabZv44Rh89AFXCCwmRdkapym5JhD+9Sqghwsf06XDc/WGmgGiWz6VG8q6ZxiiblFqUDEolxICzsa3Yma3LWZSAJC1BlzATf6WfM2UPzge4nLb265Cm4BwXzIZw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707935568; c=relaxed/simple; bh=IuK+eM/ruVmfucxOCVpJr4pgRfUXO86poVMtwruf07g=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bmc3pYQ2bf6ljtFstsYuihijlyMvc4PM8Rxl+RjJSl6EMqQQkCaz5ZTCw+84U0zPOf/1DnmzVC0wD1eqgNOGVlmrInAo3FUNFT3Fn6E/EvS3htn4tQsf0IvJXT+ZYaEMQ0CzK8ck+MR7aCkxOeblOLmVxnZ/Gnd0uCNUjARopTs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tesarici.cz; spf=pass smtp.mailfrom=tesarici.cz; dkim=pass (2048-bit key) header.d=tesarici.cz header.i=@tesarici.cz header.b=dzKx4kuE; arc=none smtp.client-ip=77.93.223.253 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tesarici.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tesarici.cz Received: from meshulam.tesarici.cz (dynamic-2a00-1028-83b8-1e7a-4427-cc85-6706-c595.ipv6.o2.cz [IPv6:2a00:1028:83b8:1e7a:4427:cc85:6706:c595]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bee.tesarici.cz (Postfix) with ESMTPSA id 209C51A3A01; Wed, 14 Feb 2024 19:32:42 +0100 (CET) Authentication-Results: mail.tesarici.cz; dmarc=fail (p=quarantine dis=none) header.from=tesarici.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tesarici.cz; s=mail; t=1707935562; bh=IuK+eM/ruVmfucxOCVpJr4pgRfUXO86poVMtwruf07g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dzKx4kuEIwHcPcuEujpoVgHx0rE76yy/IdYr58ShNP4dfAhc1nuO+OJEP52A/zG0f W4WsEIjFibsazN+qVMYvG7pwuEj1V9e+sNRHOw+VEk3U/nOHGMCcPhPR2QWoE7v9YU 2VU8XpVWrahb99EfwoxzAGj0aL83Pm4BDVAo2veNdQmuQXUJ8N06A0U1NlyzTTjNiD odgj/SDZRHnbJ0PvQZL8NzXL89p0k6KtVrLqyslP+ObYc1SlMOGJ9vHOgVrDVVB0g+ nnjUuLpK7ENXSavc9IkdJeaTdZldUiLXs0tEyr19A4dzk+niCL13FBYlxpNMpL8dFT v15zJYLN1NB/Q== Date: Wed, 14 Feb 2024 19:32:41 +0100 From: Petr =?UTF-8?B?VGVzYcWZw61r?= To: "Edgecombe, Rick P" Cc: "hpa@zytor.com" , "Xu, Pengfei" , "tglx@linutronix.de" , "luto@kernel.org" , "kirill.shutemov@linux.intel.com" , "brgerst@gmail.com" , "dwmw@amazon.co.uk" , "corbet@lwn.net" , "linux-kernel@vger.kernel.org" , "Li, Xin3" , "roberto.sassu@huaweicloud.com" , "petr.tesarik1@huawei-partners.com" , "jgg@ziepe.ca" , "x86@kernel.org" , "bp@alien8.de" , "peterz@infradead.org" , "rppt@kernel.org" , "arnd@arndb.de" , "mhiramat@kernel.org" , "oleg@redhat.com" , "keescook@chromium.org" , "Huang, Kai" , "jacob.jun.pan@linux.intel.com" , "zegao2021@gmail.com" , "Rodel, Jorg" , "mingo@redhat.com" , "jpoimboe@kernel.org" , "Zhang, Tina" , "Hansen, Dave" , "linux-doc@vger.kernel.org" , "akpm@linux-foundation.org" , "dave.hansen@linux.intel.com" , "petrtesarik@huaweicloud.com" , Kees Cook Subject: Re: [PATCH v1 0/8] x86_64 SandBox Mode arch hooks Message-ID: <20240214193241.7447a082@meshulam.tesarici.cz> In-Reply-To: References: <20240214113516.2307-1-petrtesarik@huaweicloud.com> <34B19756-91D3-4DA1-BE76-BD3122C16E95@zytor.com> <20240214174143.74a4f10c@meshulam.tesarici.cz> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-suse-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable (+Cc Kees) On Wed, 14 Feb 2024 18:14:49 +0000 "Edgecombe, Rick P" wrote: > On Wed, 2024-02-14 at 17:41 +0100, Petr Tesa=C5=99=C3=ADk wrote: > > Second, a sandbox can run unmodified kernel code and interact > > directly > > with other parts of the kernel. It's not really possible with this > > initial patch series, but the plan is that sandbox mode can share > > locks > > with the kernel. > >=20 > > Third, sandbox code can be trusted for operations like parsing keys > > for > > the trusted keychain if the kernel is locked down, i.e. when even a > > process with UID 0 is not on the same trust level as kernel mode. =20 >=20 > What use case needs to have the sandbox both protected from the kernel > (trusted operations) and non-privileged (the kernel protected from it > via CPL3)? It seems like opposite things. I think I have mentioned one: parsing keys for the trusted keyring. The parser is complex enough to be potentially buggy, but the security folks have already dismissed the idea to run it as a user mode helper. Petr T