From patchwork Tue Jun 1 23:22:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lin X-Patchwork-Id: 12292425 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 126D5C4708F for ; Tue, 1 Jun 2021 23:22:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 967F561001 for ; Tue, 1 Jun 2021 23:22:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 967F561001 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 20BA86B0070; Tue, 1 Jun 2021 19:22:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BAD66B0073; Tue, 1 Jun 2021 19:22:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 034D96B0071; Tue, 1 Jun 2021 19:22:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id B92596B006C for ; Tue, 1 Jun 2021 19:22:36 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 44821181AC9BF for ; Tue, 1 Jun 2021 23:22:36 +0000 (UTC) X-FDA: 78206731512.05.FF4A17B Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf21.hostedemail.com (Postfix) with ESMTP id 606DDE00025A for ; Tue, 1 Jun 2021 23:22:19 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id F246461026; Tue, 1 Jun 2021 23:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622589755; bh=Se0vr8HjjuDI8G7XYVGiPoR/r6XQrsDheJYzxnwLFiA=; h=From:To:Cc:Subject:Date:From; b=lm5J/tOLNt1E6CBn8MvYDvNyPnF6vnpKrF7mLRGMR5DjINnhiOWID2oaRBxMdKnoH hfVeg5z9RDRwYGuaZUiXAZxKlqk3czXqV04hFTUpW6U6gyZhMmCKwTCPmP2KQB/HaH myQ5Z1TP0piPwxBlAxRiyKo5HStdz7iaRo6VR2PBwY0bviyRM2q0ki9sxrBbAugpdJ Lu6S5WPGpbXfpBGdwtc+TYkOpQVMKGF/5BrflodcqhDYa0bwkmhotrE1kyNpK24S2B gdeN7evdS/69FUK0IcZ6xrmC6+OAKeJpshrNiTkwZk1eY7zwK/gSVuIlLar72jrrds 7xEhG4SwjOCuw== From: Ming Lin To: Linus Torvalds , Hugh Dickins , Simon Ser Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ming Lin Subject: [PATCH 0/2] mm: adds MAP_NOSIGBUS extension for shmem read Date: Tue, 1 Jun 2021 16:22:31 -0700 Message-Id: <1622589753-9206-1-git-send-email-mlin@kernel.org> X-Mailer: git-send-email 1.8.3.1 Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="lm5J/tOL"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf21.hostedemail.com: domain of mlin@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=mlin@kernel.org X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 606DDE00025A X-Stat-Signature: eb6x6ffkcgcb8wz1j8ra5oh3z1og6xup X-HE-Tag: 1622589739-112672 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: These 2 patches are based on the discussion of "Sealed memfd & no-fault mmap" at https://bit.ly/3pdwOGR patch 1: make "vm_flags" be an u64, so we can have enough bits on 32-bit architectures. Then we can add VM_NOSIGBUS which is bit 38. patch 2: support no-fault mmap for shmem read Ming Lin (2): mm: make "vm_flags" be an u64 mm: adds NOSIGBUS extension for out-of-band shmem read arch/arm64/Kconfig | 1 - arch/powerpc/Kconfig | 1 - arch/x86/Kconfig | 1 - include/linux/mm.h | 102 ++++++++++++++++----------------- include/linux/mm_types.h | 4 +- include/linux/mman.h | 5 +- include/uapi/asm-generic/mman-common.h | 1 + mm/Kconfig | 2 - mm/memory.c | 2 +- mm/mmap.c | 5 +- mm/shmem.c | 17 +++++- 11 files changed, 76 insertions(+), 65 deletions(-)