Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp28203rdb; Wed, 14 Feb 2024 11:33:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVCdWKPaMEgJlHE4NIiSCz2nuwIQE1RodgKK/f4IzU+kYsiZ++0d/Jb5PNxtMtcRV54azydGTFQs84vNcD8QAfFp9m3HJosNJGrM2E8bg== X-Google-Smtp-Source: AGHT+IFntc5NXBMvuhM7/vP4gqIP0wxrM6bBFIR9Ae70VPCodz7CdyF/bU0MpFD27sK7KVeEJfwj X-Received: by 2002:a17:902:eac4:b0:1d8:d6bf:144b with SMTP id p4-20020a170902eac400b001d8d6bf144bmr3868205pld.4.1707939226544; Wed, 14 Feb 2024 11:33:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707939226; cv=pass; d=google.com; s=arc-20160816; b=LatACTfiRN4Eej4xUL1YN87afRl9cPkbb/JCqxSjiDj8eWPQex9YD/ELo4yKS2TeWL Zw/ZhwojaWSJG9VgIFjnz7lgowoqTG/z7vodKwe97FDUqXGU7/0b5ubvG43lav6MDaeh 0hp9ipEo/7PNDuHq6M82j5rA3g3MRFvhcuMNW3igb+YWo3KUB1uxm4L6mj7EkfALTkfP Zi+JzClx/MAS8bSFlIW8sTZUIR3ecmThCiDibAIv7bhu9plhsoKK7oopXlS08cX66iYZ u7x6koHc147D3kmhUiBliBJaaf2rxP8QOFg2cgzEmEE9FJoYS9vmCFQ9Sr/3zDImbg39 QoQA== 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=3C0Q3eC899xoDvzLqtNRjkK3NL6o8Y9GbWdF64ouq0c=; fh=08quXy3cPqbOEQzFBc1FGAc3dxAfv9TrSG5GwdtAZVI=; b=ViHZaaUuEnT5ZHsnvm+TJ0b5paDcFBPiGuqTY0JrbJjtp1nzgu4diFP2ttZonFE93q qSgJ71h+jqpn8tuuO2FQWx/o2PvUBZs7OBjpCaGlB1t2rhg9jgolTFKbCHvq3tf6re3H kZsCn66mQDg2z9r1P3O+0suXxLpLH0Y8IDyOUPpVcqyvPgHCFBgxmekw64B2Qh7gLSHY /Us4fMlaQINXB5RtoAAQVF+UOyQtst6tDaj8+GWuHYYXX7PN5cueAthD3aGq+mi0MZCe f3gO0CMk0qSv63a1gh9/oan/HoKj9lhcZRkx/AjP+gJBlBLsSxt3OOy4+Iiq07X/pemX dysA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tesarici.cz header.s=mail header.b=XgQsAz2b; 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-65883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tesarici.cz X-Forwarded-Encrypted: i=2; AJvYcCX2BJ9iEHVOd8YAcXun/fMMm8iS8iL0ukFn1Db+FiAaALqDpsEGMtsVmhAGJUBDIBWfNC98hdSZAHV1JL6u/xkxzpQj39/sMTG0AfzGpA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c2-20020a170903234200b001d9624c714esi3338674plh.512.2024.02.14.11.33.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 11:33:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65883-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=XgQsAz2b; 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-65883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65883-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 31DE7281723 for ; Wed, 14 Feb 2024 19:33:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 398A413B793; Wed, 14 Feb 2024 19:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tesarici.cz header.i=@tesarici.cz header.b="XgQsAz2b" 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 6A2D11E4B7; Wed, 14 Feb 2024 19:33:35 +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=1707939219; cv=none; b=h++XiKbKOtPxJyi5/fYNAeWiiZkl17iS4Ww/IcPZ6+Vm2buUWRS35ymk2HxtfbSODhO8AkqaxaXAEwcKZgWXdTYoM/7Am61TmpSzXrT9cEAGBuMqmq13tQLo97ZBSMduwVIY3UADjooykexGb9PaNdCLEL8aHZtp0L0fDVZBBbE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707939219; c=relaxed/simple; bh=3Uxw2BBpPfLn6Mh91wTNWE4KZxWkqy1JIOiIb4xxOw0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=A8NAbgT5/qEbje1zQRbC4dsKqXPRYFPI5GYM1HxBLgp+uKfLuvHIT07Ik2nIxf4+VNdf4v6wn1zHtNJXDonF5aYgNC8rgi+H7ZKajfNkjsY7PTJhon05+8SkyKv9Xnc5VaHaA7BhP15qBy0u4h0utlfNDARgqNrJenDSV/UbYNs= 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=XgQsAz2b; 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 A0FE91A36A5; Wed, 14 Feb 2024 20:33:32 +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=1707939213; bh=3C0Q3eC899xoDvzLqtNRjkK3NL6o8Y9GbWdF64ouq0c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XgQsAz2bWVerxxg+fZgeInCVn9WFce0qUwc6Tc4ZaxsDMTcbA2LE5RjETQhfiPqr/ D+WYw0uMYvdygK4CKZiJ8SxMDMgUylgSIRC9mlCfKiN3i2VWRzhmT7l1Cj66KWk30b b1eUgbW6kuV3BvyEXHX1KAlOTY8eULSfy28CgIiC2WuVqUbKblvFMbTn+0qkc2EmEZ ipfLU3qkjBWRDpNaA/cJFtm/bP9zoVc58itsqmWl5De7tKaK11cwBU9nIqkFwrrvkM KVvLsOgOyEAEt28tHBT8AorMWz/IK/k/0FAc9qLPpogDSuWKDoGBmBlPH1UHL8M8Wa rUBFW/Bt/zRRA== Date: Wed, 14 Feb 2024 20:33:31 +0100 From: Petr =?UTF-8?B?VGVzYcWZw61r?= To: Dave Hansen Cc: Petr Tesarik , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Andy Lutomirski , Oleg Nesterov , Peter Zijlstra , Xin Li , Arnd Bergmann , Andrew Morton , Rick Edgecombe , Kees Cook , "Masami Hiramatsu (Google)" , Pengfei Xu , Josh Poimboeuf , Ze Gao , "Kirill A. Shutemov" , Kai Huang , David Woodhouse , Brian Gerst , Jason Gunthorpe , Joerg Roedel , "Mike Rapoport (IBM)" , Tina Zhang , Jacob Pan , "open list:DOCUMENTATION" , open list , Roberto Sassu , Petr Tesarik Subject: Re: [PATCH v1 0/8] x86_64 SandBox Mode arch hooks Message-ID: <20240214203331.240a6863@meshulam.tesarici.cz> In-Reply-To: References: <20240214113516.2307-1-petrtesarik@huaweicloud.com> <20240214192214.78734652@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 On Wed, 14 Feb 2024 10:42:57 -0800 Dave Hansen wrote: > On 2/14/24 10:22, Petr Tesa=C5=99=C3=ADk wrote: > > Anyway, in the long term I would like to work on gradual decomposition > > of the kernel into a core part and many self-contained components. > > Sandbox mode is a useful tool to enforce isolation. =20 >=20 > I'd want to see at least a few examples of how this decomposition would > work and how much of a burden it is on each site that deployed it. Got it. Are you okay with a couple of examples to illustrate the concept? Because if you want patches that have been acked by the respective maintainers, it somehow becomes a chicken-and-egg kind of problem... > But I'm skeptical that this could ever work. Ring-0 execution really is > special and it's _increasingly_ so. Think of LASS or SMAP or SMEP. I have just answered a similar concern by hpa. In short, I don't think these features are relevant, because by definition sandbox mode does not share anything with user mode address space. > We're even seeing hardware designers add hardware security defenses to > ring-0 that are not applied to ring-3. >=20 > In other words, ring-3 isn't just a deprivileged ring-0, it's more > exposed to attacks. >=20 > > I'd rather fail fast than maintain hundreds of patches in an > > out-of-tree branch before submitting (and failing anyway). =20 >=20 > I don't see any remotely feasible path forward for this approach. I can live with such decision. But first, I want to make sure that the concept has been understood correctly. So far, at least some concerns suggest an understanding that is not quite accurate. Is this sandbox idea a bit too much out-of-the-box? Petr T