Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3289679rdg; Tue, 17 Oct 2023 09:55:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEG92bjEwnadSWDYE3H8+1vr65+ZzhcfVm541KinqZJY22mY0yPu+gE40bTHNrG3snpspOa X-Received: by 2002:a05:6871:8784:b0:1e9:bd5c:ae40 with SMTP id td4-20020a056871878400b001e9bd5cae40mr2812776oab.38.1697561705941; Tue, 17 Oct 2023 09:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697561705; cv=none; d=google.com; s=arc-20160816; b=C0V40RsKIbJiogxLPiBaaO00SYPdOCV/cFa4xmT9AQOXat/5vdTWjVpvS5G6RV9FLC BzS4+Z7OoqyW/rjIQaK3GlANYwXDAfgFBm2u62aMLUgJlt5I1FkGbLCO3hyfvUKw4DUb pkEwVA0Ur0ONLh2O9BXe0JQalTg7smvjS1EPo5x1r1mmaMego0kwsix7/dbbZa3QFApY tic4Kr6NY9KDlUDTBR50DV9rK8fSZtgasBu3XD850vDFtKG4Kl+CwHkRE6jbhyDJWTK7 DoJHaHql4NqBsloXiN6L84uOCQXsvfrMYOZZ86vNqEhh52+dHvLWl7pD4aCmSuXspaSp fOMA== 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=K1bTNFT87lr+HVy46GvlRl8WsLt2mWlRGa4YdiUNjuo=; fh=nswF69hjdg2QPgO9e4zWPt6GO2V9GP/lyxM0mb39GV0=; b=w7dUsxiXNMWf5BMWa5Ovt47BdU/3oiISCWpZaFFL9FFz4yzPQrDseC3QrjeIj40THo 9yF0z4cI5pNr95On9jjHC2YfHn46Z0rn5GLNi+H9UindjQcYFSOzg1oUXw14lLOcWpA3 D7rbhbNUkWj5HQjxUEiyBsk0BanJVwGrjmE1ZwopR0xx1Vux2TmVUBCKWX0qcxDyIULs hAyz46RFjoJ8RDDxA0XcCKdHQhP690E15bSOMv5HuVa6kyM2jE8oQeOYWvHHFXTXUZjc DGR/7nsXG1VZIUgXiJIG6riMPQSo10R8mE7dOYV1sWSmXbPRUAriLc2YrXNs7pUS0VpB f0Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=PFM3RQvq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id u70-20020a638549000000b005898db9d66esi159481pgd.625.2023.10.17.09.55.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 09:55:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=PFM3RQvq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id D5DC0801BF6C; Tue, 17 Oct 2023 09:55:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234304AbjJQQy5 (ORCPT + 99 others); Tue, 17 Oct 2023 12:54:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjJQQy4 (ORCPT ); Tue, 17 Oct 2023 12:54:56 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07653A4 for ; Tue, 17 Oct 2023 09:54:55 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2bb9a063f26so75186181fa.2 for ; Tue, 17 Oct 2023 09:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1697561693; x=1698166493; 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=K1bTNFT87lr+HVy46GvlRl8WsLt2mWlRGa4YdiUNjuo=; b=PFM3RQvqEe7u45KgiION4fPKs+KtXOGSvg0QTKUlrHz7SWoJEBVTrjq658S9W55ebn d5Z/RURWGQhF9DXWCVda+CFLc1tKSMUDUpeqX49o5op9URYMUrjokEbRLabqKG967oxM cyeyE7xOpyC3OqcuJCwTT6AU4Eoynlp8pLuJw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697561693; x=1698166493; 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=K1bTNFT87lr+HVy46GvlRl8WsLt2mWlRGa4YdiUNjuo=; b=hCIr8ko3v25PExTEp2UEjtL71dyyb2MaRP3qYYRfXMLnLk1y9QXG00hWY5oEavCWRC L0UBy6KaY8BpsCB+Gd0/9pd1CROUA4YopQjYhwHeey/4iM+q/FzWfQrqbMyYPVdf+RMh X1XnLCmSvGpWGlDKIBg3IApEAajTnR9lYVGQ7I2L34RG8ow0oWxqwI8oX6rEKG5XhrP+ GNXyUl4XFt6KhCXaCluBWQMWUa5rKU9gLMzTc+3QjZ3vRbVKZ9rUE6nsoIPiIniu+EBC GxiZIID8SgKmVh1udLW1zurADwDmMs1f9/4/SwiHpm7rmR/HR1hxxclPqNI4ftX4KcpC LJtA== X-Gm-Message-State: AOJu0YzEHyw3OH9uWC9Cln9qA0K5+Rc8nAW/ZATjOuuv0JkI4WyNWfNP evUHJg3wiPu+HqQX+f+xPeupJOfjrYtsaWJu/gVHBnge X-Received: by 2002:ac2:484c:0:b0:503:35b3:aa31 with SMTP id 12-20020ac2484c000000b0050335b3aa31mr2075805lfy.27.1697561693204; Tue, 17 Oct 2023 09:54:53 -0700 (PDT) Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com. [209.85.218.46]) by smtp.gmail.com with ESMTPSA id v23-20020a056402175700b0053dd8898f75sm1491571edx.81.2023.10.17.09.54.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 09:54:53 -0700 (PDT) Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-99c3d3c3db9so950964066b.3 for ; Tue, 17 Oct 2023 09:54:52 -0700 (PDT) X-Received: by 2002:a17:907:3cd:b0:9c4:b8c9:1bf2 with SMTP id su13-20020a17090703cd00b009c4b8c91bf2mr1497085ejb.60.1697561692367; Tue, 17 Oct 2023 09:54:52 -0700 (PDT) MIME-Version: 1.0 References: <20231017090815.1067790-1-jeffxu@chromium.org> <20231017090815.1067790-6-jeffxu@chromium.org> In-Reply-To: <20231017090815.1067790-6-jeffxu@chromium.org> From: Linus Torvalds Date: Tue, 17 Oct 2023 09:54:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 5/8] mseal: Check seal flag for munmap(2) To: jeffxu@chromium.org Cc: akpm@linux-foundation.org, keescook@chromium.org, jannh@google.com, sroettger@google.com, willy@infradead.org, gregkh@linuxfoundation.org, jeffxu@google.com, jorgelo@chromium.org, groeck@chromium.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, 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, 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=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Tue, 17 Oct 2023 09:55:04 -0700 (PDT) On Tue, 17 Oct 2023 at 02:08, wrote: > > Of all the call paths that call into do_vmi_munmap(), > this is the only place where checkSeals = MM_SEAL_MUNMAP. > The rest has checkSeals = 0. Why? None of this makes sense. So you say "we can't munmap in this *one* place, but all others ignore the sealing". Crazy. Linus