From patchwork Fri Jun 14 23:20:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Xu X-Patchwork-Id: 13699163 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F04CC27C6E for ; Fri, 14 Jun 2024 23:22:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 397D06B017E; Fri, 14 Jun 2024 19:22:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AC28A6B0147; Fri, 14 Jun 2024 19:22:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 096D26B017E; Fri, 14 Jun 2024 19:22:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 37F536B0194 for ; Fri, 14 Jun 2024 19:20:23 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D8056C09A9 for ; Fri, 14 Jun 2024 23:20:22 +0000 (UTC) X-FDA: 82231065084.01.C44EFE6 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by imf16.hostedemail.com (Postfix) with ESMTP id 135B6180004 for ; Fri, 14 Jun 2024 23:20:19 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=L41umzbo; spf=pass (imf16.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.214.180 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718407219; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=y1jfDzVoRWL6KaPZWMODA9UkUSVpf2/HdHd6Xl6DV5k=; b=xhsC9QAajmGMoNwKYE870EiEQDAKHvSo22E81WvEJCXxoPnyE44PAPfDVSBkZkT/QPGZUp i3kdqJgLznWJm1kqhTagonnIOfGvKEe5Zv8rrtlONzwPLLZLt1Kc9s7wFBtBYOP4Fs5qeL 6EzHBXYFnMKjzSOLx9n1s64XjG7xOAc= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=L41umzbo; spf=pass (imf16.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.214.180 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718407219; a=rsa-sha256; cv=none; b=hLodBb91ru6BE1JyInaJUI2T2LvVW6tH4HZNenlN11uElyG8meN4T4dKCG8D4/oGS+gg88 FhcyjNftfWa/dsTe2+38DDl+tWApApWV6mIzwLxGxxJHxsS+eQtey/P7fjtnTp71NX0xDW HN0jguxUwJi+X+7dewRufjzR90PCAnk= Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1f6f031549bso25243455ad.3 for ; Fri, 14 Jun 2024 16:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1718407219; x=1719012019; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=y1jfDzVoRWL6KaPZWMODA9UkUSVpf2/HdHd6Xl6DV5k=; b=L41umzboqUVKp7dlU/NxcOWe4vZ0lWbFWvqPfxGHdUmSJY/vsLWWhkOmpIp+KKEFwS vqhuerwCxh/uBexjjZdhqZEExUXUo3HxjTzT4b56JOVjhI8QmFmw5YaPvgwX7F4Ao8tb DSdVFbRwv5dBejAcbtppX1Fohxi8PBFrFryWk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718407219; x=1719012019; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y1jfDzVoRWL6KaPZWMODA9UkUSVpf2/HdHd6Xl6DV5k=; b=Q1dKGCxBEMJlub0zkTWTlQffjD0Fv6fBwV7T/irUGKBhKSxTmunvPLYgVCrDzChWeF 4mbz8pWtotBVZwLB763wz5eo3PVceag64lg9u4uQP06bG18MYuBab7TcQPvyG7PmISEL Cd75fhRIHSvbaWIIxpUwGdztABV1unEyiv9yzVT0Dd0rgAFBnhy/luBKpjwcg29zqoKW CmFgs+S4ns7a9dWRGk/Xi/Nc5ssuhmobXf6bOQr8ddFQsTdDTqyxy/GcbrXO//LOk6PU 3LQe8y8JfkrZ5RvL72p0GX8T+S5lkloWGACm/8XKhvks2ryNoB7Y8SEr3B7OwFLkbFjG x6RQ== X-Forwarded-Encrypted: i=1; AJvYcCWZonm/ZxePdwmDtd0v2aQ23MaaoKqWjZe+nShWQ2+Bo6vKmR8FDYQNms/kQg1cm7hBSxEpL4dBq8Wsr9hrzf6VVs4= X-Gm-Message-State: AOJu0Yz1kn36CgNuCmullQqMDeNru/KJOeP/cEw2GAQ/pKXKom5SZk+D 8Th4VF0Ov82SQBQ5IGq8gvpDG0CQnXFtjaS3Ibut2Gl2ltJgdyCfQd7tW8AqkQ== X-Google-Smtp-Source: AGHT+IERw4c7rhqKagYrT0QDL7TZXNuH6UtS6fzakLigo0kTD/Gdb3QvsSoQRs+yi1aji+repoo/uQ== X-Received: by 2002:a17:902:ec8c:b0:1f6:ff48:1cd9 with SMTP id d9443c01a7336-1f862a19a0amr43837785ad.69.1718407218809; Fri, 14 Jun 2024 16:20:18 -0700 (PDT) Received: from localhost (213.126.145.34.bc.googleusercontent.com. [34.145.126.213]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-1f855e5bca2sm37983005ad.17.2024.06.14.16.20.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Jun 2024 16:20:18 -0700 (PDT) From: jeffxu@chromium.org To: akpm@linux-foundation.org, jannh@google.com, sroettger@google.com, rdunlap@infradead.org, david@redhat.com, adhemerval.zanella@linaro.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, jorgelo@chromium.org, keescook@chromium.org, Jeff Xu Subject: [PATCH v2 0/1] add mseal to /proc/pid/smaps Date: Fri, 14 Jun 2024 23:20:13 +0000 Message-ID: <20240614232014.806352-1-jeffxu@google.com> X-Mailer: git-send-email 2.45.2.627.g7a2c4fd464-goog MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 135B6180004 X-Stat-Signature: q7dxgbw14ioxopz4jasmxf9s9mg4yrjy X-HE-Tag: 1718407219-527266 X-HE-Meta: U2FsdGVkX1+WSmHnwIQM94mqb982SU37Cztnsy7t6HfahuN9jYXT4p8SkVbzdCObCBF7bKCa8+5CfpS/9kcbuwYxBZNsGPfVUJ46Yyh4V3JpNN2ZVh+sGxkytqcSpIyvFBrPtekbelZaXtGzhBqr51qy79JkuuV4ZeB4k+xozZ7eIlmg/nIJMW97LPNflHFdcT6OL7/tLuazke578Qe+bZaHeasazM1B43YL5GO0GiIXTB8bhbHAmVf0ua2KN4dVEoFwPWCRPSn0t4p5Rm7a4n+Lh3qCvwU3JId61hDGrvldqOatnAExDGugRtosZEXmdkIPujpcw85HQcf9keBeJf5/xpEoVn92mujt783mpPUaiY5x1vX+MSZq2fbb5XNsuRlrBfYHN/E6jCmBfWLEuwmdS71fjtCfsOFH0aKqBQ0QVe6vzBDy9rwfg4riWJWqtrwe7DiNl//qlm3eEvTd3QP1we8z4jR1W/kTa0C1K0iEmgSTzFJ4f38pZnxFkYv10eam6UkLP9jE9Jr2nDrrahQWMfP80xi0vS8o90YbDRz2ryxXzVRG26lxmpnq2077aXiSGLvkW6Zxwt/KZOHxBGwXj8cZGhJ+MYXe3mPqtBzxcb2P8/ofKTzzyrTmZbEWg5HiSIJ+DLQzFHSHBgsqWD/QM4kldhFDMgTketMNYzqNet2uId6BEYO7xSZ6fsH98KQ+6+YkU3EqZ/cA5LND8Y3VLrPZ8PjiOHAUxUmWXqYun5Vc4jXKfwaKZ6OEIj4vVyILVHvNVFRqtscBtExGSoOJpMd/K038jUA7M98n8ukKlv6dJxqpRJLyvvkn6RiPD///c3BrwC5/StFIqZgRTH114U4YaL3OKJhsVpkJqIdtqK3Z94GQ3ikMNMH3sJa/zot6jId+q3T5g9t8oQQ1ara/VjoO++CQuqYqjJqxd2hHbnRYPl14iPj/SvKBEy/H9VlfU7KxpfvUG1w4PKy eqIdUC2L DCiBjpr1qfg8Jv7tdi+7EN5eGWukKjqLTqoLGsbcYMX+ON4KdioJKnYLwJ8D2OEsnOEkq4O63JehFkzJF/2OLHOSsrq0uGFPzk+3MP4yuVEyj26pY/pKqL8On+cN03qXlELFL80bON0cej3xjCs6yTBeX1QLcsThgKUEqFbW1d1scVazgcuj0e+sGVWOxupxSwl+D4enhdVrtRGMh/+1BANxrdyeMs/Ugica1MiuQhbuM4ScBK+jvHksD1iPq6ak8t0qal/rqs6RX+hW7ebdnlW47S1t1v/zDnTWDqccRr2C6QReCkto2k/aBKcCM8O4qM6TrBbP2VOcEq0yxwg3PzZREPl2uLIDndFqPsDcl+H3Y3TXnWIXb8d1ncCyckVK9VR2/8T1V2Hm5I2IcE21kfi7sbCWLnoRhkh3XKu5JOBnuDBs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Jeff Xu Add mseal information in /proc/pid/smaps to indicate the VMA is sealed. I appreicate Adhemerval Zanella Netto to bring this to my attention. [1] [1] https://public-inbox.org/libc-alpha/743ac2ce-817b-42ef-a0a1-7edf9a85d8e5@linaro.org/#t History: v2: update from Jann Horn's comments: - change 'sp' to 'sl' - change 'sealed page' to 'sealed' - move VM_SEALED define after VM_ALLOW_ANY_UNCACHED v1: https://lore.kernel.org/lkml/20240614182327.752156-1-jeffxu@google.com/ Jeff Xu (1): /proc/pid/smaps: add mseal info for vma Documentation/filesystems/proc.rst | 1 + fs/proc/task_mmu.c | 3 +++ include/linux/mm.h | 5 +++++ mm/internal.h | 5 ----- 4 files changed, 9 insertions(+), 5 deletions(-)