Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3346215rdg; Tue, 17 Oct 2023 11:38:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxxaf3fZsn8+GhJqfNX4GX0htFe4SlZWKRthSRcVFQkDf5fO9cce1wpO3jsDLbPwQvhfnQ X-Received: by 2002:a17:902:f815:b0:1c0:afda:7707 with SMTP id ix21-20020a170902f81500b001c0afda7707mr3032042plb.34.1697567925270; Tue, 17 Oct 2023 11:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697567925; cv=none; d=google.com; s=arc-20160816; b=stpvXfETnOGSH2tVMIwxFMQ2AJzinakPyrA+ZRL2thxKz6NV40iSTr8DlO8md7Y3sU KugHulz9Am0zVSbjv8J1Cug1u+Gi9LLIRMFHod2FRR61zYqtWI4F1dDQe0VsAGogoZv5 sEEa7iVT+P0rd5043Soy+WrBCGU8UyxtjIp7TZ/GhDDZoDKGMyqBw+NOHpqroRNeau0y E2pzCej4SXnKS5hC0X9oTD/Z7r3Tr7WOfrei6gzspzUDWUkhxCZb435CqrNSijSv7YMp zSrBkHGPx7GI8mrAGhMRwaSCJMv+AwLeyHp6VcvWItCTv5Rg5s5qyBgCsAkRJEe/VuBd KbPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=USkbb5/cH3vJp4KF5jTF8rcY5cuD/NJi1SRBLDhJQGQ=; fh=3G3k/b8t1LfQUUrk0iMWoEA4pOy/Y/9kMc6La9a2MSw=; b=cxRAS5TRh6lNGaPnXapNavA1WqLYkD0WmRukqolS2GjJeBEJvLZwMdiRR7m+fj/dWy dcYGJ4h3w1Byg8mKaFD8Wmv6YICa3GBRMclRv0sSerxYT46apwSE7T7lSviWTMNUaQuc BFT7894ZLvt2wO0o/SubrrFtlvwDiaiV8vLyAWbcA/Ab2LlS3PLQoa8wXmmxnM3yHRbo vqUSEjnW3MrTVaPNg6MANw0DoLhWT8hqzHenG1iWM92ymBojMK7BQnmgUjMTH57ebMF4 u6XJXdI0YcvzIkF749szVaxbaY5gHbEm0qfl1TJVJE0CUXUrU4UEAdNpdjkzra4oxgVf nwgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XeDIyL0v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id c4-20020a170902c1c400b001c9af5305dasi2118040plc.126.2023.10.17.11.38.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 11:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XeDIyL0v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 72DFE80E06B6; Tue, 17 Oct 2023 11:38:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231868AbjJQSim (ORCPT + 99 others); Tue, 17 Oct 2023 14:38:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbjJQSil (ORCPT ); Tue, 17 Oct 2023 14:38:41 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0948F90 for ; Tue, 17 Oct 2023 11:38:40 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9936b3d0286so975555766b.0 for ; Tue, 17 Oct 2023 11:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1697567918; x=1698172718; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=USkbb5/cH3vJp4KF5jTF8rcY5cuD/NJi1SRBLDhJQGQ=; b=XeDIyL0v2sQK+8XbKrxDFLSfMGJJnHMJJg1PwK6sskm4FojjZpACM04QPqa2N8myiu hxtdA59/DJln9laekdfnOyUXDpM0CKG8V3/DJhPE8e17uYpDHhWfM+e9Ja2dKxW4lphD G+psKBha4SxF5GAtN4xhVoTP3xjMApQK44KHk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697567918; x=1698172718; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=USkbb5/cH3vJp4KF5jTF8rcY5cuD/NJi1SRBLDhJQGQ=; b=iSbcAMcbMRwvY2yyU/FmTKmyIukeThiIIRX0NL9t7jGVZTNYrJWjk2Ivurt4mlbe5u CPKxgsy3Wfod4ZQN7mTvC4CjDC+xwZffZr3VU+pIsen5C2vrCKkE4OTPsn0AyhjnHPIb F/HPiaAJsmFxOzeBWHYxSR4yiZIkgFbjTmLXvYbagM+D4KLenuu38yS/zi7XxIT/EJ/5 KVsuoyzmvMJPuQRxQYLsPtTJrGfjLs1nbeSsRQwxwo57zL6eIVCPmZVDKJrMzuxXPGbx M8yLWGm0R7+Mjhwz2tE5OGJ4PvUjqJNCLZjrnIVUw5HTZucpRRdW7oHcK4Q4kenu7VBj CDNw== X-Gm-Message-State: AOJu0YwuW7Bq6vZtKq+a7Ddo1ezZBDLGwL9e6OSMg/gPhfuT/PUiZ9Yz Z5WSs8Tr2AY2q/pLNr3pXPnU8jeKf6Ize/J7WjK+bQvy X-Received: by 2002:a17:906:fe05:b0:99c:b0c9:4ec0 with SMTP id wy5-20020a170906fe0500b0099cb0c94ec0mr2620483ejb.30.1697567918261; Tue, 17 Oct 2023 11:38:38 -0700 (PDT) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com. [209.85.218.48]) by smtp.gmail.com with ESMTPSA id o10-20020a170906600a00b00992b510089asm250429ejj.84.2023.10.17.11.38.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 11:38:37 -0700 (PDT) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-99de884ad25so972494666b.3 for ; Tue, 17 Oct 2023 11:38:37 -0700 (PDT) X-Received: by 2002:a17:906:4fc7:b0:9b2:b149:b81a with SMTP id i7-20020a1709064fc700b009b2b149b81amr2302073ejw.64.1697567917353; Tue, 17 Oct 2023 11:38:37 -0700 (PDT) MIME-Version: 1.0 References: <20231016143828.647848-1-jeffxu@chromium.org> <55960.1697566804@cvs.openbsd.org> In-Reply-To: <55960.1697566804@cvs.openbsd.org> From: Linus Torvalds Date: Tue, 17 Oct 2023 11:38:19 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v1 0/8] Introduce mseal() syscall To: Theo de Raadt Cc: Jeff Xu , jeffxu@chromium.org, akpm@linux-foundation.org, keescook@chromium.org, sroettger@google.com, jorgelo@chromium.org, groeck@chromium.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, jannh@google.com, surenb@google.com, alex.sierra@amd.com, apopple@nvidia.com, aneesh.kumar@linux.ibm.com, axelrasmussen@google.com, ben@decadent.org.uk, catalin.marinas@arm.com, david@redhat.com, dwmw@amazon.co.uk, ying.huang@intel.com, hughd@google.com, joey.gouly@arm.com, corbet@lwn.net, wangkefeng.wang@huawei.com, Liam.Howlett@oracle.com, lstoakes@gmail.com, willy@infradead.org, mawupeng1@huawei.com, linmiaohe@huawei.com, namit@vmware.com, peterx@redhat.com, peterz@infradead.org, ryan.roberts@arm.com, shr@devkernel.io, vbabka@suse.cz, xiujianfeng@huawei.com, yu.ma@intel.com, zhangpeng362@huawei.com, dave.hansen@intel.com, luto@kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 17 Oct 2023 11:38:44 -0700 (PDT) On Tue, 17 Oct 2023 at 11:20, Theo de Raadt wrote: > > The only case where the immutable marker is ignored is during address space > teardown as a result of process termination. .. and presumably also execve()? I do like us starting with just "mimmutable()", since it already exists. Particularly if chrome already knows how to use it. Maybe add a flag field (require it to be zero initially) just to allow any future expansion. Maybe the chrome team has *wanted* to have some finer granularity thing and currently doesn't use mimmutable() in some case? Linus