From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 922632BDC1B; Fri, 23 Jan 2026 07:46:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769154413; cv=none; b=gMq6OAX/FzGAJORcDzj2ejiZm7srzpD9h6CbhZBBtPqRUa10L8i9Wha8ZPu8Qk2rVtsZkRx7u/wXGTqx/grvBoCkN1IEb1t5V4YtComWr+xnrV1Cg+ytks4dhknjrhk48gWBvxiYgU/xWuFcZSw7fQ7c0C1gTSMjwzSZrH8bcBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769154413; c=relaxed/simple; bh=OAD/ygUEOD88K+ggqyDG4ngV41XfzkifYu+rUan4UmY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f7fe9qBPwBmgdGKDSdPzs6ixdsvDG4ucH3Z2IHUI7V0c+1EzrgoDsD0HN6RGm7YpkufLXsV6iOcxHZOOFimZduM6RkFuytE/mBGBahTJs+Xhgy8izVlPnWjXCquia1M7/yEv9yC5B/DtThqYmVJGC8BisqRfPBs2KxnP2U6rDIc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gKjzE7cq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gKjzE7cq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CD45C4CEF1; Fri, 23 Jan 2026 07:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769154413; bh=OAD/ygUEOD88K+ggqyDG4ngV41XfzkifYu+rUan4UmY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gKjzE7cqDXZweQuGHrMLnfOMSZf3lh7HGxajgtU/lt8kCe+JBtiVTH7cLgHlNYZDq /xkI+t4I2UXrUC62zmbj0vZUsBgJVNWHf2u/IB5rVWQ0M92qWVFNAn+aHpwjmatIJJ 42HGEvas39c7oPcKIUvmKiwxdWG6F7op09dvqSnaEPXJxDYV8uNaZg5zuYpCGbPOV2 uECZnk5jJ2EcGxljpENkS6fEZ1z6XTrmkHHGu/DMNaJHL0zQj3FpdgRCKBYhPwGr8Q PcpeqEt3bPSuwM7nEePid0sJHAvbYps2rpINdGvyHw/B3l0OhLkXuPNse9MoBWxRVu vChCTt8SYWz8g== Date: Thu, 22 Jan 2026 23:46:52 -0800 From: "Darrick J. Wong" To: Lorenzo Stoakes Cc: Andrew Morton , Jarkko Sakkinen , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , Arnd Bergmann , Greg Kroah-Hartman , Dan Williams , Vishal Verma , Dave Jiang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Christian Koenig , Huang Rui , Matthew Auld , Matthew Brost , Alexander Viro , Christian Brauner , Jan Kara , Benjamin LaHaise , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Chunhai Guo , Theodore Ts'o , Andreas Dilger , Muchun Song , Oscar Salvador , David Hildenbrand , Konstantin Komarov , Mike Marshall , Martin Brandenburg , Tony Luck , Reinette Chatre , Dave Martin , James Morse , Babu Moger , Carlos Maiolino , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Matthew Wilcox , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Hugh Dickins , Baolin Wang , Zi Yan , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Jann Horn , Pedro Falcato , David Howells , Paul Moore , James Morris , "Serge E . Hallyn" , Yury Norov , Rasmus Villemoes , linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org, ntfs3@lists.linux.dev, devel@lists.orangefs.org, linux-xfs@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, Jason Gunthorpe Subject: Re: [PATCH v2 08/13] mm: update shmem_[kernel]_file_*() functions to use vma_flags_t Message-ID: <20260123074652.GW5945@frogsfrogsfrogs> References: <736febd280eb484d79cef5cf55b8a6f79ad832d2.1769097829.git.lorenzo.stoakes@oracle.com> Precedence: bulk X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <736febd280eb484d79cef5cf55b8a6f79ad832d2.1769097829.git.lorenzo.stoakes@oracle.com> On Thu, Jan 22, 2026 at 04:06:17PM +0000, Lorenzo Stoakes wrote: > In order to be able to use only vma_flags_t in vm_area_desc we must adjust > shmem file setup functions to operate in terms of vma_flags_t rather than > vm_flags_t. > > This patch makes this change and updates all callers to use the new > functions. > > No functional changes intended. > > Signed-off-by: Lorenzo Stoakes > --- > arch/x86/kernel/cpu/sgx/ioctl.c | 2 +- > drivers/gpu/drm/drm_gem.c | 5 +- > drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +- > drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 +- > drivers/gpu/drm/i915/gt/shmem_utils.c | 3 +- > drivers/gpu/drm/ttm/tests/ttm_tt_test.c | 2 +- > drivers/gpu/drm/ttm/ttm_backup.c | 3 +- > drivers/gpu/drm/ttm/ttm_tt.c | 2 +- > fs/xfs/scrub/xfile.c | 3 +- > fs/xfs/xfs_buf_mem.c | 2 +- > include/linux/shmem_fs.h | 8 ++- > ipc/shm.c | 6 +-- > mm/memfd.c | 2 +- > mm/memfd_luo.c | 2 +- > mm/shmem.c | 59 +++++++++++++---------- > security/keys/big_key.c | 2 +- > 16 files changed, 57 insertions(+), 49 deletions(-) > > diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c > index c753c79df203..fe0584a39f16 100644 > --- a/fs/xfs/scrub/xfile.c > +++ b/fs/xfs/scrub/xfile.c > @@ -61,7 +61,8 @@ xfile_create( > if (!xf) > return -ENOMEM; > > - xf->file = shmem_kernel_file_setup(description, isize, VM_NORESERVE); > + xf->file = shmem_kernel_file_setup(description, isize, > + mk_vma_flags(VMA_NORESERVE_BIT)); Seems fine, macro sorcery aside... > if (IS_ERR(xf->file)) { > error = PTR_ERR(xf->file); > goto out_xfile; > diff --git a/fs/xfs/xfs_buf_mem.c b/fs/xfs/xfs_buf_mem.c > index dcbfa274e06d..fd6f0a5bc0ea 100644 > --- a/fs/xfs/xfs_buf_mem.c > +++ b/fs/xfs/xfs_buf_mem.c > @@ -62,7 +62,7 @@ xmbuf_alloc( > if (!btp) > return -ENOMEM; > > - file = shmem_kernel_file_setup(descr, 0, 0); > + file = shmem_kernel_file_setup(descr, 0, EMPTY_VMA_FLAGS); ...but does mk_vma_flags() produce the same result? --D > if (IS_ERR(file)) { > error = PTR_ERR(file); > goto out_free_btp;