Message ID | 20250120012607.4808-1-ioworker0@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 97898C02187 for <linux-mm@archiver.kernel.org>; Mon, 20 Jan 2025 01:26:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0D5C76B007B; Sun, 19 Jan 2025 20:26:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 05D876B0083; Sun, 19 Jan 2025 20:26:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E18E46B0088; Sun, 19 Jan 2025 20:26:49 -0500 (EST) 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 C01B56B007B for <linux-mm@kvack.org>; Sun, 19 Jan 2025 20:26:49 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 65C281226DF for <linux-mm@kvack.org>; Mon, 20 Jan 2025 01:26:49 +0000 (UTC) X-FDA: 83026090938.07.D401C51 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by imf08.hostedemail.com (Postfix) with ESMTP id 8D1A316000A for <linux-mm@kvack.org>; Mon, 20 Jan 2025 01:26:47 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="afh7/Il+"; spf=pass (imf08.hostedemail.com: domain of ioworker0@gmail.com designates 209.85.214.173 as permitted sender) smtp.mailfrom=ioworker0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737336407; 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=Q81NkvOoQ8P35FaklgAfy4wDKK4vLKNRPO/xOzb8nLE=; b=REtNS9n57+7SaPQwh4Gct9pZaGdJRXvWM3P4o7mVkmNw+ZERzcUbSOOQwB8pfmrV78I2zN Yv+RJuzFDjAMa3Oi9I0BVl7frLeXzYD3SMa11+8QgTlZxncqXGB9/7Au8jXyT1gTmatSxl CeFCNK16T4VhCQ180GkotNBE0ubEHHs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737336407; a=rsa-sha256; cv=none; b=FtKtLZZcoIEHYmJeOuch5AKrIjozxEHYj9xJcFfc1a8AIc2aIJPy/a/dVTcPaJoRkSDtTr YQQNvyqFXZCDUmWTwJWFP8g466YKEbS2D+yqY/ac8qozPCo3FEeSSouj9YWc1wFiNAOiKF cmNhbmf3pWGkP3nJ8dh4nKgGHaRLfrE= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="afh7/Il+"; spf=pass (imf08.hostedemail.com: domain of ioworker0@gmail.com designates 209.85.214.173 as permitted sender) smtp.mailfrom=ioworker0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-216281bc30fso90637525ad.0 for <linux-mm@kvack.org>; Sun, 19 Jan 2025 17:26:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737336406; x=1737941206; 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=Q81NkvOoQ8P35FaklgAfy4wDKK4vLKNRPO/xOzb8nLE=; b=afh7/Il+9j1FXKjbqTXy0XVkK37lR1dvpRbO2/9CMxYx6OKlh1ofmM1z6uBo7gOD0/ e+twoZmup8NJwk2gnENLQktx12K0vRakzbiFB3+mDcGAUn5FcJs1jQ1VwjqiXj5IuU2F QEqKHTipazGqdol5HMEMpVeg6oJWfjcz4z2n6+7x0Qrj4ZZtkU2rAw9YezKqpsO3ExZC gRZc885vO5AAHBM/+8rio4i7Ak1Vys5RO0lkxBRSuzKzrm8ouUdquK90NVcjJrK6okEi TGqQOk5wHgcv6fjSoi2hnoUuwdbmL3YfagN0rMnEEdLWa0I70bzoyeu2GUp8vOoFb0DC kl+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737336406; x=1737941206; 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=Q81NkvOoQ8P35FaklgAfy4wDKK4vLKNRPO/xOzb8nLE=; b=VMO+qm0muZ52js0MjL+rm5gRNEH25gTQoZk/MwAuU2ppX8ni43mSCJcM5uH/Dv3a9d BjSJLpAh/pcJIsG/s5bP0Lps5aDYA4qLgJvgvKwWmz6/S2vYi4ce3yBKrT+NLX3VHmvp H6trtfssOhk+h6fhp+6BTrMp+kQ5Z8y1BXHOyXPIu9xNpnqVkoJbEjwtSSiAoCteqxMs iu69dMZkp8a368FRRETaLPhFxuIB2IzDhiD+R59WEFz7OmiJYcexVtqWcWfZJ2omHf49 foaQXJwOWX2rCIJjnmdBhMkeF7npftC5bPTlMj98U0/+GkjRxOKK9QZyHCPXPI+B/2nP 4AtQ== X-Forwarded-Encrypted: i=1; AJvYcCXZ6r+LyyLy3PCdkBxogLekm2IL2K5dTI1SKmAGy52g9DO/uE3CFL/vso+AQflxOiLSQxnYaJWDMg==@kvack.org X-Gm-Message-State: AOJu0YybWzdFB2O1ybLbj3gdMF5AwPFbILUxDpps3q6mFsyiSG5wfejl 1ZTARIgkX8GP9MgQbYNgP9RazO/brqYTeJzCEtQcCO5h0+XkqUfJ X-Gm-Gg: ASbGncviheqG0PEVvNjNW4d7sTwxb35UPY5gwAuq2UF1IU1c70kTPqd8m6BsQAobK+N ful/pCNzWSyP0ylOs4e1ghZZqiviFNY93+GUp9s3sTrmN8WwDqm8VYb0nqimDWT72B6tunOJ20D 9Sks5pNXJaCNoxv+M8FG8Vs85pSGqFXGSzbFjG2U6B5rx8ZPpZ4rdC9UTP9cQVDEv5SzGBik1h0 Ka0wDR8Yo2GWiDvGlTxLM0nHXSEOkj1UL60zgQ8jy63ZgCWifdjJrXWddv27zKV3bpexLT0yKDg Pw== X-Google-Smtp-Source: AGHT+IHiM+w1dyo9TAeX9QWuQMQKi6gfS+OsZwZ31Pcs2BMeLCcjRbLrryXgYZFUrlSGdCcVnMW37A== X-Received: by 2002:a05:6a00:3c8a:b0:727:3c37:d5fb with SMTP id d2e1a72fcca58-72dafb6fef4mr16227390b3a.16.1737336406234; Sun, 19 Jan 2025 17:26:46 -0800 (PST) Received: from EBJ9932692.tcent.cn ([43.134.20.116]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72daba44453sm5742266b3a.127.2025.01.19.17.26.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 19 Jan 2025 17:26:45 -0800 (PST) From: Lance Yang <ioworker0@gmail.com> To: akpm@linux-foundation.org Cc: 21cnbao@gmail.com, ryan.roberts@arm.com, dev.jain@arm.com, david@redhat.com, shy828301@gmail.com, ziy@nvidia.com, libang.li@antgroup.com, baolin.wang@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Liam.Howlett@oracle.com, lorenzo.stoakes@oracle.com, vbabka@suse.cz, jannh@google.com, Jason@zx2c4.com, Lance Yang <ioworker0@gmail.com>, Mingzhe Yang <mingzhe.yang@ly.com> Subject: [PATCH 1/1] mm/mmap: allow MAP_DROPPABLE | MAP_PRIVATE in mmap() Date: Mon, 20 Jan 2025 09:26:07 +0800 Message-ID: <20250120012607.4808-1-ioworker0@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8D1A316000A X-Stat-Signature: c9o44inzxnf9qpkc7tn6qqujmqgw1uea X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1737336407-85724 X-HE-Meta: U2FsdGVkX19TtIOC/nAWayjAWw9+z3lQZZUWNa1UJmwe7hPx6hny9PR8WRFw+NhRHYXo9am+Zu+JB1p91vaEcWARKWWVItIF+4zZTzjHedU3gFp2o1QjTT59adhz5W2QtCvxJ/tczwL78CfIX5UnVHMzDCZHBohjmBClA7F+oSAlEOttN0K/FxrE10XjlGRfYHZD26zNP0ykTn2JzghKyLbkkFOOaXVqk+rY7COPkHsfIPD3KN8+nI0pg9LkGg2RKcryu7aNykAarJgPHqZFModBG12P1YQweDSVNmeXVKNR3btwUL++YFxNTwkD5M5FOome997FiMU6juoaHeMpuVu+8JsFexolv6tPfGnEuAyVO7C8Fvwc6CzZZxnNJXI9sy4oe4diEyISJaUkmBrB8KrQ0OaSwG15Rsva3VievSU5rCR92Rys+0yYcMZgg+GcQu326I1bDuENbrFxPlGO8gEQKTnxOquSIQCUtlYGDRG+g7YvYNnQj75MDQa1/rgyC8IXGRECAGvilz3Kvc9kXTdGi+Ah1qn54DCNVMlNwtohIjob8U31zx2mP4wGGZl4ioM16AL1NiYivwXWxFx+K3XRjZortzPachl3GMxsyxRSkS1jjAQb2hgUHiChGfuBMMkhV1at00lpIui7TAVtpb193zsejcz4mkysUZHx5C6F8bwDfUYaVxzpCE1pPAk8CYXdG7Y/zxTBQiO3UVT40+0OJZOjVNUxKlvbvV6g7WCEVfhew20xqP9fpsg3KmK/4bamfuALqGxBYlJcoy9ghP70Oc0IQXa3A9j5OEhT135qaxuHv0SqbRV1svDGcbS5q/1yPP1RWx4JB2u+cGlOa5j4tSLytBdQMLgImTWG4ehVnP8GmBOPhqefGflbjj3wWvft/3rpVLNMXobIoDH7eFWBpaMY+wK4Glf2+A9WRwe3KfJdlXvP1kkxSrisTp5qUHdoGZHm4byBLG1AqJR MjziqIRx jcJUJBiYY0EshgKnT9SxqozeTsIPA9v4N2bYstiAP9mDx5uWeF7s8glPJ3eG3jwrDO24rFOSxib+eO2cXSolM7PuFgXi61z3/busDSHkZkU7MpE4HCyZHUuub0V7waVxOSFQ3YaIulyM4lUy6vS1u5nHk503fXvQD/Sw4Iiy/s/7KTmH7De/YWNVMQwyOXzSiDw4iuc02fYlDVcz40WLPeVHnhtFIov972raRPyoLGv0XadA5A0ixq+/Il4wGcmx+2gVvEBn7zViikbnQcJ+jDpFCYyhmv2vnTljh5BDj7WkRnKz+0uQCKe77lHdJMU99D2Z25yULix/rq6alijHuQmG6AyKFhrz/XQzc4hyCQnjaLyqKgfypYe49Sa/1ElftAEUbtWvD389FvtqlstkaSVfkJNlSGGy+DvWk36gc+LpCuVipL8VeSY8sbWCYP4O3924cFIDKfJ8GEoAKsAs8ezC1BZk7EFtIqnpA 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[1/1] mm/mmap: allow MAP_DROPPABLE | MAP_PRIVATE in mmap()
|
expand
|
diff --git a/mm/mmap.c b/mm/mmap.c index cda01071c7b1..840889b5bfb2 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -504,6 +504,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr, vm_flags |= VM_SHARED | VM_MAYSHARE; break; case MAP_DROPPABLE: + case MAP_DROPPABLE | MAP_PRIVATE: if (VM_DROPPABLE == VM_NONE) return -ENOTSUPP; /*